|
AMK_motor_drive_software 1.0.0
|
The CANMessage class represents a CAN message, containing an ID and data. More...
#include <CANMessage.hpp>
Public Member Functions | |
| CANMessage () | |
| Default constructor for CANMessage. | |
| CANMessage (uint16_t t_canId) | |
| Constructs a CANMessage with a specified CAN ID. | |
| void | setCanId (uint16_t t_canId) |
| Sets the CAN ID of the message. | |
| uint16_t | getCanId () |
| Retrieves the CAN ID of the message. | |
Public Attributes | |
| uint8_t | m_data [8] |
| Array of 8 bytes representing the data of the CAN message. | |
The CANMessage class represents a CAN message, containing an ID and data.
This class provides a structure to store and manipulate CAN messages, which include a 16-bit CAN identifier and up to 8 bytes of data.
| CANMessage::CANMessage | ( | ) |
Default constructor for CANMessage.
Initializes a CAN message with no specific CAN ID.
| CANMessage::CANMessage | ( | uint16_t | t_canId | ) |
Constructs a CANMessage with a specified CAN ID.
| t_canId | The CAN ID to associate with this message. |
| uint16_t CANMessage::getCanId | ( | ) |
Retrieves the CAN ID of the message.
| void CANMessage::setCanId | ( | uint16_t | t_canId | ) |
Sets the CAN ID of the message.
| t_canId | The CAN ID to be set for this message. |
| uint8_t CANMessage::m_data[8] |
Array of 8 bytes representing the data of the CAN message.