32 inline void reset(uint32_t msgid, uint8_t len)
44 template<
class _T,
size_t _Size>
45 void operator<< (const std::array<_T, _Size> &
data);
50 template<
class _T,
size_t _Size>
58 template<
typename _T,
typename _Tin>
61 template<
typename _T,
typename _Tout>
69 template<
typename _T,
typename _Tin>
72 if (std::is_floating_point<_Tin>::value) {
73 buf = *
static_cast<const _T *
>(
static_cast<const void *
>(&
data));
100 template<
typename _T>
106 switch (
sizeof(_T)) {
135 template<
class _T,
size_t _Size>
136 void mavlink::MsgMap::operator<< (const std::array<_T, _Size> &
data)
138 for (
auto &v :
data) {
143 template<
typename _T,
typename _Tout>
149 if (pos +
sizeof(_T) >
cmsg->
len) {
152 uint8_t u8[
sizeof(_T)];
155 size_t toclean = (pos +
sizeof(_T)) -
cmsg->
len;
156 size_t start_pos =
sizeof(_T) - toclean;
161 memset(&bz.u8[start_pos], 0, toclean);
167 switch (
sizeof(_T)) {
184 if (std::is_floating_point<_Tout>::value) {
185 data = *
static_cast<_Tout *
>(
static_cast<void *
>(&buf));
191 template<
typename _T>
204 switch (
sizeof(_T)) {
233 template<
class _T,
size_t _Size>
236 for (
auto &v : data) {
void reset(uint32_t msgid, uint8_t len)
uint8_t msgid
ID of message in payload.
void operator>>(_T &data)
void msg_swap_memcpy(_T &buf, _Tin data)
void operator<<(const _T data)
MsgMap(mavlink_message_t *p)
MsgMap(mavlink_message_t &p)
#define _MAV_PAYLOAD_NON_CONST(msg)
#define MAVLINK_MAX_PAYLOAD_LEN
Maximum payload length.
MsgMap(const mavlink_message_t *p)
void cmsg_memcpy_bzero_swap_set_data(_T &buf, _Tout &data)
#define _MAV_PAYLOAD(msg)
uint8_t len
Length of payload.
const mavlink_message_t * cmsg