Skip to content

Commit

Permalink
Remove iteration argument from FlexRay headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Menne authored and Benedikt Menne committed May 17, 2024
1 parent 97e5117 commit 02d041a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 29 deletions.
17 changes: 4 additions & 13 deletions headers/fmi3LsBusFlexRay.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ typedef fmi3UInt8 fmi3LsBusFlexRayCycleId;
*/
typedef fmi3UInt16 fmi3LsBusFlexRaySlotId;

/**
* \brief Data type identifying the number of FlexRay cycle iterations.
*/
typedef fmi3UInt64 fmi3LsBusFlexRayIteration;

/**
* \brief Data type Indicates how many minislots must pass after receiving the Transmit operation in order a Network FMU is allowed to provided the next Transmit operation.
*/
Expand Down Expand Up @@ -359,7 +354,6 @@ typedef struct
fmi3LsBusOperationHeader header; /**< Operation header. */
fmi3LsBusFlexRayCycleId cycleId; /**< The cycle the message is transferred in. */
fmi3LsBusFlexRaySlotId slotId; /**< The slot the message is transferred in. */
fmi3LsBusFlexRayIteration iteration; /**< The number of cycle iterations the message is transferred in. */
fmi3LsBusFlexRayChannel channel; /**< The channel(s) on which the transmission takes place. */
fmi3LsBusBoolean startupFrameIndicator; /**< Indicates a startup frame. */
fmi3LsBusBoolean syncFrameIndicator; /**< Indicates a sync frame. */
Expand All @@ -371,7 +365,7 @@ typedef struct
} fmi3LsBusFlexRayOperationFlexRayTransmit;

#if FMI3_LS_BUS_CHECK_OPERATION_SIZE == 1
static_assert(sizeof(fmi3LsBusFlexRayOperationFlexRayTransmit) == (5 + 1 + 2 + 8 + 1 + 1 + 1 + 1 + 1 + 4 + 1),
static_assert(sizeof(fmi3LsBusFlexRayOperationFlexRayTransmit) == (5 + 1 + 2 + 1 + 1 + 1 + 1 + 1 + 4 + 1),
"'fmi3LsBusFlexRayOperationFlexRayTransmit' does not match the expected data size");
#endif

Expand All @@ -384,12 +378,11 @@ typedef struct
fmi3LsBusOperationHeader header; /**< Operation header. */
fmi3LsBusFlexRayCycleId cycleId; /**< The cycle the message is transferred in. */
fmi3LsBusFlexRaySlotId slotId; /**< The slot the message is transferred in. */
fmi3LsBusFlexRayIteration iteration; /**< The number of cycle iterations the message is transferred in. */
fmi3LsBusFlexRayChannel channel; /**< The channel(s) on which the transmission takes place. */
} fmi3LsBusFlexRayOperationFlexRayCancel;

#if FMI3_LS_BUS_CHECK_OPERATION_SIZE == 1
static_assert(sizeof(fmi3LsBusFlexRayOperationFlexRayCancel) == (5 + 1 + 2 + 8 + 1),
static_assert(sizeof(fmi3LsBusFlexRayOperationFlexRayCancel) == (5 + 1 + 2 + 1),
"'fmi3LsBusFlexRayOperationFlexRayCancel' does not match the expected data size");
#endif

Expand All @@ -402,12 +395,11 @@ typedef struct
fmi3LsBusOperationHeader header; /**< Operation header. */
fmi3LsBusFlexRayCycleId cycleId; /**< The cycle the message is transferred in. */
fmi3LsBusFlexRaySlotId slotId; /**< The slot the message is transferred in. */
fmi3LsBusFlexRayIteration iteration; /**< The number of cycle iterations the message is transferred in. */
fmi3LsBusFlexRayChannel channel; /**< The channel(s) on which the transmission takes place. */
} fmi3LsBusFlexRayOperationFlexRayConfirm;

#if FMI3_LS_BUS_CHECK_OPERATION_SIZE == 1
static_assert(sizeof(fmi3LsBusFlexRayOperationFlexRayConfirm) == (5 + 1 + 2 + 8 + 1),
static_assert(sizeof(fmi3LsBusFlexRayOperationFlexRayConfirm) == (5 + 1 + 2 + 1),
"'fmi3LsBusFlexRayOperationFlexRayConfirm' does not match the expected data size");
#endif

Expand All @@ -421,12 +413,11 @@ typedef struct
fmi3LsBusFlexRayError errorFlags; /**< The error flags describing the error. */
fmi3LsBusFlexRayCycleId cycleId; /**< The cycle in which the error occurred. */
fmi3LsBusFlexRaySegmentIndicatorType segmentIndicator; /**< The segment in which the error occurred. */
fmi3LsBusFlexRayIteration iteration; /**< The number of complete cycle iterations the error occurred. */
fmi3LsBusFlexRayChannel channel; /**< The channel(s) on which the error occurred. */
} fmi3LsBusFlexRayOperationBusError;

#if FMI3_LS_BUS_CHECK_OPERATION_SIZE == 1
static_assert(sizeof(fmi3LsBusFlexRayOperationBusError) == (sizeof(fmi3LsBusOperationHeader) + (1 + 1 + 2 + 8 + 1)),
static_assert(sizeof(fmi3LsBusFlexRayOperationBusError) == (sizeof(fmi3LsBusOperationHeader) + (1 + 1 + 2 + 1)),
"'fmi3LsBusFlexRayOperationBusError' does not match the expected data size");
#endif

Expand Down
24 changes: 8 additions & 16 deletions headers/fmi3LsBusUtilFlexRay.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* \param[in] BufferInfo Pointer to \ref fmi3LsBusUtilBufferInfo.
* \param[in] CycleId The cycle the message is transferred in (\ref fmi3LsBusFlexRayCycleId).
* \param[in] SlotId The slot the message is transferred in (\ref fmi3LsBusFlexRaySlotId).
* \param[in] Iteration The number of complete FlexRay cycles the message is transferred in (\ref fmi3LsBusFlexRayIteration).
* \param[in] Channel The channel(s) on which the transmission takes place (\ref fmi3LsBusFlexRayChannel).
* \param[in] Segment The data segment in which the frame is transmitted (\ref fmi3LsBusFlexRaySegmentType).
* \param[in] StartupFrameIndicator Indicates a startup frame (\ref fmi3LsBusBoolean).
Expand All @@ -69,17 +68,15 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* \param[in] Data Message data (pointer to \ref fmi3LsBusFlexRayData).
*/
#define FMI3_LS_BUS_FLEXRAY_CREATE_OP_FLEXRAY_TRANSMIT(BufferInfo, \
CycleId, SlotId, Iteration, Channel, \
StartupFrameIndicator, SyncFrameIndicator, NullFrameIndicator, PayloadPreambleIndicator, \
MinislotDuration, DataLength, Data) \
CycleId, SlotId, Channel, StartupFrameIndicator, SyncFrameIndicator, \
NullFrameIndicator, PayloadPreambleIndicator, MinislotDuration, DataLength, Data) \
do \
{ \
fmi3LsBusFlexRayOperationFlexRayTransmit _op; \
_op.header.opCode = FMI3_LS_BUS_FLEXRAY_OP_FLEXRAY_TRANSMIT; \
_op.header.length = sizeof(_op) + (DataLength); \
_op.cycleId = (CycleId); \
_op.slotId = (SlotId); \
_op.iteration = (Iteration); \
_op.channel = (Channel); \
_op.startupFrameIndicator = (StartupFrameIndicator); \
_op.syncFrameIndicator = (SyncFrameIndicator); \
Expand All @@ -104,18 +101,16 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* \param[in] BufferInfo Pointer to \ref fmi3LsBusUtilBufferInfo.
* \param[in] CycleId The cycle the message is transferred in (\ref fmi3LsBusFlexRayCycleId).
* \param[in] SlotId The slot the message is transferred in (\ref fmi3LsBusFlexRaySlotId).
* \param[in] Iteration The number of complete FlexRay cycles the message is transferred in (\ref fmi3LsBusFlexRayIteration).
* \param[in] Channel The channel(s) on which the transmission takes place (\ref fmi3LsBusFlexRayChannel).
*/
#define FMI3_LS_BUS_FLEXRAY_CREATE_OP_FLEXRAY_CANCEL(BufferInfo, CycleId, SlotId, Iteration, Channel) \
#define FMI3_LS_BUS_FLEXRAY_CREATE_OP_FLEXRAY_CANCEL(BufferInfo, CycleId, SlotId, Channel) \
do \
{ \
fmi3LsBusFlexRayOperationFlexRayCancel _op; \
_op.header.opCode = FMI3_LS_BUS_FLEXRAY_OP_FLEXRAY_CANCEL; \
_op.header.length = sizeof(_op); \
_op.header.length = sizeof(_op); \
_op.cycleId = (CycleId); \
_op.slotId = (SlotId); \
_op.iteration = (Iteration); \
_op.channel = (Channel); \
\
FMI_LS_BUS_SUBMIT_OPERATION_INTERNAL((BufferInfo), _op, 0, NULL); \
Expand All @@ -134,18 +129,16 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* \param[in] BufferInfo Pointer to \ref fmi3LsBusUtilBufferInfo.
* \param[in] CycleId The cycle the message is transferred in (\ref fmi3LsBusFlexRayCycleId).
* \param[in] SlotId The slot the message is transferred in (\ref fmi3LsBusFlexRaySlotId).
* \param[in] Iteration The number of complete FlexRay cycles the message is transferred in (\ref fmi3LsBusFlexRayIteration).
* \param[in] Channel The channel(s) on which the transmission takes place (\ref fmi3LsBusFlexRayChannel).
*/
#define FMI3_LS_BUS_FLEXRAY_CREATE_OP_FLEXRAY_CONFIRM(BufferInfo, CycleId, SlotId, Iteration, Channel) \
#define FMI3_LS_BUS_FLEXRAY_CREATE_OP_FLEXRAY_CONFIRM(BufferInfo, CycleId, SlotId, Channel) \
do \
{ \
fmi3LsBusFlexRayOperationFlexRayConfirm _op; \
_op.header.opCode = FMI3_LS_BUS_FLEXRAY_OP_FLEXRAY_CONFIRM; \
_op.header.length = sizeof(_op); \
_op.header.length = sizeof(_op); \
_op.cycleId = (CycleId); \
_op.slotId = (SlotId); \
_op.iteration = (Iteration); \
_op.channel = (Channel); \
\
FMI_LS_BUS_SUBMIT_OPERATION_INTERNAL((BufferInfo), _op, 0, NULL); \
Expand All @@ -168,7 +161,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* \param[in] Iteration The number of complete FlexRay cycles, where where the error occuredwhere the error occured (\ref fmi3LsBusFlexRayIteration).
* \param[in] Channel The channel(s) on which the error occurred (\ref fmi3LsBusFlexRayChannel).
*/
#define FMI3_LS_BUS_FLEXRAY_CREATE_OP_BUS_ERROR(BufferInfo, ErrorFlags, CycleId, SegmentIndicator, Iteration, Channel) \
#define FMI3_LS_BUS_FLEXRAY_CREATE_OP_BUS_ERROR(BufferInfo, ErrorFlags, CycleId, SegmentIndicator, Channel) \
do \
{ \
fmi3LsBusFlexRayOperationBusError _op; \
Expand All @@ -177,7 +170,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
_op.errorFlags = (ErrorFlags); \
_op.cycleId = (CycleId); \
_op.segmentIndicator = (SegmentIndicator); \
_op.iteration = (Iteration); \
_op.channel = (Channel); \
\
FMI_LS_BUS_SUBMIT_OPERATION_INTERNAL((BufferInfo), _op, 0, NULL); \
Expand Down Expand Up @@ -225,7 +217,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
_op.parameterType = FMI3_LS_BUS_FLEXRAY_CONFIG_PARAMETER_TYPE_FLEXRAY_GLOBAL; \
_op.flexRayGlobal.macrotickDuration = (MacrotickDuration); \
_op.flexRayGlobal.macroticksPerCycle = (MacroticksPerCycle); \
_op.flexRayGlobal.cycleCountMax = (CycleCountMax); \
_op.flexRayGlobal.cycleCountMax = (CycleCountMax); \
_op.flexRayGlobal.actionPointOffset = (ActionPointOffset); \
_op.flexRayGlobal.staticSlotLength = (StaticSlotLength); \
_op.flexRayGlobal.numberOfStaticSlots = (NumberOfStaticSlots); \
Expand Down

0 comments on commit 02d041a

Please sign in to comment.