A Go SDK and CLI tool for working with Tachograph data (.DDD files).
This SDK implements parsing of downloaded tachograph data, according to the requirements for the construction, testing, installation, operation and repair of tachographs and their components.
This library provides a comprehensive set of tools for working with Tachograph data, from raw binary parsing to anonymization and serialization.
// 1. Unmarshal the raw .DDD file content into a RawFile object.
rawFile, err := tachograph.Unmarshal(dddBytes)
if err != nil {
log.Fatalf("failed to unmarshal: %v", err)
}
// 2. Authenticate the signatures within the RawFile.
authenticatedRawFile, err := tachograph.Authenticate(context.Background(), rawFile)
if err != nil {
log.Fatalf("failed to authenticate: %v", err)
}
// 3. Parse the authenticated RawFile into a File.
parsedFile, err := tachograph.Parse(authenticatedRawFile)
if err != nil {
log.Fatalf("failed to parse: %v", err)
}
// 4. Anonymize personal data in the parsed File.
anonymizedFile, err := tachograph.Anonymize(parsedFile)
if err != nil {
log.Fatalf("failed to anonymize: %v", err)
}
// 5. Marshal the file back into the binary .DDD format.
marshalledBytes, err := tachograph.Marshal(anonymizedFile)
if err != nil {
log.Fatalf("failed to marshal: %v", err)
}tachograph.Unmarshal parses raw .DDD byte arrays into a tachographv1.RawFile object.
tachograph.Authenticate cryptographically verifies the signatures within a tachographv1.RawFile.
tachograph.Parse turns a tachographv1.RawFile into a tachographv1.File, with meaningful, high-level structures like driver activities and events, making the data easy to analyze.
tachograph.Anonymize removes or obscures personal data from a tachographv1.File - making the data usable for unit testing
tachograph.Marshal serializes a tachographv1.File back into the binary .DDD format.
$ tachograph
Tachograph CLI
USAGE
tachograph [command] [--flags]
.DDD FILES
parse [file ...] [--flags] Parse .DDD files
UTILS
completion [command] Generate the autocompletion script for the specified shell
help [command] Help about any command
FLAGS
-h --help Help for tachograph
-v --version Version for tachograph
This SDK draws inspiration from other tachograph SDKs, including: