Skip to content

Commit

Permalink
improve the docstrings for EnvironmentData and `EnvironmentDataDesc…
Browse files Browse the repository at this point in the history
…ription`

it turns out that these classes are yet another multiplexer mechanism.

Signed-off-by: Andreas Lauser <[email protected]>
Signed-off-by: Gerrit Ecke <[email protected]>
  • Loading branch information
andlaus committed May 7, 2024
1 parent 787a807 commit f81b40b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion odxtools/environmentdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@

@dataclass
class EnvironmentData(BasicStructure):
"""This class represents Environment Data that describes the circumstances in which the error occurred."""
"""This class represents Environment Data that describes the
circumstances in which the error occurred.
This is one of the many multiplexer mechanisms specified by the
ODX standard, because an environment data parameter must only be
used if a DTC parameter has a certain set of values. (In this
sense, it is quite similar to NRC-CONST parameters.)
"""

all_value: Optional[bool]
dtc_values: List[int]
Expand Down
10 changes: 8 additions & 2 deletions odxtools/environmentdatadescription.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@

@dataclass
class EnvironmentDataDescription(ComplexDop):
"""This class represents Environment Data Description, which is a complex DOP
that is used to define the interpretation of environment data."""
"""This class represents environment data descriptions
An environment data description provides a list of all environment
data objects that are potentially applicable to decode a given
response. (If a given environment data object is applicable
depends on the value of the DtcDOP that is associated with it.)
"""

# in ODX 2.0.0, ENV-DATAS seems to be a mandatory
# sub-element of ENV-DATA-DESC, in ODX 2.2 it is not
Expand Down

0 comments on commit f81b40b

Please sign in to comment.