63
9.6.8 CAN_MSG Structure
• Members:
o Id
Type: Unsigned Integer
Message ID.
Format: XXX (standard), XXXXXXXX (extended)
Example: 1FF
o Size
Type: Byte
Message size.
Format: A numeric value from 0~8
Example: 8
o Data
Type: Byte array with 8 elements
Content of the data to be sent/received.
Format: XX
Example: 11
o Flags
Type: Byte
Determines the message ID type and timestamp settings.
Format:
• 1, timestamp off, standard
• 2, timestamp off, extended
• 9, timestamp on, standard
• 10, timestamp on, extended
Example: 9
o Timestamp
Type: Unsigned Short
Value of the timestamp.
Format: No input from the user is required
Example: 0
• Sample Message:
o With a CAN_MSG structure instance declared as myCANMSG:
myCANMsg.ID = 1FF
myCANMsg.Size = 3
myCANMsg.Data(0) = 11
myCANMsg.Data(1) = 22
myCANMsg.Data(2) = 33
myCANMsg.Flags = 10