DESERT 4.0.0
PositionData Struct Reference

#include <position_data.h>

Collaboration diagram for PositionData:
Collaboration graph

Public Member Functions

constexpr size_t size () const
 
int serialize (char *buffer, size_t buffer_size) const
 
bool deserialize (char *buffer, size_t buffer_size)
 

Public Attributes

double x
 
double y
 
double z
 

Detailed Description

Position data structure for submitting node positions to DESERT in ENU coordinates

Member Function Documentation

◆ deserialize()

bool PositionData::deserialize ( char *  buffer,
size_t  buffer_size 
)
inline

Deserialize the position data from the buffer

Parameters
bufferbuffer with serialized data
buffer_sizesize of buffer
Returns
false if buffer is too small, true otherwise

References size(), x, y, and z.

Referenced by PositionListener< Owner >::Run().

Here is the call graph for this function:

◆ serialize()

int PositionData::serialize ( char *  buffer,
size_t  buffer_size 
) const
inline

Serialize the position data to buffer

Parameters
bufferbuffer where the data are written
buffer_sizesize of buffer
Returns
bytes used in buffer (if > 0) or negative of required buffer size

References size(), x, y, and z.

Here is the call graph for this function:

◆ size()

constexpr size_t PositionData::size ( ) const
inlineconstexpr

Compute required buffer size for (de-)serialization

Returns
required buffer size

References x, y, and z.

Referenced by deserialize(), PositionListener< Owner >::Run(), and serialize().

Member Data Documentation

◆ x

double PositionData::x

East in [m]

Referenced by deserialize(), serialize(), UDPPosition::setPosition(), and size().

◆ y

double PositionData::y

North in [m]

Referenced by deserialize(), serialize(), UDPPosition::setPosition(), and size().

◆ z

double PositionData::z

The documentation for this struct was generated from the following file: