J1939FillSHM
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
Description
This function uses the PGN, addresses, priority and payload of a Safety Data Message (SDM) as well as a sequence number to set the payload, priority and addresses of a Safety Header Message (SHM). The payload of the SDM consist of following signals (see SAE J1939-76):- Inverted SDM Data Page.
- Inverted SDM Extended Data Page.
- SDG Sequence Number.
- Inverted SDM Source Address.
- Inverted SDM PS Value.
- Inverted SDM PF Value.
- SDM Data CRC.
Parameters
- pgSDM: The data of SDM is used to fill the SHM. DLC of SDM shall be 8.
- sequenceNumber: New sequence number of the SHM.
- pgSHM: SHM message to be filled. DLC of SHM shall be 8.
Return Values
- 0: SHM is successfully filled.
- -1: DLC of SDM is not 8 bytes.