Skip to content

Commit

Permalink
Rewrite text regarding BusNotifications parameter for CAN
Browse files Browse the repository at this point in the history
  • Loading branch information
klausschuch committed Dec 19, 2024
1 parent 60d973c commit 7605115
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions docs/4_4_1_can.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ The following applies for this operation: `Length = 12`.
|The ID of the confirmed CAN message.

h|Behavior
3+|This operation shall be produced by the Bus Simulation and consumed by Network FMUs.
3+|This operation shall be produced by the Bus Simulation and consumed by Network FMUs. +
Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `true` might wait for this operation.
A Network FMU shall ignore this operation if it doesn't wait for this operation.
Depending on the <<low-cut-can-status-operation, status>> of the specified Network FMU further restrictions for <<low-cut-can-confirm-operation, `Confirm`>> operations <<table-can-status-values, exist>>.
A Network FMU shall ignore this operation if it doesn't wait for this operation. +
Depending on the <<low-cut-can-status-operation, status>> of the receiving Network FMU further restrictions for <<low-cut-can-confirm-operation, `Confirm`>> operations <<table-can-status-values, exist>>.

|====

Expand Down Expand Up @@ -311,9 +311,9 @@ h|Behavior
3+|During simulation, several <<low-cut-can-transmit-operation, `Transmit`>> operations can be sent by Network FMUs to a Bus Simulation at the same time.
In such case, the Bus Simulation has to decide which <<low-cut-can-transmit-operation, `Transmit`>> operation should be processed first.
Depending on the configuration (see the `Arbitration Lost Behavior` argument of the <<low-cut-can-configuration-operation, `Configuration`>> operation), the deferred <<low-cut-can-transmit-operation, `Transmit`>> operations shall either be buffered or they shall be discarded and the <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>> operation shall be sent back to the respective Network FMUs.
A Network FMU receiving the <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>> operation can decide to provide the <<low-cut-can-transmit-operation, `Transmit`>> operation again or e.g., to raise an internal transmit timeout failure after a while.
Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `true` might wait for this operation.
A Network FMU shall ignore this operation if it doesn't wait for this operation.
A Network FMU receiving the <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>> operation can decide to provide the <<low-cut-can-transmit-operation, `Transmit`>> operation again or e.g., to raise an internal transmit timeout failure after a while. +
Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `true` might wait for this operation and respond accordingly.
A Network FMU shall ignore this operation if it doesn't wait for a response operation.

|====

Expand Down Expand Up @@ -365,9 +365,9 @@ Based on consumed <<low-cut-can-bus-error-operation, `Bus Error`>> operations, N
To determine the CAN node state properly, Network FMUs need the information about their role at the time when the simulated error happened.
For a Network FMU that initiated the <<low-cut-can-transmit-operation, `Transmit`>> operation, the argument `Is Sender` shall be set to `TRUE` in the corresponding <<low-cut-can-bus-error-operation, `Bus Error`>> operation.
For a Network FMU considered to be the one detecting the error first, the argument `Error Flag = PRIMARY_ERROR_FLAG` shall be set.
The arguments `Is Sender = TRUE` and `Error Flag = PRIMARY_ERROR_FLAG` must only be set once per simulated error.
Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `true` might wait for this operation.
A Network FMU shall ignore this operation if it doesn't wait for this operation.
The arguments `Is Sender = TRUE` and `Error Flag = PRIMARY_ERROR_FLAG` must only be set once per simulated error. +
Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `true` might wait for this operation and respond accordingly.
A Network FMU shall ignore this operation if it doesn't wait for a response operation.

|====

Expand Down Expand Up @@ -487,7 +487,6 @@ A Network FMU shall ignore this operation on the consumer side.
<<low-cut-can-configuration-operation, `Configuration`>> operations can be produced multiple times during the runtime of a Network FMU.
In context of CAN FD, also a CAN baud rate should be configured by using `Parameter Type = CAN_BAUDRATE`.
If configuration parameters are not adjusted by a Network FMU, the Bus Simulation shall choose a default behavior by itself.

|====

The following configuration parameters are defined:
Expand Down Expand Up @@ -612,21 +611,19 @@ If a Network FMU does not support wake up, this operation can be ignored on the
|====

===== Network Parameters [[low-cut-can-network-parameters]]
By using configuration parameters on Bus Terminal level, Network FMUs can be parameterized by the user or the Bus Simulation (by using e.g. the parameter propagation mechanism).
This chapter specifies the configuration parameters that each CAN-specific Network FMU shall provide.
This chapter defines parameters that Network FMU might provide to configure CAN-specific behavior.

====== Bus Notification Parameter [[low-cut-can-bus-notification-parameter]]
For a detailed simulation, the CAN bus behavior regarding acknowledgment, bus errors and arbitration losses must be considered.
A Bus Simulation can simulate these effects by sending bus notifications in terms of <<low-cut-can-confirm-operation, `Confirm-`>>, <<low-cut-can-bus-error-operation, `Bus Error-`>> and <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>> operations to the Network FMUs.

However, in scenarios where Network FMUs are connected directly to each other, or where the Bus Simulation does not simulate such effects, it must be possible to configure the Network FMU such that it does not wait for any response after a <<low-cut-can-transmit-operation, `Transmit`>> operation.
Therefore, the <<low-cut-can-bus-notification-parameter, `BusNotifications`>> configuration parameter is introduced for each CAN Bus Terminal.
If a Network FMU is not supporting bus notifications at all, the configuration parameter shall be omitted.
If a Network FMU supports bus notifications, the configuration parameter shall be defined with a default value set to `false` to allow the Network FMU to be run natively in each simulation scenario.
If the value of the configuration parameter is set to `false`, the Network FMU must not wait for any response after a <<low-cut-can-transmit-operation, `Transmit`>> operation ("fire-and-forget").
If the Network FMU shall be configured to handle responses in the form of <<low-cut-can-confirm-operation, `Confirm-`>>, <<low-cut-can-bus-error-operation, `Bus Error-`>> and <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>> operations, the <<low-cut-can-bus-notification-parameter, `BusNotifications`>> configuration parameter shall be set to `true`.
A Network FMU must always be able to handle the case that the Bus Simulation does not provide <<low-cut-can-confirm-operation, `Confirm-`>>, <<low-cut-can-bus-error-operation, `Bus Error-`>> or <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>> operations.
Since a Bus Simulation is allowed to provide bus notification regardless of the <<low-cut-can-bus-notification-parameter, `BusNotifications`>> configuration parameter, Network FMUs must silently ignore such notifications if the value of <<low-cut-can-bus-notification-parameter, `BusNotifications`>> is set to `false` or the parameter is omitted. +
Therefore, a parameter with memberName=<<low-cut-can-bus-notification-parameter, `BusNotifications`>> can be added to a CAN Bus Terminal. +
If a Network FMU supports bus notifications, the <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter shall be exposed.
The default value of this parameter shall be `false`. +
_[The default value `false` allows a simple integration of Network FMUs to simulation scenarios where <<low-cut-can-confirm-operation, `Confirm-`>>, <<low-cut-can-bus-error-operation, `Bus Error-`>> or <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>> operations are not used.]_

Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `true` might wait for <<low-cut-can-confirm-operation, `Confirm-`>>, <<low-cut-can-bus-error-operation, `Bus Error-`>> and <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>> operations and respond accordingly, Network FMUs must not wait otherwise ("fire-and-forget"). +
_[This does not necessarily mean the FMU must fully support CAN error handling or sophisticated arbitration mechanisms._
_A simple Network FMU might also choose to treat Bus Error or Arbitration operations in a simplified manner, e.g., by treating them as a positive confirmation.]_

Expand Down

0 comments on commit 7605115

Please sign in to comment.