|
virtual int32_t | sendMessage (uint32_t messageID, const uint8_t *data, uint8_t dataSize)=0 |
| This entry-point of the CANInterfacePlugin is passed a message that the driver needs to send to a device on the CAN bus. More...
|
|
virtual int32_t | receiveMessage (uint32_t &messageID, uint8_t *data, uint8_t &dataSize)=0 |
| This entry-point of the CANInterfacePlugin is passed buffers which should be populated with any received messages from devices on the CAN bus. More...
|
|
virtual int32_t CANInterfacePlugin::receiveMessage |
( |
uint32_t & |
messageID, |
|
|
uint8_t * |
data, |
|
|
uint8_t & |
dataSize |
|
) |
| |
|
pure virtual |
This entry-point of the CANInterfacePlugin is passed buffers which should be populated with any received messages from devices on the CAN bus.
This function is always called by a single task in the Jaguar driver, so it need not be reentrant.
This function is expected to block for some period of time waiting for a message from the CAN bus. It may timeout periodically (returning non-zero to indicate no message was populated) to allow for shutdown and unloading of the plugin.
- Parameters
-
messageID | A reference to be populated with a received 29-bit CAN message ID in the lsbs. |
data | A pointer to a buffer of 8 bytes to be populated with data received with the message. |
dataSize | A reference to be populated with the size of the data received (0 - 8 bytes). |
- Returns
- This should return 0 if a message was populated, non-0 if no message was not populated.
virtual int32_t CANInterfacePlugin::sendMessage |
( |
uint32_t |
messageID, |
|
|
const uint8_t * |
data, |
|
|
uint8_t |
dataSize |
|
) |
| |
|
pure virtual |
This entry-point of the CANInterfacePlugin is passed a message that the driver needs to send to a device on the CAN bus.
This function may be called from multiple contexts and must therefore be reentrant.
- Parameters
-
messageID | The 29-bit CAN message ID in the lsbs. The msb can indicate a remote frame. |
data | A pointer to a buffer containing between 0 and 8 bytes to send with the message. May be nullptr if dataSize is 0. |
dataSize | The number of bytes to send with the message. |
- Returns
- Return any error code. On success return 0.
The documentation for this class was generated from the following file: