This chapter describes the Layered Standard Bus Protocol for LIN. The LIN chapter is currently only a preview and will be further adapted during the development of this standard.
To simulate LIN buses, LIN-specific operations are specified based on the Layered Standard Bus Protocol. Overall, the following groups of operations exists:
-
Transmit: This group of operations is used to simulate a frame transmission. There are three specific operations that represent the different communication options between a LIN Master and one or more LIN Slaves.
-
Error: This group of operations is used for protocol format errors and to simulate bus failures. For example, the failure of a transmission can be indicated.
-
Configuration: This operation enables the configuration of bus-specific parameters and options that are required to simulate the bus behavior properly. For example, it allows the specification of the baud rate.
-
Status: This operation is used by Networked FMUs to inform Bus Simulations about the internal state (Power Off/Initialization/Operation/Sleep) which concerns the reaction on bus errors.
-
Wake up: LIN supports wake up and sleep scenarios. Normally there are two ways to wake up from sleep mode: a local wake up on a specified wake-up pin, or a wake-up on the LIN bus via a LIN specific wake-up pulse. This operation is used to simulate triggering a wake-up from bus side.
The following table gives a detailed overview of the available operations. It shows all operations and the arguments they contain.
Operation Name |
Operation Content |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
OP Code |
Length |
Specific Content |
||||||||
Format Error |
0x00 |
:= 5 + n |
Data |
|||||||
Header |
0x10 |
:= 7 |
PID |
Response Data Length |
||||||
Response |
0x11 |
:= 8 + DL |
PID |
Response Error |
DL |
Data |
||||
Header Response |
0x12 |
:= 7 + DL |
PID |
DL |
Data |
|||||
Bus Error |
0x20 |
:= 12 |
ID |
Error Code |
||||||
Configuration |
0x30 |
<Length> |
Kind |
Dynamic Part |
||||||
Status |
0x40 |
:= 6 |
Status |
|||||||
Wakeup |
0x41 |
:= 5 |
--- |
This section defines the allowed operations for LIN. The following tables provide an overview of all operations and specifies the position and length of the corresponding arguments, as well as the respective flow direction.
There are three types of Transmit
operations, each representing the transmission of a LIN header, a response and a combination of a header and response.
Name |
Header |
||
---|---|---|---|
Description |
Represents an operation for the transmission of a LIN header from a LIN Master to LIN slaves. |
||
OP Code [hex] |
0x10 |
||
Content |
Argument |
Length |
Description |
OP Code |
1 byte |
Contains the OP Code of the specified operation. For this operation the OP Code always has the value 0x10. |
|
Length |
4 bytes |
Defines the cumulative length of all arguments in bytes.
For this operation always applies: |
|
PID |
1 byte |
The specified protected ID (PID) of the LIN message. The maximum length of a PID is 8-bit. |
|
Response Data Length |
1 byte |
The size of the response in bytes. |
|
Behavior |
The Header operation shall be provided by Network FMUs to initiate the transmission of a LIN header.
In case of direct connected Network FMUs (see [common-concepts-direct-communication]), the FMU importer forwards the operation directly to the receiving Network FMUs.
If a Bus Simulation is involved (see [common-concepts-composition-with-dedicated-bus-simulation-fmu] and [common-concepts-importer-with-integrated-bus-simulation]), the FMU importer forwards the operation initially to the Bus Simulation, where the operation is distributed with respect to the simulated bus behavior.
Depending on the simulation details, the Bus Simulation might respond with a |
Name |
Response |
||
---|---|---|---|
Description |
Represents an operation for the transmission of a LIN response from a LIN Slave to the LIN Master. |
||
OP Code [hex] |
0x11 |
||
Content |
Argument |
Length |
Description |
OP Code |
1 byte |
Contains the OP Code of the specified operation. For this operation the OP Code always has the value 0x11. |
|
Length |
4 bytes |
Defines the cumulative length of all arguments in bytes.
For this operation always applies: |
|
PID |
1 byte |
The specified protected ID (PID) of the LIN message. The maximum length of a PID is 8-bit. |
|
Response Error |
1 byte |
Represents the Response Error field of a LIN frame.
For specification the boolean values |
|
Data Length |
1 byte |
Specifies the length of the Data argument in bytes. |
|
Data |
n bytes |
Stores the given frame data to transfer, whereby the valid length of the data depends on the LIN Format. |
|
Behavior |
The Response operation shall be provided by Network FMUs to initiate a response to a given LIN header.
In case of direct connected Network FMUs (see [common-concepts-direct-communication]), the FMU importer forwards the operation directly to the receiving Network FMUs.
If a Bus Simulation is involved (see [common-concepts-composition-with-dedicated-bus-simulation-fmu] and [common-concepts-importer-with-integrated-bus-simulation]), the FMU importer forwards the operation initially to the Bus Simulation, where the operation is distributed with respect to the simulated bus behavior.
Depending on the simulation details, the Bus Simulation might responsd with a |
Name |
Header Response |
||
---|---|---|---|
Description |
Represents an operation for the transmission of a LIN header and response from a LIN Master to LIN slaves. |
||
OP Code [hex] |
0x12 |
||
Content |
Argument |
Length |
Description |
OP Code |
1 byte |
Contains the OP Code of the specified operation. For this operation the OP Code always has the value 0x12. |
|
Length |
4 bytes |
Defines the cumulative length of all arguments in bytes.
For this operation always applies: |
|
PID |
1 byte |
The specified protected ID (PID) of the LIN message. The maximum length of a PID is 8-bit. |
|
Data Length |
1 byte |
Specifies the length of the Data argument in bytes. |
|
Data |
n bytes |
Stores the given frame data to transfer, whereby the valid length of the data depends on the LIN Format. |
|
Behavior |
The Header Response operation shall be provided by Network FMUs to initiate the transmission of a LIN frame that contains the specified header and response.
In case of direct connected Network FMUs (see [common-concepts-direct-communication]), the FMU importer forwards the operation directly to the receiving Network FMUs.
If a Bus Simulation is involved (see [common-concepts-composition-with-dedicated-bus-simulation-fmu] and [common-concepts-importer-with-integrated-bus-simulation]), the FMU importer forwards the operation initially to the Bus Simulation, where the operation is distributed with respect to the simulated bus behavior.
Depending on the simulation details, the Bus Simulation might respond with a |
Represents a format error that indicates a syntax or content error of receiving operations.
See Format Error
for definition.
The Bus Error
represents special bus communication errors, which are delivered to the LIN Master node in the network.
Name |
Bus Error |
||
---|---|---|---|
Description |
Represents an operation for bus communication error handling. |
||
OP Code [hex] |
0x20 |
||
Content |
Argument |
Length |
Description |
OP Code |
1 byte |
Contains the OP Code of the specified operation. For this operation the OP Code always has the value 0x20. |
|
Length |
4 bytes |
Defines the cumulative length of all arguments in bytes.
For this operation always applies: |
|
ID |
4 bytes |
The specified ID of the LIN message which triggers the error. |
|
Error Code |
1 byte |
The specified error code, basing on the table below. |
|
Behavior |
The specified operation shall be produced by the Bus Simulation and consumed by Network FMUs.
An Error operation is always a reaction from the Bus Simulation to a |
The following codes are allowed to use as Error Code:
State |
Error Code |
Description |
---|---|---|
BIT_ERROR |
0x01 |
Represents a bit error.
The given error is always related to a specific |
CHECKSUM_ERROR |
0x02 |
Represents a CRC error.
The error can occur during a collision of multiple response frames when Event-Triggered-Frames are used.
The given error is always related to a specific |
IDENTIFIER_PARITY_ERROR |
0x03 |
Represents an Identifier Parity Error.
The error can occur during a collision of multiple LIN headers.
The given error is always related to a specific |
SLAVE_NOT_RESPONDING_ERROR |
0x04 |
Represents a Slave Not Responding Error.
The error can occur if LIN Slaves does not respond to a specified LIN header.
The given error is always related to a specific |
SYNCH_FIELD_ERROR |
0x05 |
Represents an Inconsistent-Synch Field Error.
The given error is always related to a specific |
PHYSICAL_BUS_ERROR |
0x06 |
Represents a Physical Bus Error.
The given error is always related to a specific |
The Configuration
operation allows Network FMUs the configuration of the Bus Simulation with parameters like baud rate information and further options.
The following information are included within this operation:
Name |
Configuration |
||||
---|---|---|---|---|---|
Description |
Represents an operation for the configuration of a Bus Simulation. In detail the configuration of a LIN baud rate is possible. Also the configuration of further options, like LIN Master or LIN Slave representation, is supported by this operation. |
||||
OP Code [hex] |
0x30 |
||||
Content |
Argument |
Length |
Description |
||
OP Code |
1 byte |
Contains the OP Code (0x30) of the operation. |
|||
Length |
4 bytes |
Defines the cumulative length of all arguments in bytes.
The following applies for this operation: |
|||
Parameter Type |
1 byte |
Defines the current configuration parameter.
Note that only one parameter can be set per |
|||
Parameters |
|||||
LIN_BAUDRATE |
Baud Rate |
4 byte |
The specified baud rate value to configure, whereby the specified ranges are defined by the LIN standard. The required unit for the baud rate value is bit/s. |
||
LIN_NODE_DEFINITION |
Node Definition |
1 byte |
Configures the required node type (Master or Slave) within a Bus Simulation.
Possible values are: |
||
Behavior |
The specified operation shall be produced by a Network FMU and consumed by the Bus Simulation.
The operation shall not be routed to other Network FMUs by the Bus Simulation.
A Network FMU shall ignore this operation on consumer side.
The configuration shall be completed by a specified Network FMU before it produces any |
The following Kind values are allowed to be used:
Kind |
Value |
Description |
---|---|---|
LIN_BAUDRATE |
0x01 |
This code indicates that a LIN baud rate should be configured for the Bus Simulation. |
LIN_NODE_DEFINITION |
0x02 |
This code configures the specified node type (Master or Slave) within a Bus Simulation. |
The following values for the Arbitration Lost Behavior option are defined:
Node Definition |
Value |
Description |
---|---|---|
LIN_MASTER |
0x01 |
Configuration of a LIN Master node within a specified Bus Simulation. |
LIN_SLAVE |
0x02 |
Configuration of a LIN Slave node within a specified Bus Simulation. |
By using the Status
operation a Network FMU can communicate the current LIN node state of the simulated LIN Controller within the Network FMU to the Bus Simulation.
The following information are included within this operation:
Name |
Status |
||
---|---|---|---|
Description |
Represents an operation for status handling. |
||
OP Code [hex] |
0x40 |
||
Content |
Argument |
Length |
Description |
OP Code |
1 byte |
Contains the OP Code of the specified operation. For this operation the OP Code always has the value 0x40. |
|
Length |
4 bytes |
Defines the cumulative length of all arguments in bytes.
For this operation always applies: |
|
Status |
1 byte |
The specified status code, basing on the table below. |
|
Behavior |
The specified operation shall be produced by Network FMUs and consumed by the Bus Simulation. The operation shall not be routed to other Network FMUs by the Bus Simulation. A Network FMU shall ignore this operation on the consumer side. A Network FMU shall report its status to the Bus Simulation after it changes. |
The following status values are allowed to use:
Kind |
Value |
Description |
---|---|---|
POWER_OFF |
0x01 |
Indicates that a simulated LIN controller within the Network FMU has currently the LIN node state: Power Off. |
INITIALIZATION |
0x02 |
Indicates that a simulated LIN controller within the Network FMU has currently the LIN node state: Initialization. |
OPERATION |
0x03 |
Indicates that a simulated LIN controller within the Network FMU has currently the LIN node state: Operation. |
SLEEP |
0x04 |
Indicates that a simulated LIN controller within the Network FMU has currently the LIN node state: Sleep. |
By using the Wakeup
operation the underlying Bus Simulation can trigger a bus-specific wake-up.
Name |
Wakeup |
||
---|---|---|---|
Description |
Represents an operation for triggering a bus-specific wake-up. |
||
OP Code [hex] |
0x41 |
||
Content |
Argument |
Length |
Description |
OP Code |
1 byte |
Contains the OP Code of the specified operation. For this operation the OP Code always has the value 0x41. |
|
Length |
4 bytes |
Defines the cumulative length of all arguments in bytes.
For this operation always applies: |
|
Behavior |
The specified operation shall be produced by a Network FMU and distributed to all participants, except the wake-up initiator, of the bus by using the Bus Simulation. If a Network FMU does not support wake-up this operation can be ignored on consumer side. |
The configuration of the Bus Simulation is done by the Network FMUs itself.
For this purpose, the Configuration
operation provides several configuration parameters.
Configuration
operations can be produced multiple times during the runtime of a Network FMU.
Because the Bus Simulation shall choose a default behavior, it might be useful in several scenarios that Network FMUs finish configuration before the production of Transmit
operations.
In order to calculate the time required for the transmission of a bus message, it is necessary to inform the Bus Simulation about the specified baud rate from a Network FMU.
This baud rate information can be configured by using LIN_BAUDRATE
configuration kind of the Configuration
operation.
If the baud rate information is not adjusted by a specified Network FMU, the Bus Simulation shall choose a default behavior by itself.
By using the LIN_NODE_DEFINITION
kind of Configuration
operation, the specified node type LIN_MASTER
or LIN_SLAVE
needs to be adjusted.
This configuration must be done before the first exchange of Transmit
operations.
A Bus Simulation should stop as soon as more than one LIN Master is configured in a network.
This standard supports wake up and sleep for the LIN bus, whereby only the bus-specific parts are taken into account.
This means that the realization of local virtual ECU wake-up and sleeping processes are internal parts of the respective FMU, which is not covered by this document.
Because entering sleep state is a virtual ECU internal process always within LIN bus, this can be ignored.
Also, the virtual ECU local wake-up process is ignored as well.
The LIN-specific wake-up pulse can be simulated by using the Wakeup
operation.
A Wakeup
operation is initiated by one Network FMU and shall be distributed to all participants of the bus,except the wake-up initiator, by the Bus Simulation.