RoveComm C++ 3.0.0
Welcome to the RoveComm C++ repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of RoveComm C++. The RoveComm C++ project is the RoveComm interface for high level systems and should not be used for microcontrollers.
Loading...
Searching...
No Matches
rovecomm::RoveCommPacket< T > Struct Template Reference

The RoveCommPacket struct is used to store data in a packet format for transmission over a network. This struct is used to store the data ID, data count, data type, and the data itself. The data is stored in a vector of the specified data type. More...

#include <RoveCommPacket.h>

Public Member Functions

uint16_t GetDataCount () const
size_t GetDataSize () const
uint8_t GetDataType () const

Public Attributes

uint16_t unDataId {}
std::vector< T > vData

Static Public Attributes

static constexpr manifest::DataTypes eDataType = manifest::Helpers::CToRoveCommType<T>::TYPE

Detailed Description

template<typename T>
struct rovecomm::RoveCommPacket< T >

The RoveCommPacket struct is used to store data in a packet format for transmission over a network. This struct is used to store the data ID, data count, data type, and the data itself. The data is stored in a vector of the specified data type.

Template Parameters
T- The data type of the data to be stored in the packet. This can be any of the data types defined in the manifest.
Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2024-02-07

Member Function Documentation

◆ GetDataCount()

template<typename T>
uint16_t rovecomm::RoveCommPacket< T >::GetDataCount ( ) const
inline
81{ return static_cast<uint16_t>(vData.size()); }
The RoveCommPacket struct is used to store data in a packet format for transmission over a network....
Definition RoveCommPacket.h:75
std::vector< T > vData
Definition RoveCommPacket.h:78
Here is the caller graph for this function:

◆ GetDataSize()

template<typename T>
size_t rovecomm::RoveCommPacket< T >::GetDataSize ( ) const
inline
83{ return static_cast<uint16_t>(vData.size() * manifest::Helpers::DataTypeSize(eDataType)); }
static constexpr manifest::DataTypes eDataType
Definition RoveCommPacket.h:79
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDataType()

template<typename T>
uint8_t rovecomm::RoveCommPacket< T >::GetDataType ( ) const
inline
85{ return static_cast<uint8_t>(eDataType); }
Here is the caller graph for this function:

Member Data Documentation

◆ eDataType

template<typename T>
manifest::DataTypes rovecomm::RoveCommPacket< T >::eDataType = manifest::Helpers::CToRoveCommType<T>::TYPE
staticconstexpr

◆ unDataId

template<typename T>
uint16_t rovecomm::RoveCommPacket< T >::unDataId {}
77{};

◆ vData

template<typename T>
std::vector<T> rovecomm::RoveCommPacket< T >::vData

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