EMANE  1.2.1
EMANE::Models::TDMA::MessageComponent Class Reference

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 DatagetData () 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
 

Detailed Description

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.

Member Typedef Documentation

◆ Data

using EMANE::Models::TDMA::MessageComponent::Data = std::vector<uint8_t>

Definition at line 77 of file messagecomponent.h.

Member Enumeration Documentation

◆ Type

Type of component

Enumerator
DATA 

Data message component

CONTROL 

Control messgae component (Scheduler over-the-air)

Definition at line 70 of file messagecomponent.h.

Constructor & Destructor Documentation

◆ MessageComponent() [1/2]

EMANE::Models::TDMA::MessageComponent::MessageComponent ( Type  type,
NEMId  destination,
Priority  priority,
const Utils::VectorIO vectorIO 
)
inline

Creates a component representing a complement message

Parameters
typeType of component
destinationNEM destination
priorityMessage priority
vectorIOScatter-Gather component data

Definition at line 34 of file messagecomponent.inl.

◆ MessageComponent() [2/2]

EMANE::Models::TDMA::MessageComponent::MessageComponent ( Type  type,
NEMId  destination,
Priority  priority,
const Utils::VectorIO vectorIO,
size_t  fragmentIndex,
size_t  fragmentOffset,
std::uint64_t  u64FragmentSequence,
bool  bMore 
)
inline

Creates a component representing a message fragment

Parameters
typeType of component
destinationNEM destination
priorityMessage priority
vectorIOScatter-Gather component data
fragmentIndexFragment index
fragmentOffsetFragment byte offset
u64FragmentSequenceFragment sequence number
bMoreFlag indicating if more fragment(s) follow

Definition at line 55 of file messagecomponent.inl.

Member Function Documentation

◆ getData()

const EMANE::Models::TDMA::MessageComponent::Data & EMANE::Models::TDMA::MessageComponent::getData ( ) const
inline

Gets the component data

Returns
Component data reference

Definition at line 81 of file messagecomponent.inl.

◆ getDestination()

NEMId EMANE::Models::TDMA::MessageComponent::getDestination ( ) const
inline

Gets the destination

Returns
Destination NEM id

Definition at line 87 of file messagecomponent.inl.

◆ getFragmentIndex()

size_t EMANE::Models::TDMA::MessageComponent::getFragmentIndex ( ) const
inline

Gets the fragment index

Returns
Fragment index

Definition at line 106 of file messagecomponent.inl.

◆ getFragmentOffset()

size_t EMANE::Models::TDMA::MessageComponent::getFragmentOffset ( ) const
inline

Gets the fragment byte offset

Returns
Fragment byte offset

Definition at line 112 of file messagecomponent.inl.

◆ getFragmentSequence()

std::uint64_t EMANE::Models::TDMA::MessageComponent::getFragmentSequence ( ) const
inline

Gets the fragment sequence number

Returns
Fragment sequence number

Definition at line 118 of file messagecomponent.inl.

◆ getPriority()

EMANE::Priority EMANE::Models::TDMA::MessageComponent::getPriority ( ) const
inline

Gets message component priority

Returns
Message component priority

Definition at line 130 of file messagecomponent.inl.

◆ getType()

EMANE::Models::TDMA::MessageComponent::Type EMANE::Models::TDMA::MessageComponent::getType ( ) const
inline

Gets the message component type

Returns
Message component type

Definition at line 94 of file messagecomponent.inl.

◆ isFragment()

bool EMANE::Models::TDMA::MessageComponent::isFragment ( ) const
inline

Determines if component is a fragment

Returns
Fragment flag

Definition at line 100 of file messagecomponent.inl.

◆ isMoreFragments()

bool EMANE::Models::TDMA::MessageComponent::isMoreFragments ( ) const
inline

Determines if a fragment follow this message component

Returns
More fragment flag

Definition at line 124 of file messagecomponent.inl.


The documentation for this class was generated from the following files: