variables
{
// The gMsg2 message for the static segment
// that is sent on channel A only.
frFrame ( 30, 0, 2) gMsg2;
const BYTE gMsg2Flags = 0; // state-driven for repeated transmission
const BYTE gMsg2Channel = %CHANNEL%; // send on network the CAPL node is assigned to
const BYTE gMsg2ChanMask = 1; // send on FlexRay channel A
const BYTE gMsg2Len = 32; // 32 byte user data
const int gMsg2IncSize = 16; // 16 bit message counter
const int gMsg2IncOffset = 0; // Byte 0 is first byte of message counter
}
on preStart
{
// Optionally prepare buffer for message gMsg2:
gMsg2.MsgChannel = gMsg2Channel;
gMsg2.FR_ChannelMask = gMsg2ChanMask;
gMsg2.FR_Flags = gMsg2Flags;
frSetPayloadLengthInByte(gMsg2, gMsg2Len);
frSetSendFrame( gMsg2 );
// Define the automatic icrementing message counter:
frSetAutoIncrement(gMsg2.MsgChannel, gMsg2.FR_SlotID, gMsg2.FR_ChannelMask, gMsg2.FR_CycleOffset, gMsg2.FR_CycleRepetition, 1, gMsg2IncSize, gMsg2IncOffset);
}