![]() |
VSM C++ SDK
Vehicle Specific Modules SDK
|
Generalized MAVLink message payload. More...
#include <mavlink.h>
Public Types | |
typedef std::shared_ptr< Payload > | Ptr |
Pointer type. | |
typedef std::weak_ptr< Payload > | Weak_ptr |
Pointer type. | |
![]() | |
typedef std::shared_ptr < Payload_base > | Ptr |
Pointer type. | |
typedef std::weak_ptr < Payload_base > | Weak_ptr |
Pointer type. | |
Public Member Functions | |
Payload ()=default | |
All fields are initialized to default values. More... | |
Payload (const void *buf, size_t size) | |
Parse message from data buffer. More... | |
Payload (Io_buffer::Ptr buffer) | |
Convenience variation of previous constructor. More... | |
virtual size_t | Get_size_v1 () const override |
Get size of the message payload without extensions in bytes. More... | |
virtual size_t | Get_size_v2 () const override |
Get size of the message payload in bytes including all extensions. More... | |
virtual const char * | Get_name () const override |
Get message name. More... | |
virtual MESSAGE_ID_TYPE | Get_id () const override |
Get message id. More... | |
virtual uint8_t | Get_extra_byte () const override |
Get extra byte for CRC calculation. More... | |
virtual void | Reset () override |
Reset all fields to UgCS default values. More... | |
bool | operator== (const Payload &rhs) const |
Compare if data in the payload is bit-same with another payload. More... | |
bool | operator!= (const Payload &rhs) const |
Compare if data in the payload is not bit-same with another payload. More... | |
TData * | operator-> () |
Pointer access semantics to payload. More... | |
const TData * | operator-> () const |
Constant pointer access semantics to payload. More... | |
TData & | operator* () |
Dereference access semantics to payload. More... | |
const TData & | operator* () const |
Constant dereference access semantics to payload. More... | |
![]() | |
Io_buffer::Ptr | Get_buffer () const |
Get Io_buffer instance which contains current content of the message. More... | |
std::string | Dump () const |
Dump message content in human-readable format into a string. More... | |
Static Public Member Functions | |
template<typename... Args> | |
static Ptr | Create (Args &&...args) |
Create an instance. More... | |
![]() | |
template<typename... Args> | |
static Ptr | Create (Args &&...args) |
Create an instance. More... | |
Additional Inherited Members |
Generalized MAVLink message payload.
TData | Structure for payload data. |
|
default |
All fields are initialized to default values.
|
inline |
Parse message from data buffer.
The buffer should contain data on wire (in network byte order). Data size can be less than expected payload size. In this case reminder bytes will be set to 0. This is for mavlink2 support which allows trimming trailing zero bytes.
buf | Pointer to data buffer. |
size | Size of data available. |
|
inline |
Convenience variation of previous constructor.
buffer | Buffer with data. |
|
inlinestatic |
Create an instance.
|
inlineoverridevirtual |
Get extra byte for CRC calculation.
Implements ugcs::vsm::mavlink::Payload_base.
|
inlineoverridevirtual |
Get message id.
Implements ugcs::vsm::mavlink::Payload_base.
|
inlineoverridevirtual |
Get message name.
Implements ugcs::vsm::mavlink::Payload_base.
|
inlineoverridevirtual |
Get size of the message payload without extensions in bytes.
Implements ugcs::vsm::mavlink::Payload_base.
|
inlineoverridevirtual |
Get size of the message payload in bytes including all extensions.
Implements ugcs::vsm::mavlink::Payload_base.
|
inline |
Compare if data in the payload is not bit-same with another payload.
|
inline |
Dereference access semantics to payload.
|
inline |
Constant dereference access semantics to payload.
|
inline |
Pointer access semantics to payload.
|
inline |
Constant pointer access semantics to payload.
|
inline |
Compare if data in the payload is bit-same with another payload.
|
inlineoverridevirtual |
Reset all fields to UgCS default values.
Implements ugcs::vsm::mavlink::Payload_base.