J1939GetChecksumAndCounter
Open topic with navigation CAPL Functions » J1939 » Function Overview » J1939GetChecksumAndCounterTool Availability
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
Description
This function returns the checksum and the message counter of the given parameter group. The available calculation methods are described in J1939 Functional Safety – Messages With Integrated Checksum and Counter and are used to determine the alignment of the checksum and message counter in the given parameter group. After calling this function the parameters checksum and counter contain the values that were transmitted in the message, and the return value indicates if an error occurred.Parameters
- msg: The parameter group to get the checksum and counter from.
- calculationMethod: Two letters in the form [A-E][a-f] (e.g. Bc) that define the calculation rule and position of the checksum and message counter.
- checksum: The checksum retrieved from the given parameter group.
- counter: The message counter retrieved from the given parameter group.
Return Values
- 0: Checksum successfully filled.
- -1: Error: calculation method is invalid.