Package: odxtools
odxtoolsodxtoolsis a set of utilities for working with diagnostic
descriptions of automotive electronic control units using the data
model and the associated technologies of the ODX standard.ODXstands for "Open Diagnostic
data eXchange" and is primarily an XML based file format to describe
the diagnostic capabilities of the electronic control units (ECUs) of
complex distributed technical systems (usually cars and trucks). ODX
is anopen standard maintained by ASAM
e.V.and is also
standardized internationally byISO-22901.Usually, ODX is used to complement theUDSautomotive diagnostics standard -- which itself can be considered to
be an extension ofOBD-II--
to provide a machine-processable description of the vendor-specific
diagnostics functionality of a vehicle's ECUs. That said, the
functionality which is described by ODX files neither needs to be a
super- nor a subset of OBD-II/UDS, e.g., ODX can be used to describe
diagnostic functionality that uses fundamentally different wire
formats and conventions than the ones mandated by OBD-II/UDS. (In
practice, the ODX-described functionality usually adheres to these
standards, though.)The functionality provided byodxtoolsencompasses parsing and
internalizing ODX diagnostic database files as well as de- and
encoding the data of diagnostic requests and their responses
send to/received from ECUs in an pythonic manner.Table of ContentsUse CasesInstallationUsage ExamplesPython snippetsUsing the non-strict modeInteractive UsagePython REPLCommand line usageGeneric parametersThelistsubcommandThebrowsesubcommandThesnoopsubcommandThefindsubcommandThedecodesubcommandThecomparesubcommandTestingContributingCode of ConductProvider InformationAcknowledgementsLicenseUse CasesHere are some of the intended use cases ofodxtools:Prototype development: Interacting with the diagnostic services of
electronic control units directly from python (requires taping into
the car's relevant CAN or ethernet bus)End-of-production calibration/quality control: Initial set up and
running a self diagnosis of newly produced cars to ensure that
everything works as specifiedAfter-sales: Implementing servicing functionality for workshops, i.e.,
defining test schedules based on the legally mandated functionality of
ISO 15031-6 (OBD II) as well as manufacturer-specific routinesPrototype development (II): Analyzing and debugging diagnostic sessions
done using third-party softwarePrototype development (III): Implementing bridges to higher-level protocols
such as HTTPDevelopment for mass production: Accelerating the implementation of
diagnostic servicesfor low-cost ECUs by usingodxtools-based code
generators for the diagnostic glue code on system-level languages like
C++ or rustPlease be aware that some of the use cases listed above are currently
rather aspirational.InstallationThe easiest way of installingodxtoolson your system is viapip:python3-mpipinstallodxtoolsIf you want to developodxtoolsitself, you need to install it from
source usinggit. The first step is to clone the repository:cd$BASE_DIRgitclonehttps://github.com/mercedes-benz/odxtoolsAfter this, make sure that all python dependencies are installed:cd$BASE_DIR/odxtools
python3-mpipinstall-e.Next, you can optionally build a package and install it on the system:cd$BASE_DIR/odxtools
python3-mpipinstall--upgradebuild
python3-mbuild
sudopython3-mpipinstalldist/odxtools-*.whlFinally, update thePYTHONPATHenvironment variable and the newly
cloned module is ready to be used:exportPYTHONPATH="$BASE_DIR/odxtools:$PYTHONPATH"Now, you can check whether the installation worked:python3-modxtoolslist-a"$YOUR_PDX_FILE"Usage ExamplesPython snippetsLoad an ODX database from filesomersault.pdx:importodxtoolsdb=odxtools.load_pdx_file("somersault.pdx")List the names of all available services of thesomersault_lazyECU:# [...]ecu=db.ecus.somersault_lazyprint(f"Available services for{ecu.short_name}:{ecu.services}")Determine the CAN IDs which thesomersault_lazyECU uses to send
and receive diagnostic messages:# [...]print(f"ECU{ecu.short_name}listens for requests on CAN ID 0x{ecu.get_receive_id():x}")print(f"ECU{ecu.short_name}transmits responses on CAN ID 0x{ecu.get_send_id():x}")Encode asession_startrequest to thesomersault_lazyECU:# [...]raw_request_data=ecu.services.session_start()print(f"Message for session start request of ECU{ecu.short_name}:{raw_request_data}")# -> bytearray(b'\x10\x00')Encode the positive response to thestart_sessionrequest:# [...]raw_request_data=ecu.services.session_start()raw_response_data=ecu.services.session_start.positive_responses[0].encode(coded_request=raw_request_data)print(f"Positive response to session_start() of ECU{ecu.short_name}:{raw_response_data}")# -> bytearray(b'P')Decode a request:# [...]raw_data=b"\x10\x00"decoded_message=ecu.decode(raw_data)print(f"decoded message:{decoded_message}")# -> decoded message: [start_session()]Decode a response to a request:# [...]raw_request_data=b"\x10\x00"raw_response_data=b'P'decoded_response=ecu.decode_response(raw_response_data,raw_request_data)print(f"decoded response:{decoded_response}")# -> decoded response: [session()]Using the non-strict modeBy default, odxtools raises exceptions if it suspects that it cannot
fulfill a requested operation correctly. For example, if the dataset
it is instructed to load is detected to be not conformant with the ODX
specification, or if completing the operation requires missing
features of odxtools. To be able to deal with such cases, odxtools
provides a "non-strict" mode where such issues are ignored, but where
the results are undefined. The following snippet shows how to instruct
odxtools to load a non-conforming file in non-strict mode, and after
this is done, enables the safety checks again:importodxtools[...]odxtools.exceptions.strict_mode=Falsebotched_db=odxtools.load_file("my_non-conforming_database.pdx")odxtools.exceptions.strict_mode=True[...]Interactive UsagePython REPLpython's interactive read-reval-print-loop (REPL) supports
tab-completion on most plattforms, i.e., in this case, all data can be
conveniently interactivly discovered and this makesodxtoolsa very
convenient tool to explore the capabilities of a given ECU.A notable exception is the Microsoft Windows platform: Most python
distribtions for Windows do not enable tab-completion by default in
their REPL.  For more convenience in such a scenario, we recommend
usingptpython.ptpythoncan be installed like any other python package, i.e., viapython3 -m pip install ptpython. Then, the REPL ought to be started usingc:\odxtest>python3 "C:\Python39\Lib\site-packages\ptpython\entry_points\run_ptpython.py"Alternatively,pyreadlinecan be used after installing it viapython3 -m pip install pyreadline.  With this,basictab-completion for python under Windows inInteractive
Modeshould work.Command line usageBased the python module,odxtoolsalso provides a set of command
line utilities for quick interactive explorations. Amongst others,
these utilities allow the inspection ODX/PDX files, snooping on
diagnostic sessions, etc. Ifodxtoolsis installed on a system-wide
basis, these commands can be invoked usingodxtools SUBCOMMAND [PARAMS], if the repository has been manually cloned viagitandodxtoolshas not been installed on a system-wide basis, the way to
invoke these utilities is viapython3 -m odxtools SUBCOMMAND [PARAMS].Generic parametersAvailable generic parameters and a list of subcommands can be obtained
usingodxtools --help:$odxtools--help
usage:odxtools[-h][--version]{list,browse,snoop,find,decode,compare}...

UtilitiestointeractwithautomotivediagnosticdescriptionsbasedontheODXstandard.

Examples:Forprintingallservicesuse:odxtoolslist./path/to/database.pdx--servicesForbrowsingthedatabaseandencodingmessagesuse:odxtoolsbrowse./path/to/database.pdx

positionalarguments:{list,browse,snoop,find,decode,compare}SelectasubcommandlistPrintasummaryofautomotivediagnosticfiles.browseInteractivelybrowsethecontentofautomotivediagnosticfiles.snoopLivedecodingofadiagnosticsession.findFind&displayservicesbytheirnamedecodeFind&printservicebyhex-data.Canalsodecodethehex-datatoitsnamedparameters.compareComparestwoecuversionsordatabaseswitheachother.Checkswhetherdiagnosticservicesanditsparametershavechanged.

optionalarguments:-h,--helpshowthishelpmessageandexit--versionPrinttheodxtoolsversionAll subcommands accept the--helpparameter:$odxtoolslist--help
usage:odxtoolslist[-h][-vVARIANT[VARIANT...]][-s[SERVICE[SERVICE...]]][-p][-d][-a]PDX_FILE[...]It follows is an inexhaustive list of the subcommands that are
currently available:ThelistsubcommandThelistsubcommand is used to parse a.pdxdatabase file and
print the relevant parts of its content to the terminal.$odxtoolslist-h
usage:odxtoolslist[-h][-vVARIANT[VARIANT...]][-g][-s[SERVICE[SERVICE...]]][-p][-d][-a][-po]PDX_FILE

Listthecontentofautomotivediagnosticfiles(*.pdx)Examples:Fordisplayingonlythenamesofthediagnosticlayersuse:odxtoolslist./path/to/database.pdxFordisplayingallcontentuse:odxtoolslist./path/to/database.pdx--allFormoreinformationuse:odxtoolslist-h

positionalarguments:PDX_FILEpathtothe.pdxfile

optionalarguments:-h,--helpshowthishelpmessageandexit-vVARIANT[VARIANT...],--variantsVARIANT[VARIANT...]Specifieswhichvariantsshouldbeincluded.-g,--global-negative-responsesPrintalistoftheglobalnegativeresponsesfortheselectedECUs.-s[SERVICE[SERVICE...]],--services[SERVICE[SERVICE...]]Printalistofdiagnosticservicesspecifiedinthepdx.Ifnoservicenamesarespecified,allservicesareprinted.-p,--paramsPrintalistofallparametersrelevantfortheselecteditems.-d,--dopsPrintalistofalldataobjectpropertiesrelevantfortheselecteditems-a,--allPrintalistofalldiagnosticservicesandDOPsspecifiedinthepdx-po,--plumbing-outputPrintfullobjectsinsteadofselectedandformattedattributesThe options--variantsand--servicescan be used to specify which services should be printed.If the--paramsoption is specified, the message layout and information about the service parameters (reuest as well as responses) are printed for all specified variants/services.
If the--global-negative-responsesoption is specified, all global negative responses are printed for all specified variants.
If the--dopsoption is specified, a list of all data object properties (their names) is printed for all specified variants/services.
With the parameter--allall data of the file that is recognized byodxtoolsis printed.
The default output does not display all information of the specified objects but a selection. To see all object information choose the parameter--plumbing-output.Example:$odxtoolslist$BASE_DIR/odxtools/examples/somersault.pdx--variantssomersault_lazy--servicesdo_forward_flips--params
Overviewofdiagnosticlayers:|Name|VariantType|Num.ofServices|Num.ofDOPs|Num.ofcomparams
----+-----------------+--------------+------------------+--------------+-------------------0|somersault_lazy|ECU-VARIANT|5|10|10Diagnosticlayer:'somersault_lazy'VariantType:ECU-VARIANTDescription:SloppyvariantofthesomersaultECU(lazy<assiduous)Theservicesof'somersault_lazy'are:do_forward_flips<ID:OdxLinkId('somersault.service.do_forward_flips')>Servicedescription:Doaforwardflip.RequestProperties:RequestName:do_forward_flipsByte-Array:---Hex-String:0x---ServiceParameters:[sid,forward_soberness_check,num_flips]|Name|BytePos.|BitLength|Param.Type|DataType|Value|ValueDesc.|LinkedDOP
----+-------------------------+-----------+------------+-------------+-----------+-------+-------------+-----------------0|sid|0|8|CODED-CONST|A_UINT32|0xBA|codedvalue|1|forward_soberness_check|1|8|VALUE|A_UINT32|||soberness_check2|num_flips|2|8|VALUE|A_UINT32|||num_flipsMessageformatofarequest:76543210+-----+-----+-----+-----+-----+-----+-----+-----+0|sid(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+1|forward_soberness_check(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+2|num_flips(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+PositiveResponseProperties:NumberofPositiveResponses:1PositiveResponses:[grudging_forward]ServiceParameters:[sid,num_flips_done]|Name|BytePos.|BitLength|ParameterType|DataType|Value|ValueDesc.|LinkedDOP
----+----------------+-----------+------------+------------------------+-----------+-------+-------------+-------------0|sid|0|8|CODED-CONST|A_UINT32|0xFA|codedvalue|1|num_flips_done|1|8|MATCHING-REQUEST-PARAM||||Messageformatofapositiveresponse:76543210+-----+-----+-----+-----+-----+-----+-----+-----+0|sid(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+1|num_flips_done(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+NegativeResponseProperties:NumberofNegativeResponses:1NegativeResponses:[flips_not_done]ServiceParameters:[sid,rq_sid,reason,flips_successfully_done]|Name|BytePos.|BitLength|ParameterType|DataType|Value|ValueDesc.|LinkedDOP
----+-------------------------+----------+------------+------------------------+-----------+-----------+-------------+-------------0|sid|0|8|CODED-CONST|A_UINT32|0x7F|codedvalue|1|rq_sid|1|8|MATCHING-REQUEST-PARAM||||2|reason|2|8|NRC-CONST|A_UINT32|[0,1,2]|codedvalue|3|flips_successfully_done|3|8|VALUE|A_UINT32|||num_flipsNumberofnegativeresponses:1Messageformatofanegativeresponse:76543210+-----+-----+-----+-----+-----+-----+-----+-----+0|sid(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+1|rq_sid(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+2|reason(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+3|flips_successfully_done(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+ThebrowsesubcommandThebrowsesubcommand usesPyInquirerto interactively
navigate through the database of a.pdxfile. For example, using thebrowsesubcommand you can select the ECU and service without
spamming the terminal:$odxtoolsbrowse$BASE_DIR/odxtools/examples/somersault.pdx
?SelectaVariant.somersault_lazy
ECU-VARIANT'somersault_lazy'(ReceiveID:0x7b,SendID:0x1c8)?Thevariantsomersault_lazyoffersthefollowingservices.Selectone!do_forward_flips
?Thisserviceoffersthefollowingmessages.Request:do_forward_flips76543210+-----+-----+-----+-----+-----+-----+-----+-----+0|sid(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+1|forward_soberness_check(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+2|num_flips(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+Parameter(short_name='sid',type='CODED-CONST',semantic=None,byte_position=0,bit_length=8,coded_value='0xba')Parameter(short_name='forward_soberness_check',type='VALUE',semantic=None,byte_position=1,bit_length=8,dop_ref='somersault.DOP.soberness_check')DataObjectProperty('soberness_check',category='LINEAR',internal_type='A_UINT32',physical_type='A_UINT32')Parameter(short_name='num_flips',type='VALUE',semantic=None,byte_position=2,bit_length=8,dop_ref='somersault.DOP.num_flips')DataObjectProperty('num_flips',category='LINEAR',internal_type='A_UINT32',physical_type='A_UINT32')[...]ThesnoopsubcommandThesnoopsubcommand can be used to decode a trace of a or a
currently running diagnostic session.$odxtoolssnoop-h
usage:odxtoolssnoop[-h][--active][--channelCHANNEL][--rxRX][--txTX][--variantVARIANT][--protocolPROTOCOL]PDX_FILE

Livedecodingofadiagnosticsession.

positionalarguments:PDX_FILEpathtothe.pdxfile

options:-h,--helpshowthishelpmessageandexit--active,-aActivemode,sendsflowcontrolmessagestoreceiveISO-TPtelegramssuccessfully--channelCHANNEL,-cCHANNELCANinterfacenametobeused(requiredinactivemode)--rxRX,-rRXCANIDinwhichtheECUlistensfordiagnosticmessages--txTX,-tTXCANIDinwhichtheECUsendsreplystodiagnosticmessages(requiredinactivemode)--variantVARIANT,-vVARIANTNameoftheECUvariantwhichthedecodeprocessoughttobebasedon--protocolPROTOCOL,-pPROTOCOLNameoftheprotocolusedfordecodingExample:# create a socketcan `vcan0` interfacesudoiplinkadddevvcan0typevcan
sudoiplinksetvcan0up# start the snooping on vcan0odxtoolssnoop-cvcan0--variant"somersault_lazy"$BASE_DIR/odxtools/examples/somersault.pdx# on a different terminal, run the diagnostic session$BASE_DIR/odxtools/examples/somersaultlazy.py-cvcan0The snoop command will then output the following:$odxtoolssnoop-cvcan0--variant"somersault_lazy"$BASE_DIR/odxtools/examples/somersault.pdx
Decodingmessagesonchannelvcan0
Tester:do_forward_flips(forward_soberness_check=18,num_flips=1)->7fba7f(bytearray(b'\x7f\xba\x7f'),3bytes)Tester:start_session()->session()Tester:do_forward_flips(forward_soberness_check=18,num_flips=1)->grudging_forward(num_flips_done=bytearray(b'\x01'))Tester:do_forward_flips(forward_soberness_check=35,num_flips=1)->flips_not_done(rq_sid=bytearray(b'\xba'),reason=0,flips_successfully_done=0)Tester:do_forward_flips(forward_soberness_check=18,num_flips=3)->grudging_forward(num_flips_done=bytearray(b'\x03'))Tester:do_forward_flips(forward_soberness_check=18,num_flips=50)->flips_not_done(rq_sid=bytearray(b'\xba'),reason=1,flips_successfully_done=6)ThefindsubcommandThefindsubcommand can be used to find a service and its associated information by a partial name via cli.$odxtoolsfind-h
usage:odxtoolsfind[-h][-vVARIANT]-s[SERVICES...][-nd][-ro][-po]PDX_FILE

Find&printservicesbyname

Examples:Fordisplayingtheservicesassociatedwiththepartialname'Reset'withoutdetails:odxtoolsfind./path/to/database.pdx-s"Reset"--no-detailsFormoreinformationuse:odxtoolsfind-h

positionalarguments:PDX_FILELocationofthe.pdxfile

options:-h,--helpshowthishelpmessageandexit-vVARIANT,--variantsVARIANTSpecifieswhichecuvariantsshouldbeincluded.-s[SERVICES...],--service-names[SERVICES...]Printalistofdiagnosticservicespartiallymatchinggivenservicenames-nd,--no-detailsDon'tshowallservicedetails-ro,--relaxed-outputRelaxoutputformattingrules(allowunknownbitlengthsforasciirepresentation)-po,--plumbing-outputPrintfullobjectsinsteadofselectedandformattedattributesExample: Find diagnostic services with the namesession_start$odxtoolsfind$BASE_DIR/odxtools/examples/somersault.pdx-ssession_start=====================================somersault_lazy,somersault_assiduous=====================================session_start<ID:OdxLinkId('somersault.service.session_start')>RequestProperties:RequestName:start_sessionByte-Array:bytearray(b'\x10\x00')Hex-String:0x1000ServiceParameters:[sid,id]|Name|BytePos.|BitLength|Param.Type|DataType|Value|ValueDesc.|LinkedDOP
----+------+-----------+------------+-------------+-----------+-------+-------------+------------0|sid|0|8|CODED-CONST|A_UINT32|0x10|codedvalue|1|id|1|8|CODED-CONST|A_UINT32|0x00|codedvalue|Messageformatofarequest:76543210+-----+-----+-----+-----+-----+-----+-----+-----+0|sid(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+1|id(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+PositiveResponseProperties:NumberofPositiveResponses:1PositiveResponses:[session]ServiceParameters:[sid,can_do_backward_flips]|Name|BytePos.|BitLength|Param.Type|DataType|Value|ValueDesc.|LinkedDOP
----+-----------------------+-----------+------------+-------------+------------------+-------+-------------+------------0|sid|0|8|CODED-CONST|A_UINT32|0x50|codedvalue|1|can_do_backward_flips|1|8|VALUE|A_UNICODE2STRING|||booleanMessageformatofapositiveresponse:76543210+-----+-----+-----+-----+-----+-----+-----+-----+0|sid(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+1|can_do_backward_flips(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+NegativeResponseProperties:NumberofNegativeResponses:1NegativeResponses:[general_negative_response]ServiceParameters:[sid,rq_sid,response_code]|Name|BytePos.|BitLength|ParameterType|DataType|Value|ValueDesc.|LinkedDOP
----+---------------+----------+------------+------------------------+-----------+-------+-------------+------------0|sid|0|8|CODED-CONST|A_UINT32|0x7F|codedvalue|1|rq_sid|1|8|MATCHING-REQUEST-PARAM||||2|response_code|2|8|VALUE|A_UINT32|||error_codeMessageformatofanegativeresponse:76543210+-----+-----+-----+-----+-----+-----+-----+-----+0|sid(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+1|rq_sid(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+2|response_code(8bits)|+-----+-----+-----+-----+-----+-----+-----+-----+ThedecodesubcommandThedecodesubcommand can be used to decode hex-data to a service, and its associated
parameters.$odxtoolsdecode-h
usage:odxtoolsdecode[-h][-vVARIANT]-dDATA[-D]PDX_FILE

Decoderequestbyhex-data

Examples:Fordisplayingtheserviceassociatedwiththerequest1001&decodingit:odxtoolsdecode./path/to/database.pdx-D-d'10 01'Fordisplayingtheserviceassociatedwiththerequest1001,withoutdecodingit:odxtoolsdecode./path/to/database.pdx-d'10 01'Formoreinformationuse:odxtoolsdecode-h

positionalarguments:PDX_FILELocationofthe.pdxfile

options:-h,--helpshowthishelpmessageandexit-vVARIANT,--variantsVARIANTSpecifieswhichecuvariantsshouldbeincluded.-dDATA,--dataDATASpecifydataofhexrequest-D,--decodeDecodethegivenhexdataExample: Decode diagnostic services with the request10 00$odxtoolsdecode$BASE_DIR/odxtools/examples/somersault.pdx-d'10 00'Binarydata:1000Decodedbyservice'session_start'(decodingECUs:somersault_lazy,somersault_assiduous)Example: Decode diagnostic services with the request10 00, and parameters$odxtoolsdecode$BASE_DIR/odxtools/examples/somersault.pdx-d'10 00'-D
Binarydata:1000Decodedbyservice'session_start'(decodingECUs:somersault_lazy,somersault_assiduous)Decodeddata:sid=16(0x10)id=0(0x0)ThecomparesubcommandThecomparesubcommand can be used to compare databases (pdx-files) and diagnostic layers with each other. All diagnostic services as well as its parameters of specified databases and variants are compared with each other and changes are displayed.database comparison:new diagnostic layersdeleted diagnostic layersdiagnostic layer comparisondiagnostic layer comparison:new servicesdeleted servicesrenamed servicesservice parameter comparisonservice parameter comparison:find changes in following properties:NameByte PositionBit LengthSemanticParameter TypeCoded ValueData TypeData Object Property (Name, Data Type, Bit Length, Default Value)$odxtoolscompare-h
usage:odxtoolscompare[-h][-vVARIANT[VARIANT...]][-dbDATABASE[DATABASE...]][-nd][-od]PDX_FILE

Comparestwoecuversionsordatabaseswitheachother.Checkswhetherdiagnosticservicesanditsparametershavechanged.

Examples:Comparisonoftwoecuversions:odxtoolscompare./path/to/database.pdx-vvariant1variant2Comparisonoftwodatabaseversions:odxtoolscompare./path/to/database.pdx-db./path/to/old-database.pdxFormoreinformationuse:odxtoolscompare-h

positionalarguments:PDX_FILELocationofthe.pdxfile

options:-h,--helpshowthishelpmessageandexit-vVARIANT[VARIANT...],--variantsVARIANT[VARIANT...]Comparespecifiedecuvariantstoeachother.-dbDATABASE[DATABASE...],--databaseDATABASE[DATABASE...]Comparespecifieddatabasefile(s)todatabasefileoffirstinputargument.-nd,--no-detailsDon'tshowallserviceparameterdetails-od,--object-detailsPrintallobjectdetailsinsteadofjustthenameExample: Compare the ecu variantssomersault_lazyandsomersault_assiduous$odxtoolscompare$BASE_DIR/odxtools/examples/somersault.pdx-vsomersault_lazysomersault_assiduous

Overviewofdiagnosticlayers:|Name|VariantType|Num.ofServices|Num.ofDOPs|Num.ofcomparams
----+----------------------+--------------+------------------+--------------+-------------------0|somersault_lazy|ECU-VARIANT|5|10|101|somersault_assiduous|ECU-VARIANT|8|10|10Changesinecuvariantsomersault_lazy(comparedtosomersault_assiduous)Changeddiagnosticservicesforecuvariant:somersault_lazyDeletedservices|Name|Semantic|Hex-Request
----+----------------------+------------+---------------0|set_operation_params|FUNCTION|1|do_backward_flips|FUNCTION|2|headstand|UNKNOWN|Example: Compare two databases$odxtoolscompare$BASE_DIR/odxtools/examples/somersault_modified.pdx-db$BASE_DIR/odxtools/examples/somersault.pdx-nd

Changesinfilesomersault_modified.pdx(comparedtosomersault.pdx)Overviewofdiagnosticlayers(forsomersault_modified.pdx)|Name|VariantType|Num.ofServices|Num.ofDOPs|Num.ofcomparams
----+----------------------+--------------+------------------+--------------+-------------------0|somersault|BASE-VARIANT|6|10|101|somersault_lazy|ECU-VARIANT|5|10|102|somersault_assiduous|ECU-VARIANT|8|10|103|somersault_young|ECU-VARIANT|6|10|10Overviewofdiagnosticlayers(forsomersault.pdx)|Name|VariantType|Num.ofServices|Num.ofDOPs|Num.ofcomparams
----+----------------------+--------------+------------------+--------------+-------------------0|somersault|BASE-VARIANT|7|10|101|somersault_lazy|ECU-VARIANT|5|10|102|somersault_assiduous|ECU-VARIANT|8|10|10Changedecuvariants:Newecuvariants:somersault_youngDeletedecuvariants:Changeddiagnosticservicesforecuvariant:somersault_lazyRenamedservices|Name|Semantic|Hex-Request|Oldservicename
----+---------------+------------+---------------+--------------------0|session_start|SESSION|0x1000|start_sessionServiceswithparameterchanges|Name|Semantic|Hex-Request|Changedparameters
----+----------------+---------------+-------------+-----------------------------------------------------------------------------------------------0|session_start|SESSION|0x1000|positiveresponseparameter'can_do_backward_flips',1|session_stop|SESSION|0x1001|requestparameter'id',positiveresponseparameter'can_do_backward_flips',2|tester_present|TESTERPRESENT|0x3E00|requestparameter'id',positiveresponseparameter'status',3|report_status|CURRENTDATA|0x2200|positiveresponseparameter'dizzyness_level',positiveresponseparameter'happiness_level',Detailedchangesofdiagnosticservicesession_start

Propertiesof2.positiveresponseparametercan_do_backward_flipshavechanged|Property|OldValue|NewValue
----+---------------+-------------+------------------0|LinkedDOP|uint8|boolean1|DOPdatatype|A_UINT32|A_UNICODE2STRINGDetailedchangesofdiagnosticservicesession_stop

Propertiesof2.requestparameteridhavechanged|Property|OldValue|NewValue
----+------------+-------------+-------------0|BitLength|16|8Propertiesof2.positiveresponseparametercan_do_backward_flipshavechanged|Property|OldValue|NewValue
----+---------------+-------------+------------------0|LinkedDOP|uint8|boolean1|DOPdatatype|A_UINT32|A_UNICODE2STRINGDetailedchangesofdiagnosticservicetester_present

Propertiesof2.requestparameteridhavechanged|Property|OldValue|NewValue
----+------------+-------------+-------------0|Value|0x01|0x00

Propertiesof2.positiveresponseparameterstatushavechanged|Property|OldValue|NewValue
----+------------+-------------+-------------0|BitLength|16|81|Value|0x0043|0x00Detailedchangesofdiagnosticservicereport_status

Propertiesof2.positiveresponseparameterdizzyness_levelhavechanged|Property|OldValue|NewValue
----+----------------+-----------------+-----------------0|Parametername|happiness_level|dizzyness_level1|LinkedDOP|happiness_level|dizzyness_level

Propertiesof3.positiveresponseparameterhappiness_levelhavechanged|Property|OldValue|NewValue
----+----------------+-----------------+-----------------0|Parametername|dizzyness_level|happiness_level1|LinkedDOP|dizzyness_level|happiness_levelChangeddiagnosticservicesforecuvariant:somersault_assiduousNewservices|Name|Semantic|Hex-Request
----+----------+------------+---------------0|flicflac|FUNCTION|Deletedservices|Name|Semantic|Hex-Request
----+----------------------+------------+---------------0|set_operation_params|FUNCTION|Renamedservices|Name|Semantic|Hex-Request|Oldservicename
----+---------------+------------+---------------+--------------------0|session_start|SESSION|0x1000|start_sessionServiceswithparameterchanges|Name|Semantic|Hex-Request|Changedparameters
----+-------------------+---------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------0|session_start|SESSION|0x1000|positiveresponseparameter'can_do_backward_flips',1|session_stop|SESSION|0x1001|requestparameter'id',positiveresponseparameter'can_do_backward_flips',2|tester_present|TESTERPRESENT|0x3E00|requestparameter'id',positiveresponseparameter'status',3|do_backward_flips|FUNCTION||requestparameter'backward_soberness_check',positiveresponseparameter'num_flips_done',positiveresponseparameter'grumpiness_level',4|report_status|CURRENTDATA|0x2200|positiveresponseparameter'dizzyness_level',positiveresponseparameter'happiness_level',5|headstand|UNKNOWN||requestparameterlist,Detailedchangesofdiagnosticservicesession_start

Propertiesof2.positiveresponseparametercan_do_backward_flipshavechanged|Property|OldValue|NewValue
----+---------------+-------------+------------------0|LinkedDOP|uint8|boolean1|DOPdatatype|A_UINT32|A_UNICODE2STRINGDetailedchangesofdiagnosticservicesession_stop

Propertiesof2.requestparameteridhavechanged|Property|OldValue|NewValue
----+------------+-------------+-------------0|BitLength|16|8Propertiesof2.positiveresponseparametercan_do_backward_flipshavechanged|Property|OldValue|NewValue
----+---------------+-------------+------------------0|LinkedDOP|uint8|boolean1|DOPdatatype|A_UINT32|A_UNICODE2STRINGDetailedchangesofdiagnosticservicetester_present

Propertiesof2.requestparameteridhavechanged|Property|OldValue|NewValue
----+------------+-------------+-------------0|Value|0x01|0x00

Propertiesof2.positiveresponseparameterstatushavechanged|Property|OldValue|NewValue
----+------------+-------------+-------------0|BitLength|16|81|Value|0x0043|0x00Detailedchangesofdiagnosticservicedo_backward_flips

Propertiesof2.requestparameterbackward_soberness_checkhavechanged|Property|OldValue|NewValue
----+----------------+----------------+--------------------------0|Parametername|backward_check|backward_soberness_check

Propertiesof2.positiveresponseparameternum_flips_donehavechanged|Property|OldValue|NewValue
----+---------------+-------------+-------------0|Byteposition|1|Propertiesof3.positiveresponseparametergrumpiness_levelhavechanged|Property|OldValue|NewValue
----+----------------+-------------+-------------0|Byteposition|2|1|Parametertype|CODED-CONST|VALUEDetailedchangesofdiagnosticservicereport_status

Propertiesof2.positiveresponseparameterdizzyness_levelhavechanged|Property|OldValue|NewValue
----+----------------+-----------------+-----------------0|Parametername|happiness_level|dizzyness_level1|LinkedDOP|happiness_level|dizzyness_level

Propertiesof3.positiveresponseparameterhappiness_levelhavechanged|Property|OldValue|NewValue
----+----------------+-----------------+-----------------0|Parametername|dizzyness_level|happiness_level1|LinkedDOP|dizzyness_level|happiness_levelDetailedchangesofdiagnosticserviceheadstand

Listofrequestparametersforserviceheadstandisnotidentical.|List|Values
----+----------+---------------------0|Oldlist|[sid,id,duration]1|Newlist|[sid,duration]TestingThe included unit tests can be run viapython-munittesttests/test_*.pyThe static type checker can be run viapython3-mmypy--ignore-missing-importsodxtoolsContributingWe welcome any contributions.  If you want to contribute to this
project, please read thecontributing guide.Code of ConductPlease read ourCode of Conductas it is our base for interaction.Provider InformationPlease visithttps://mbition.io/en/home/index.htmlfor information on the provider.Notice: Before you use the program in productive use, please take all necessary precautions,
e.g. testing and verifying the program with regard to your specific use.
The program was tested solely for our own use cases, which might differ from yours.AcknowledgementsThis work includes research of the projectSofDCar(19S21002), which is funded by theGerman Federal Ministry for Economic Affairs and
Climate Action.LicenseThis project is licensed under theMIT LICENSE.