EMANE
1.2.1
|
Holds a message component that may be all or part of a data or control message. More...
#include <messagecomponent.h>
Public Types | |
enum | Type { Type::DATA, Type::CONTROL } |
using | Data = std::vector< uint8_t > |
Public Member Functions | |
MessageComponent (Type type, NEMId destination, Priority priority, const Utils::VectorIO &vectorIO) | |
MessageComponent (Type type, NEMId destination, Priority priority, const Utils::VectorIO &vectorIO, size_t fragmentIndex, size_t fragmentOffset, std::uint64_t u64FragmentSequence, bool bMore) | |
const Data & | getData () const |
NEMId | getDestination () const |
Type | getType () const |
bool | isFragment () const |
size_t | getFragmentIndex () const |
size_t | getFragmentOffset () const |
std::uint64_t | getFragmentSequence () const |
bool | isMoreFragments () const |
Priority | getPriority () const |
Holds a message component that may be all or part of a data or control message.
Depending on whether aggregation and fragmentation are enabled, the radio model will transmit one or more message components per transmission. A message component, depending on slot and message data size, can be one or more entire packets, a portion (fragment) of one or more packets or some combination thereof. A single over-the-air transmission may contain a mixture of both unicast and broadcast message components, where unicast components can be for different destinations.
Definition at line 64 of file messagecomponent.h.
using EMANE::Models::TDMA::MessageComponent::Data = std::vector<uint8_t> |
Definition at line 77 of file messagecomponent.h.
|
strong |
Type of component
Enumerator | |
---|---|
DATA | Data message component |
CONTROL | Control messgae component (Scheduler over-the-air) |
Definition at line 70 of file messagecomponent.h.
|
inline |
Creates a component representing a complement message
type | Type of component |
destination | NEM destination |
priority | Message priority |
vectorIO | Scatter-Gather component data |
Definition at line 34 of file messagecomponent.inl.
|
inline |
Creates a component representing a message fragment
type | Type of component |
destination | NEM destination |
priority | Message priority |
vectorIO | Scatter-Gather component data |
fragmentIndex | Fragment index |
fragmentOffset | Fragment byte offset |
u64FragmentSequence | Fragment sequence number |
bMore | Flag indicating if more fragment(s) follow |
Definition at line 55 of file messagecomponent.inl.
|
inline |
Gets the component data
Definition at line 81 of file messagecomponent.inl.
|
inline |
|
inline |
|
inline |
Gets the fragment byte offset
Definition at line 112 of file messagecomponent.inl.
|
inline |
Gets the fragment sequence number
Definition at line 118 of file messagecomponent.inl.
|
inline |
Gets message component priority
Definition at line 130 of file messagecomponent.inl.
|
inline |
Gets the message component type
Definition at line 94 of file messagecomponent.inl.
|
inline |
Determines if component is a fragment
Definition at line 100 of file messagecomponent.inl.
|
inline |
Determines if a fragment follow this message component
Definition at line 124 of file messagecomponent.inl.