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
RoveCommPacket.h File Reference

RoveComm Packet Definition. More...

Include dependency graph for RoveCommPacket.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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. More...
struct  rovecomm::CallbackHandle
 Identifies one callback registered with a node's On(), so Clear() can remove that callback without touching any other callback for the same data ID. A default-constructed handle is empty and Clear() ignores it. More...

Namespaces

namespace  rovecomm
 The RoveComm namespace contains all of the functionality for the RoveComm library. This includes the packet structure and the functions for packing and unpacking data.

Macros

#define htonll(x)
#define ntohll(x)

Typedefs

template<manifest::ManifestEntry Entry>
using rovecomm::EntryType = typename manifest::Helpers::RoveCommToCType<Entry.DATA_TYPE>::c_type

Functions

template<typename T>
std::vector< uint8_t > rovecomm::PackPacket (const RoveCommPacket< T > &stPacket)
 Create a RoveCommData structure from a RoveCommPacket structure.
template<typename T>
RoveCommPacket< T > rovecomm::UnpackData (std::span< const uint8_t > spBytes)
 Create a RoveCommPacket structure from a RoveCommData structure.
template<manifest::ManifestEntry Entry>
RoveCommPacket< EntryType< Entry > > rovecomm::CreatePacket ()
template<manifest::ManifestEntry Entry, manifest::RoveCommType... Args>
RoveCommPacket< EntryType< Entry > > rovecomm::CreatePacket (Args... args)
template<manifest::ManifestEntry Entry>
RoveCommPacket< EntryType< Entry > > rovecomm::CreatePacket (std::span< const EntryType< Entry > > spData)
template<manifest::ManifestEntry Entry>
RoveCommPacket< EntryType< Entry > > rovecomm::CreatePacket (std::initializer_list< EntryType< Entry > > ilData)

Detailed Description

RoveComm Packet Definition.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2024-02-05

Macro Definition Documentation

◆ htonll

#define htonll ( x)
Value:
((1 == htonl(1)) ? (x) : (((uint64_t) htonl((x) & 0xFFFFFFFFUL)) << 32) | htonl((uint32_t) ((x) >> 32)))

◆ ntohll

#define ntohll ( x)
Value:
((1 == ntohl(1)) ? (x) : (((uint64_t) ntohl((x) & 0xFFFFFFFFUL)) << 32) | ntohl((uint32_t) ((x) >> 32)))