You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add configuration parameters to Bus Terminal definition (low-cut) (#221)
* Add configuration parameters to Bus Terminal definition (low-cut) and use it within CAN and FlexRay
---------
Co-authored-by: Benedikt Menne <[email protected]>
Co-authored-by: Klaus Schuch <[email protected]>
Copy file name to clipboardExpand all lines: docs/3____physical_signal_abstraction.adoc
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,17 +69,16 @@ This section defines terminals for physical signal abstraction or "high cut".
69
69
70
70
==== Bus Terminal [[high-cut-bus-terminal,Bus Terminal]]
71
71
Each network connected to the FMU must be described in `icons/terminalsAndIcons.xml` as a `<Terminal>` element of `<fmiTerminalsAndIcons><Terminals>` that wraps all <<high-cut-frame-terminal,frame terminals>>.
72
-
The attribute `name` of the `<Terminal>` must match the root name of its <<high-cut-network-description-files>> if it exists
72
+
The attribute `name` of the `<Terminal>` element must match the root name of its <<high-cut-network-description-files>> if it exists
73
73
_[e.g., `Powertrain`, if the file is `/extra/org.fmi-standard.fmi-ls-bus/Powertrain.dbc`]_.
74
-
In any case, the attribute `name` of the `<Terminal>` must be consistent with the `BusName` component of all its corresponding signal, frame and Clock variables.
74
+
In any case, the attribute `name` of the `<Terminal>` element must be consistent with the `BusName` component of all its corresponding signal, frame and Clock variables.
75
75
76
76
Attribute definitions::
77
77
* `terminalKind` must be `org.fmi-ls-bus.network-terminal`.
78
78
* `matchingRule` must be `bus`.
79
79
* `name` is the network name, e.g., `Powertrain`, see <<high-cut-example, example>> and constraints above.
80
80
81
81
Element definitions::
82
-
* There must be no `<TerminalStreamMemberVariable>` element.
83
82
* There must be one `<Terminal>` element per network frame described in the <<high-cut-network-description-files>>, if their signal and Clock variables are present in the `modelDescription.xml`.
84
83
85
84
Annotation element::
@@ -97,7 +96,6 @@ Attribute definitions::
97
96
* `name` must match the frame name as defined in the <<high-cut-network-description-files>> in `/extra/org.fmi-standard.fmi-ls-bus`.
98
97
99
98
Element definitions::
100
-
* There must be no `<TerminalStreamMemberVariable>` element.
101
99
* There must be one <<high-cut-pdu-terminal>> element per PDU of this frame.
102
100
* There must be one `<TerminalMemberVariable>` for the Clock this frame is connected to.
103
101
The `memberName` of this variable must be `TransmissionClock`.
@@ -114,8 +112,6 @@ Attribute definitions::
114
112
For network types not natively referencing a "PDU", like CAN, a synthetic PDU with the same name as its frame is inserted.
115
113
116
114
Element definitions::
117
-
* There must be no `<TerminalStreamMemberVariable>` element.
118
-
* There must be no `<Terminal>` element.
119
115
* There must be one `<TerminalMemberVariable>` per <<high-cut-terminal-member-variable-for-signals,signal>> of this PDU.
120
116
121
117
All <<high-cut-terminal-member-variable-for-signals,`TerminalMemberVariables`>> must have the same `causality` of either `input` or `output`.
@@ -169,7 +165,7 @@ The `modelDescription.xml` excerpt listed below shows which variables would exis
The following file shows the `<Terminal>` definition representing the network and frame structure defined with `Powertrain.dbc` above.
168
+
The following file shows the <<high-cut-bus-terminal,Bus Terminal>> definition representing the network and frame structure defined with `Powertrain.dbc` above.
Copy file name to clipboardExpand all lines: docs/4_4_1_can.adoc
+45-34Lines changed: 45 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@ The ID must be considered here as a purely numerical value.
169
169
This means that there is no need for separate segmentation between the 11-bit base CAN identifier and an 18-bit CAN identifier extension information that is known from the CAN protocol.
170
170
Additional information such as Ide is also not part of the ID, but is treated separately.
171
171
| Ide | 1 byte | Specified whether the ID should be transmitted as standard (11-bit) or extended (29-bit) message identifier.
172
-
For specification the boolean values `TRUE` and `FALSE` (see <<table-boolean-value-kinds>>) shall be used.
172
+
For specification the boolean values `TRUE` and `FALSE` (see <<table-boolean-value-kinds>>) shall be used.
173
173
| Rtr | 1 byte | Specifies whether the given frame represents a Remote Transmission Request frame.
174
174
For specification the boolean values `TRUE` and `FALSE` (see <<table-boolean-value-kinds>>) shall be used.
175
175
| Data Length | 2 byte | Specifies the length of the Data argument in bytes.
@@ -180,7 +180,7 @@ h|Behavior
180
180
3+|The <<low-cut-can-transmit-operation, `CAN Transmit`>> operation shall be provided by Network FMUs to initiate the transmission of a CAN frame.
181
181
In case of directly connected Network FMUs (see <<common-concepts-direct-communication>>), the FMU importer forwards the operation directly to the receiving Network FMUs.
182
182
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.
183
-
Depending on the simulation details, the Bus Simulation might response with a <<low-cut-can-confirm-operation, `Confirm`>>, <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>>, <<low-cut-can-bus-error-operation, `Bus Error`>> or <<low-cut-can-format-error-operation, `Format Error`>> operation.
183
+
Depending on the simulation details, the Bus Simulation might respond with a <<low-cut-can-confirm-operation, `Confirm`>>, <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>>, <<low-cut-can-bus-error-operation, `Bus Error`>> or <<low-cut-can-format-error-operation, `Format Error`>> operation.
184
184
Depending on the <<low-cut-can-status-operation, status>> of the specified Network FMU further restrictions for <<low-cut-can-transmit-operation, `CAN Transmit`>> operations <<table-can-status-values, exist>>.
185
185
186
186
|====
@@ -274,9 +274,9 @@ The following applies for this operation: `Length = 12`.
274
274
|The ID of the confirmed CAN message.
275
275
276
276
h|Behavior
277
-
3+|The specified operation shall be produced by the Bus Simulation and consumed by Network FMUs.
278
-
If the structural parameter <<low-cut-can-bus-notification-parameter, `org.fmi_standard.fmi_ls_bus.Can_BusNotifications`>> of a Network FMU is set to `false`, the Network FMU does not wait for any responses from a Bus Simulation, i.e., potentially received <<low-cut-can-confirm-operation, `Confirm`>> operations are discarded by the Network FMU.
279
-
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>>.
277
+
3+|This operation shall be produced by the Bus Simulation and consumed by Network FMUs. +
278
+
Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `fmi3True` might wait for this operation.
279
+
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>>.
280
280
281
281
|====
282
282
@@ -316,8 +316,8 @@ h|Behavior
316
316
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.
317
317
In such case, the Bus Simulation has to decide which <<low-cut-can-transmit-operation, `Transmit`>> operation should be processed first.
318
318
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.
319
-
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.
320
-
If the structural parameter <<low-cut-can-bus-notification-parameter, `org.fmi_standard.fmi_ls_bus.Can_BusNotifications`>> of a Network FMU is set to `false`, the Network FMU does not wait for any responses from a Bus Simulation, i.e., potentially received <<low-cut-can-arbitration-lost-operation, `Arbitration Lost`>> operations are discarded by the Network FMU.
319
+
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. +
320
+
Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `fmi3True` might wait for this operation and respond accordingly.
321
321
322
322
|====
323
323
@@ -363,14 +363,15 @@ For specification the boolean values `PRIMARY_ERROR_FLAG` and `SECONDARY_ERROR_F
363
363
For specification the boolean values `TRUE` and `FALSE` (see <<table-boolean-value-kinds>>) shall be used.
364
364
365
365
h|Behavior
366
-
3+|While transmitting CAN frames, various kinds of bus error may happen.
366
+
3+|When transmitting CAN frames, various kinds of bus error may happen.
367
367
A Bus Simulation can simulate such errors by providing <<low-cut-can-bus-error-operation, `Bus Error`>> operations to the Network FMUs.
368
368
Based on consumed <<low-cut-can-bus-error-operation, `Bus Error`>> operations, Network FMUs shall maintain an internal CAN node state (see <<low-cut-can-error-handling>>).
369
369
To determine the CAN node state properly, Network FMUs need the information about their role at the time when the simulated error happened.
370
370
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.
371
371
For a Network FMU considered to be the one detecting the error first, the argument `Error Flag = PRIMARY_ERROR_FLAG` shall be set.
372
-
The arguments `Is Sender = TRUE` and `Error Flag = PRIMARY_ERROR_FLAG` must only be set once per simulated error.
373
-
If the structural parameter <<low-cut-can-bus-notification-parameter, `org.fmi_standard.fmi_ls_bus.Can_BusNotifications`>> of a Network FMU is set to `false`, the Network FMU does not wait for any responses from a Bus Simulation, i.e., potentially received <<low-cut-can-bus-error-operation, `Bus Error`>> operations are discarded by the Network FMU.
372
+
The arguments `Is Sender = TRUE` and `Error Flag = PRIMARY_ERROR_FLAG` must only be set once per simulated error. +
373
+
Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `fmi3True` might wait for this operation and respond accordingly.
374
+
374
375
|====
375
376
376
377
The following Error Codes are specified:
@@ -613,35 +614,45 @@ If a Network FMU does not support wake up, this operation can be ignored on the
Using structural parameters, FMUs can be parameterized according to importer specifications.
617
-
This chapter specifies the structural parameters that each CAN-specific Network FMU shall provide.
617
+
This chapter defines parameters that Network FMU might provide to configure CAN-specific behavior.
618
618
619
619
====== Bus Notification Parameter [[low-cut-can-bus-notification-parameter]]
620
620
For a detailed simulation, the CAN bus behavior regarding acknowledgment, bus errors and arbitration losses must be considered.
621
621
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.
622
622
623
623
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.
624
-
Therefore, the <<low-cut-can-bus-notification-parameter, `org.fmi_standard.fmi_ls_bus.Can_BusNotifications`>> parameter is introduced.
625
-
If the value of the 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").
626
-
The default value shall be `false` to allow the Network FMU to be run natively in each simulation scenario.
627
-
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, `org.fmi_standard.fmi_ls_bus.Can_BusNotifications`>> parameter shall be set to `true`. +
628
-
_[This does not necessarily mean the FMU must fully support CAN error handling or sophisticated arbitration mechanisms._
629
-
_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.]_
630
-
631
-
.FMU parameter for the configuration of bus notifications.
632
-
[[figure-fmu-bus-notifications-parameter]]
624
+
Therefore, a parameter with `memberName = "BusNotifications"` can be added within the CAN-specific <<low-cut-configuration-terminal,Configuration Terminal>>. +
625
+
If a Network FMU supports bus notifications, the <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter shall be exposed.
626
+
The default value of this parameter shall be `false`. +
627
+
_[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.]_
628
+
629
+
Only Network FMUs with the corresponding optionally exposed <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter set to `fmi3True` 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; otherwise Network FMUs must not wait ("fire-and-forget").
630
+
Even if the Network FMU does not expect bus notifications, i.e. <<low-cut-can-bus-notification-parameter, `BusNotifications`>> variable was not set to `fmi3True`, but receives them, it shall ignore them, i.e. it shall not report warnings or errors.
631
+
632
+
_[Note that the bus notification parameter just informs the Network FMU if it can expect to receive notification operations or not.
633
+
The parameter doesn't define in any way on how to react upon receiving notification operations.]_
634
+
635
+
.Parameter to configure bus notifications within a CAN Bus Terminal of Network FMUs.
636
+
[[figure-fmu--can-bus-notifications-parameter]]
633
637
----
634
-
org.fmi_standard.fmi_ls_bus.Can_BusNotifications
635
-
Description: "Specifies whether the respective Network FMU can rely on a Confirm,
636
-
Bus Error or Arbitration Lost operation after sending a message."
637
-
Type: Boolean
638
-
Causality: structuralParameter
639
-
Variability: fixed
640
-
Start: "false"
638
+
memberName: BusNotifications
639
+
type: Boolean
640
+
causality: parameter
641
+
variability: fixed
642
+
start: false
641
643
----
642
644
643
-
This structural parameter is mandatory for Network FMUs only.
644
-
A Bus Simulation (FMU) does not require this structural parameter.
645
+
A Bus Simulation FMU shall indicate via a variable with `memberName = "BusNotifications"` within the CAN-specific <<low-cut-configuration-terminal,Configuration Terminal>> whether it provides bus notifications or not.
646
+
If the provision of bus notifications can be configured (e.g., via a structural parameter), the attributes of the <<low-cut-can-bus-notification-parameter, `BusNotifications`>> variable shall contain `causality = "calculatedParameter"` and `variability = "fixed"`; or `causality = "output"` and `variability = "constant"` otherwise.
647
+
648
+
.Parameter to configure bus notifications within a CAN Bus Terminal of the Bus Simulation.
===== Configuration of Bus Simulation [[low-cut-can-configuration-of-bus-simulation]]
647
658
The configuration of the Bus Simulation is done by the Network FMUs itself.
@@ -666,11 +677,11 @@ The <<low-cut-can-transmit-operation, `Transmit`>> operation represents the send
666
677
With appropriate options, relevant functionalities can be configured and used on a network abstraction level (e.g., Virtual CAN network ID for CAN XL or Bit Rate Switch for CAN FD).
667
678
In the real world, flawlessly transmitted CAN frames will be acknowledged by at least one receiver CAN node.
668
679
To simulate this behavior, the <<low-cut-can-confirm-operation, `Confirm`>> operations are introduced.
669
-
In addition, the structural parameter <<low-cut-can-bus-notification-parameter, `org.fmi_standard.fmi_ls_bus.Can_BusNotifications`>> is defined to support lightweight bus simulations and <<common-concepts-direct-communication, directly connected Network FMUs>>.
680
+
In addition, the <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter is defined to support lightweight bus simulations and <<common-concepts-direct-communication, directly connected Network FMUs>>.
670
681
671
-
If <<low-cut-can-bus-notification-parameter, `org.fmi_standard.fmi_ls_bus.Can_BusNotifications`>> is set to `false` (default), then Network FMUs must not rely on receiving <<low-cut-can-confirm-operation, `Confirm`>> operations.
682
+
If <<low-cut-can-bus-notification-parameter, `BusNotifications`>> is `false` (default), then Network FMUs must not rely on receiving <<low-cut-can-confirm-operation, `Confirm`>> operations for the specified Bus Terminal.
672
683
In this case, the bus simulation is idealized and takes place in a "fire-and-forget" manner.
673
-
If a specified Network FMU is depending on <<low-cut-can-confirm-operation, `Confirm`>> operations and <<low-cut-can-bus-notification-parameter, `org.fmi_standard.fmi_ls_bus.Can_BusNotifications`>> is set to `false`, the self confirmation shall be realized internally within the respective Network FMU.
684
+
If a specified Network FMU is depending on <<low-cut-can-confirm-operation, `Confirm`>> operations and <<low-cut-can-bus-notification-parameter, `BusNotifications`>> is `false`, the self confirmation shall be realized internally within the respective Network FMU for the specified Bus Terminal.
674
685
675
686
<<#figure-can-direct-communication>> illustrates this communication, whereby FMU 1 transmits network data to FMU 2.
676
687
Subsequently, FMU 1 self-confirms the transmission internally.
For a detailed simulation, the Bus Simulation has to support <<low-cut-can-confirm-operation, `Confirm`>> operations.
683
-
In this case, the <<low-cut-can-bus-notification-parameter, `org.fmi_standard.fmi_ls_bus.Can_BusNotifications`>> parameter of the Network FMUs can be set to `true` as Network FMUs can rely on receiving <<low-cut-can-confirm-operation, `Confirm`>> operations.
694
+
In this case, the <<low-cut-can-bus-notification-parameter, `BusNotifications`>> parameter of the Network FMUs can be set to `fmi3True` as Network FMUs can rely on receiving <<low-cut-can-confirm-operation, `Confirm`>> operations for the specified Bus Terminal.
684
695
685
696
The following <<#figure-can-confirmation-with-bus-simulation-fmu>> illustrates the behavior, whereby FMU 1 transmits network data to FMU 2 via a Bus Simulation.
0 commit comments