Extensions.DiagComPlus.ComChannelStates
Classification
Name | ComChannelStates |
Short Description | Characteristics of values that specify the status of a diag:ComChannel |
Class | Simple Data Type |
Base Data Type | SimpleType |
Default Value | COMMUNICATION |
Provide a Literal | Yes |
SpecifiedBy | ISO 13209-4 |
Standard Compliant | Yes |
Description
ComChannelState is an enumeration type describing the state of a diag:ComChannel.
The list of allowed enumeration values is defined as follows:
Value | Literal | Description |
COMMUNICATION | @ComChannelState:COMMUNICATION | diag:ComChannel status: communication already started. In case of an MCD base system, this means that the logical link is online, communication is already established, a DiagComPrimitive is executing. |
CREATED | @ComChannelState:CREATED | diag:ComChannel status: created. In case of an MCD base system, this means that the logical link is created. |
OFFLINE | @ComChannelState:OFFLINE | diag:ComChannel status: offline.
In case of an MCD base system, this means that the logical link is offline. No communication has been established. |
ONLINE | @ComChannelState:ONLINE | diag:ComChannel status: online
In case of an MCD base system, this means that the logical link is online, communication is already established, no DiagComPrimitive is executing. |
Order Relation
ComChannelState values may occur as operands of comparisons (cf. Part 2 of ISO 13209, relational operations). For this case, the following order relation shall apply:
CREATED > OFFLINE > ONLINE > COMMUNICATION
Literal
The syntax for Literals for complex data types will be used, where the member value is one of the values in the list.
@ComChannelStates:CREATED|OFFLINE|ONLINE|COMMUNICATION
This optional element sets the hard-coded initialisation value of the identifier at declaration time.
This attribute will contain one of the values defined in the ComChannelStates enumeration.
Important: If the ComChannelState declaration is not explicitly initialized (omitted <init> element), the default value shall be OFFLINE. |
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 ComChannelStates enumeration (smallest index is 0) | Integer val = ToInteger(@ComChannelState:COMMUNICATION); // Returns 0 |
ToFloat | Undefined (should not be used) | |
ToString | Returns the name of the enumeration value | String s = ToString(@ComChannelState:OFFLINE); // Returns "OFFLINE" |
ToByteField | Undefined (should not be used) |
Sample
DiagComPlus.ComChannelState ComChannelState1 = @ComChannelState:COMMUNICATION;