Implements the IdealTransmitter model, see the NED file for details.
More...
#include <IdealTransmitter.h>
Implements the IdealTransmitter model, see the NED file for details.
inet::physicallayer::IdealTransmitter::IdealTransmitter |
( |
| ) |
|
int headerBitLength
Definition: IdealTransmitter.h:34
m communicationRange
Definition: IdealTransmitter.h:36
bps bitrate
Definition: IdealTransmitter.h:35
m interferenceRange
Definition: IdealTransmitter.h:37
#define NaN
Definition: INETMath.h:103
m detectionRange
Definition: IdealTransmitter.h:38
const ITransmission * inet::physicallayer::IdealTransmitter::createTransmission |
( |
const IRadio * |
transmitter, |
|
|
const cPacket * |
macFrame, |
|
|
const simtime_t |
startTime |
|
) |
| const |
|
overridevirtual |
Returns a transmission which describes the radio signal corresponding to the provided mac frame.
This function never returns nullptr.
Implements inet::physicallayer::ITransmitter.
66 auto controlInfo =
dynamic_cast<TransmissionRequest*
>(macFrame->getControlInfo());
67 auto transmissionBitrate = controlInfo && !std::isnan(controlInfo->getBitrate().get()) ? controlInfo->getBitrate() :
bitrate;
69 auto dataDuration = macFrame->getBitLength() / transmissionBitrate.get();
71 auto endTime = startTime + duration;
72 auto mobility = transmitter->getAntenna()->getMobility();
73 auto startPosition = mobility->getCurrentPosition();
74 auto endPosition = mobility->getCurrentPosition();
75 auto startOrientation = mobility->getCurrentAngularPosition();
76 auto endOrientation = mobility->getCurrentAngularPosition();
77 return new IdealTransmission(transmitter, macFrame, startTime, endTime,
preambleDuration, headerDuration, dataDuration, startPosition, endPosition, startOrientation, endOrientation,
communicationRange,
interferenceRange,
detectionRange);
int headerBitLength
Definition: IdealTransmitter.h:34
m communicationRange
Definition: IdealTransmitter.h:36
bps bitrate
Definition: IdealTransmitter.h:35
m interferenceRange
Definition: IdealTransmitter.h:37
m detectionRange
Definition: IdealTransmitter.h:38
simtime_t preambleDuration
Definition: IdealTransmitter.h:33
virtual m inet::physicallayer::IdealTransmitter::getMaxCommunicationRange |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns the maximum transmission range.
Returns a value in the range [0, +infinity] or NaN if unspecified.
Reimplemented from inet::physicallayer::TransmitterBase.
m communicationRange
Definition: IdealTransmitter.h:36
virtual m inet::physicallayer::IdealTransmitter::getMaxInterferenceRange |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns the maximum interference range.
Returns a value in the range [0, +infinity] or NaN if unspecified.
Reimplemented from inet::physicallayer::TransmitterBase.
m interferenceRange
Definition: IdealTransmitter.h:37
void inet::physicallayer::IdealTransmitter::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
int headerBitLength
Definition: IdealTransmitter.h:34
m communicationRange
Definition: IdealTransmitter.h:36
compose< b, pow< s,-1 > > bps
Definition: Units.h:985
bps bitrate
Definition: IdealTransmitter.h:35
m interferenceRange
Definition: IdealTransmitter.h:37
Local initializations.
Definition: InitStages.h:35
m detectionRange
Definition: IdealTransmitter.h:38
simtime_t preambleDuration
Definition: IdealTransmitter.h:33
value< double, units::m > m
Definition: Units.h:1047
std::ostream & inet::physicallayer::IdealTransmitter::printToStream |
( |
std::ostream & |
stream, |
|
|
int |
level |
|
) |
| const |
|
overridevirtual |
Prints this object to the provided output stream.
Function calls to operator<< with pointers or references either const or not are all forwarded to this function.
Reimplemented from inet::physicallayer::IPrintableObject.
51 stream <<
"IdealTransmitter";
int headerBitLength
Definition: IdealTransmitter.h:34
Definition: IPrintableObject.h:37
m communicationRange
Definition: IdealTransmitter.h:36
bps bitrate
Definition: IdealTransmitter.h:35
Definition: IPrintableObject.h:34
m interferenceRange
Definition: IdealTransmitter.h:37
m detectionRange
Definition: IdealTransmitter.h:38
simtime_t preambleDuration
Definition: IdealTransmitter.h:33
bps inet::physicallayer::IdealTransmitter::bitrate |
|
protected |
m inet::physicallayer::IdealTransmitter::communicationRange |
|
protected |
m inet::physicallayer::IdealTransmitter::detectionRange |
|
protected |
int inet::physicallayer::IdealTransmitter::headerBitLength |
|
protected |
m inet::physicallayer::IdealTransmitter::interferenceRange |
|
protected |
simtime_t inet::physicallayer::IdealTransmitter::preambleDuration |
|
protected |
The documentation for this class was generated from the following files: