From 29ec7321982b2c0b891cf95c2914b39e19e10614 Mon Sep 17 00:00:00 2001 From: Markus Suevern Date: Fri, 24 Oct 2025 11:38:02 +0200 Subject: [PATCH] Update FlexRay documentation and header to include Slot ID for COLLISION_AVOIDANCE_SYMBOL --- docs/4_4_3_flexray.adoc | 15 +++++++++++---- headers/fmi3LsBusFlexRay.h | 4 +++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/4_4_3_flexray.adoc b/docs/4_4_3_flexray.adoc index fea2c719..7e131d33 100644 --- a/docs/4_4_3_flexray.adoc +++ b/docs/4_4_3_flexray.adoc @@ -106,14 +106,16 @@ h|Length |Symbol |0x50 -|:= 11 + +|:= 13 + (4 bytes) |Cycle ID + (1 byte) |Channel + (1 byte) -6+|Type + +1+|Type + (1 byte) +5+|Slot ID + +(2 byte) |==== @@ -610,7 +612,7 @@ h|Description 3+|Operation representing a symbol transmitted in the FlexRay symbol window. h|OP Code [hex] 3+|0x50 -.6+h|Content h|Argument h|Length h|Description +.7+h|Content h|Argument h|Length h|Description |OP Code |4 bytes |Contains the OP Code (0x50) of the operation. @@ -618,7 +620,7 @@ h|OP Code [hex] |Length |4 bytes |Defines the cumulative length of all arguments in bytes. -The following applies for this operation: `Length = 11`. +The following applies for this operation: `Length = 13`. |Cycle ID |1 byte @@ -633,6 +635,10 @@ If a FlexRay cycle is not yet running (for example when initiating a startup thr |1 byte |The specified symbol type, based on <>. +|Slot ID +|2 byte +|The Slot ID of the startup frame. In case of `COLLISION_AVOIDANCE_SYMBOL`, the slot ID of the startup frame to be sent must be specified. + h|Behavior 3+|The specified operation shall be produced by a Network FMU and distributed to all participants, except the <> operation initiator, of the bus using the Bus Simulation. Depending on the simulation details, the Bus Simulation might respond with a <> operation. @@ -767,6 +773,7 @@ For starting the FlexRay communication, a coldstart Network FMU shall send a <> operation immediately to the other Network FMUs. Network FMUs receiving a `COLLISION_AVOIDANCE_SYMBOL` are not allowed to send the <> operation likewise from this point onwards. The first communication cycle is then started by sending the <> operation. +If more than one Network FMU receives a `COLLISION_AVOIDANCE_SYMBOL` at the same time, only the Network FMU with the lowest startup frame `Slot ID` is allowed to send the `Start Communication` operation afterwards. Network FMUs must synchronize their internal FlexRay clock based on the received <>. .Startup initiated by a coldstart Network FMU. diff --git a/headers/fmi3LsBusFlexRay.h b/headers/fmi3LsBusFlexRay.h index ac67fc4f..27dfb158 100644 --- a/headers/fmi3LsBusFlexRay.h +++ b/headers/fmi3LsBusFlexRay.h @@ -524,10 +524,12 @@ typedef struct fmi3LsBusFlexRayCycleId cycleId; /**< The cycle the symbol is transmitted in. */ fmi3LsBusFlexRayChannel channel; /**< The channel(s) on which the symbol is transmitted. */ fmi3LsBusFlexRaySymbolType type; /**< The type of symbol. */ + fmi3LsBusFlexRaySlotId slotId; /**< The slot ID of the startup-frame in cases of a COLLISION_AVOIDANCE_SYMBOL */ + } fmi3LsBusFlexRayOperationSymbol; #if FMI3_LS_BUS_CHECK_OPERATION_SIZE == 1 -static_assert(sizeof(fmi3LsBusFlexRayOperationSymbol) == (8 + 1 + 1 + 1), +static_assert(sizeof(fmi3LsBusFlexRayOperationSymbol) == (8 + 1 + 1 + 1 + 2), "'fmi3LsBusFlexRayOperationSymbol' does not match the expected data size"); #endif