Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To get a higher level of abstraction, the CAN signals and messages can be used to abstract the information mappings to the bus communication objects.

Example: The information ‘Nodestatus’ Nodestatus and ‘CPUCPU-Load’ Load shall be sent in a CAN frame called ‘Status’ Status with the following definition:

...

4. Payload Byte 1 = CPU-Load

The ‘Nodestatus’ Nodestatus shall be settable via the CAN frame called ‘Command’ Command with the following definition:

...

7. Payload Byte 0 = New Nodestatus

If the information ‘Nodestatus’ Nodestatus is changed, the following actions shall be done:

8. New Nodestatus = 1: Start the task ‘LoadLoad-Task’Task

9. New Nodestatus = 2: Stop the task ‘LoadLoad-Task’Task

Source code (Part 1):

#include “cancan_sig.h”h

/* Signal Definition */

enum {

...

0, /* Initial Value */

0 } /* No Callback */

};

Additional Information

...

1. The CAN signals can be defined without any CAN communication knowledge. No information about sending or receiving the information is needed during this state.

...

Source code (Part 2):

#include “cancan_msg.h”h

/* Message Definition */

enum {

...

0 } } } /* Byte Position */

};

Additional Information

...

1. The CAN messages can be defined without any knowledge of the information generation and/or usage of the payload. Only the mapping of information parts to the payload must be known.

...