Extensions.DiagCom.ResponseState
Jump to navigation
Jump to search
Classification
Name | ResponseState |
Short Description | State of Response |
Class | Simple Data Type |
Base Data Type | SimpleType |
Default Value | FAILED |
Provide a Literal | Yes |
SpecifiedBy | ISO 13209-3 |
Standard Compliant | Yes |
Description
ResponseState is an enumeration type describing the state of a Response.
The list of allowed enumeration values is defined as follows:
Value | Literal | Description |
FAILED | @ResponseState:FAILED | The ECU failed to answer. |
INVALID | @ResponseState:INVALID | The ECUs returned an invalid response. |
NEGATIVE | @ResponseState:NEGATIVE | The ECUs returned a negative response. |
POSITIVE | @ResponseState:POSITIVE | The ECUs returned a positive response. |
Order Relation
ResponseState values may occur as operands of comparisons. For this case, the following order relation is defined. Started with the lowest value ALL_FAILED = 0:
FAILED < INVALID < NEGATIVE < POSITIVE
Literal
The syntax for Literals for complex data types will be used, where the member value is one of the values in the list.
@ResponseState:FAILED|INVALID|NEGATIVE|POSITIVE
Core Conversion
The following table shows the rules for conversion to another data type:
Conversion | Result | Sample |
ToBoolean | Undefined (should not be used) | |
ToInteger | Returns the index of the value in the ResponseStates enumeration (smallest index is 0) | Integer val = ToInteger(@ResponseState:FAILED); // Returns 0 |
ToFloat | Undefined (should not be used) | |
ToString | Returns the name of the enumeration value | String s = ToString(@ResponseState:FAILED); // Returns "FAILED" |
ToByteField | Undefined (should not be used) |
Sample
DiagCom.ResponseState ResponseStateVariable = @ResponseState:FAILED;