EMANE  1.2.1
EMANE::CommonPHYHeader Class Reference

The common physical layer header used to facilitate heterogeneous radio model experimentation. More...

#include <commonphyheader.h>

Public Member Functions

 CommonPHYHeader (RegistrationId registrationId, std::uint16_t subId, std::uint16_t u16SequenceNumber, std::uint64_t u64BandwidthHz, const TimePoint &txTime, const FrequencySegments &frequencySegments, const Transmitters &transmitters, const std::pair< double, bool > &optionalFixedAntennaGaindBi)
 
 CommonPHYHeader (UpstreamPacket &pkt)
 
 CommonPHYHeader (CommonPHYHeader &&rvalue)
 
 ~CommonPHYHeader ()
 
RegistrationId getRegistrationId () const
 
std::uint16_t getSubId () const
 
const std::pair< double, bool > & getOptionalFixedAntennaGaindBi () const
 
const TimePointgetTxTime () const
 
Microseconds getDuration () const
 
std::uint64_t getBandwidthHz () const
 
std::uint16_t getSequenceNumber () const
 
const FrequencySegmentsgetFrequencySegments () const
 
const TransmittersgetTransmitters () const
 
void prependTo (DownstreamPacket &pkt) const
 
Strings format () const
 

Detailed Description

The common physical layer header used to facilitate heterogeneous radio model experimentation.

Definition at line 53 of file commonphyheader.h.

Constructor & Destructor Documentation

◆ CommonPHYHeader() [1/3]

EMANE::CommonPHYHeader::CommonPHYHeader ( RegistrationId  registrationId,
std::uint16_t  subId,
std::uint16_t  u16SequenceNumber,
std::uint64_t  u64BandwidthHz,
const TimePoint txTime,
const FrequencySegments frequencySegments,
const Transmitters transmitters,
const std::pair< double, bool > &  optionalFixedAntennaGaindBi 
)

Creates a CommonPHYHeader instance

Parameters
registrationIdRegistration id of the physical layer
subIdSub id used to delineate different waveforms
u16SequenceNumberSequence number
u64BandwidthHzTransceiver bandwidth in Hz
txTimeTransmit time stamp
frequencySegmentsList of frequency segments
transmittersList of transmitters
optionalFixedAntennaGaindBiOptional fixed antenna gain
Note
The transmit time stamp is used as the start of transmission (SoT) time at the receiver. If servers used during the emulation are not tightly time synced the receiver will use message reception time as the SoT.
MAC layers can use the Controls::TimeStampControlMessage to set the txTime.

Definition at line 186 of file commonphyheader.cc.

◆ CommonPHYHeader() [2/3]

EMANE::CommonPHYHeader::CommonPHYHeader ( UpstreamPacket pkt)

Creates a CommonPHYHeader instance by stripping an UpstreamPacket

Parameters
pktUpstreamPacket that is stripped in order to create the instance
Exceptions
SerializationExceptionwhen the data stripped cannot be de-serialized into a CommonPHYHeader

Definition at line 107 of file commonphyheader.cc.

◆ CommonPHYHeader() [3/3]

EMANE::CommonPHYHeader::CommonPHYHeader ( CommonPHYHeader &&  rvalue)

Creates a CommonPHYHeader instance by moving another instance

Definition at line 205 of file commonphyheader.cc.

◆ ~CommonPHYHeader()

EMANE::CommonPHYHeader::~CommonPHYHeader ( )

Destroys an instance

Definition at line 209 of file commonphyheader.cc.

Member Function Documentation

◆ format()

EMANE::Strings EMANE::CommonPHYHeader::format ( ) const

Returns format suitable for logger callable

Returns
format strings

Definition at line 337 of file commonphyheader.cc.

◆ getBandwidthHz()

std::uint64_t EMANE::CommonPHYHeader::getBandwidthHz ( ) const

Gets the transceiver bandwidth in Hz

Returns
bandwidth

Definition at line 265 of file commonphyheader.cc.

◆ getDuration()

EMANE::Microseconds EMANE::CommonPHYHeader::getDuration ( ) const

Gets the message duration

Returns
message duration
Note
Duration is determined by taking the delta between the earliest frequency segment offset and the latest ending frequency segment.

Definition at line 233 of file commonphyheader.cc.

◆ getFrequencySegments()

const EMANE::FrequencySegments & EMANE::CommonPHYHeader::getFrequencySegments ( ) const

Gets a reference to the frequency segment list

Returns
frequency segments

Definition at line 277 of file commonphyheader.cc.

◆ getOptionalFixedAntennaGaindBi()

const std::pair< double, bool > & EMANE::CommonPHYHeader::getOptionalFixedAntennaGaindBi ( ) const

Gets the optional fixed antenna gain in dBi

Returns
optional antenna gain as a pair, where first is the antenna gain in dBi and second is a boolean flag indicating whether the gain is valid (present)

Definition at line 221 of file commonphyheader.cc.

◆ getRegistrationId()

EMANE::RegistrationId EMANE::CommonPHYHeader::getRegistrationId ( ) const

Gets the physical layer registration id

Returns
registration id

Definition at line 211 of file commonphyheader.cc.

◆ getSequenceNumber()

std::uint16_t EMANE::CommonPHYHeader::getSequenceNumber ( ) const

Gets the sequence number

Returns
sequence number

Definition at line 271 of file commonphyheader.cc.

◆ getSubId()

std::uint16_t EMANE::CommonPHYHeader::getSubId ( ) const

Gets the sub id

Returns
sub id

Definition at line 216 of file commonphyheader.cc.

◆ getTransmitters()

const EMANE::Transmitters & EMANE::CommonPHYHeader::getTransmitters ( ) const

Gets a reference to the transmitters list

Returns
transmitters list

Definition at line 283 of file commonphyheader.cc.

◆ getTxTime()

const EMANE::TimePoint & EMANE::CommonPHYHeader::getTxTime ( ) const

Gets the transmission time stamp

Returns
transmission time stamp

Definition at line 227 of file commonphyheader.cc.

◆ prependTo()

void EMANE::CommonPHYHeader::prependTo ( DownstreamPacket pkt) const

Prepends CommonPHYHeader to downstream packet

Parameters
pktPacket to prepend header
Exceptions
SerializationException

Definition at line 288 of file commonphyheader.cc.


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