Class is a wrapper for mbed::CANMessage. It provides interface allowing creation of frames complied with vitroio protocol.
More...
#include <canbus_frame.h>
|
| | CanbusFrame () |
| |
| | ~CanbusFrame () |
| |
| void | setNodeId (uint32_t id) |
| | Function allows to set node ID for the frame.
|
| |
| void | setParameterId (uint32_t id) |
| | Function allows to set parameter ID for the frame.
|
| |
| bool | setDataLength (uint32_t length) |
| | Function allows to set data length of the frame.
|
| |
| uint32_t | nodeId () const |
| | Function allows to obtain node ID from the frame.
|
| |
| uint32_t | parameterId () const |
| | Function allows to obtain parameter ID from the frame.
|
| |
| uint32_t | dataLength () const |
| | Function allows to obtain data length of the frame.
|
| |
| uint32_t | maxDataLength () const |
| | Function allows to obtain maximum data length of the frame.
|
| |
| char * | data () |
| | Function allows a direct access to the frame data for modifications.
|
| |
| const char * | data () const |
| | Function allows to get frame data for reading.
|
| |
Class is a wrapper for mbed::CANMessage. It provides interface allowing creation of frames complied with vitroio protocol.
◆ CanbusFrame()
| vitroio::sdk::CanbusFrame::CanbusFrame |
( |
| ) |
|
◆ ~CanbusFrame()
| vitroio::sdk::CanbusFrame::~CanbusFrame |
( |
| ) |
|
◆ data() [1/2]
| char * vitroio::sdk::CanbusFrame::data |
( |
| ) |
|
Function allows a direct access to the frame data for modifications.
- Note
- This function should be used with dataLength() function to avoid exceeding address range.
- Returns
- Function returns pointer to buffer of frame data.
◆ data() [2/2]
| const char * vitroio::sdk::CanbusFrame::data |
( |
| ) |
const |
Function allows to get frame data for reading.
- Note
- This function should be used with dataLength() function to avoid exceeding address range.
- Returns
- Function returns constant pointer to buffer of frame data.
◆ dataLength()
| uint32_t vitroio::sdk::CanbusFrame::dataLength |
( |
| ) |
const |
Function allows to obtain data length of the frame.
- Returns
- Function returns length of the frame data.
◆ maxDataLength()
| uint32_t vitroio::sdk::CanbusFrame::maxDataLength |
( |
| ) |
const |
Function allows to obtain maximum data length of the frame.
- Returns
- Function returns maximum size of frame data.
◆ nodeId()
| uint32_t vitroio::sdk::CanbusFrame::nodeId |
( |
| ) |
const |
Function allows to obtain node ID from the frame.
- Returns
- Function returns node ID of the frame.
◆ parameterId()
| uint32_t vitroio::sdk::CanbusFrame::parameterId |
( |
| ) |
const |
Function allows to obtain parameter ID from the frame.
- Returns
- Function returns parameter ID of the frame.
◆ setDataLength()
| bool vitroio::sdk::CanbusFrame::setDataLength |
( |
uint32_t | length | ) |
|
Function allows to set data length of the frame.
- Parameters
-
| length | Data length in bytes |
- Returns
- Function returns true on success or false otherwise.
◆ setNodeId()
| void vitroio::sdk::CanbusFrame::setNodeId |
( |
uint32_t | id | ) |
|
Function allows to set node ID for the frame.
- Parameters
-
◆ setParameterId()
| void vitroio::sdk::CanbusFrame::setParameterId |
( |
uint32_t | id | ) |
|
Function allows to set parameter ID for the frame.
- Parameters
-
◆ Canbus