|
AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
A class that represents data of a CAN message by holding a vector of bytes. More...
#include <can_message_data.hpp>
Public Member Functions | |
| CANMessageDataVector (std::size_t size) | |
| Construct a new CANMessageDataVector object. | |
| CANMessageDataVector (const std::vector< std::uint8_t > &data) | |
| Construct a new CANMessageDataVector object. | |
| CANMessageDataVector (const std::uint8_t *data, std::size_t size) | |
| Construct a new CANMessageDataVector object. | |
| std::size_t | size () const override |
| Get the size of the data. | |
| std::uint8_t | get_byte (std::size_t index) override |
| Get the byte at the given index. | |
| void | set_byte (std::size_t index, std::uint8_t value) |
| Set the byte at the given index. | |
| CANDataSpan | data () const |
| Get the data span. | |
| std::unique_ptr< CANMessageData > | copy_if_not_owned (std::unique_ptr< CANMessageData > self) const override |
| If the data isn't owned by this class, make a copy of the data. | |
Public Member Functions inherited from isobus::CANMessageData | |
| virtual | ~CANMessageData ()=default |
| Default destructor. | |
A class that represents data of a CAN message by holding a vector of bytes.
Definition at line 47 of file can_message_data.hpp.
|
explicit |
Construct a new CANMessageDataVector object.
| [in] | size | The size of the data. |
Definition at line 16 of file can_message_data.cpp.
|
explicit |
Construct a new CANMessageDataVector object.
| [in] | data | The data to copy. |
Definition at line 21 of file can_message_data.cpp.
| isobus::CANMessageDataVector::CANMessageDataVector | ( | const std::uint8_t * | data, |
| std::size_t | size ) |
Construct a new CANMessageDataVector object.
| [in] | data | A pointer to the data to copy. |
| [in] | size | The size of the data to copy. |
Definition at line 26 of file can_message_data.cpp.
|
overridevirtual |
If the data isn't owned by this class, make a copy of the data.
| [in] | self | A pointer to this object. |
Implements isobus::CANMessageData.
Definition at line 51 of file can_message_data.cpp.
| CANDataSpan isobus::CANMessageDataVector::data | ( | ) | const |
Get the data span.
Definition at line 46 of file can_message_data.cpp.
|
overridevirtual |
Get the byte at the given index.
| [in] | index | The index of the byte to get. |
Implements isobus::CANMessageData.
Definition at line 36 of file can_message_data.cpp.
| void isobus::CANMessageDataVector::set_byte | ( | std::size_t | index, |
| std::uint8_t | value ) |
Set the byte at the given index.
| [in] | index | The index of the byte to set. |
| [in] | value | The value to set the byte to. |
Definition at line 41 of file can_message_data.cpp.
|
overridevirtual |
Get the size of the data.
Implements isobus::CANMessageData.
Definition at line 31 of file can_message_data.cpp.