INET Framework for OMNeT++/OMNEST
|
This interface represents a physical device that is capable of transmitting and receiving radio signals. More...
#include <IRadio.h>
Public Types | |
enum | RadioMode { RADIO_MODE_OFF, RADIO_MODE_SLEEP, RADIO_MODE_RECEIVER, RADIO_MODE_TRANSMITTER, RADIO_MODE_TRANSCEIVER, RADIO_MODE_SWITCHING } |
This enumeration specifies the requested operational mode of the radio. More... | |
enum | ReceptionState { RECEPTION_STATE_UNDEFINED, RECEPTION_STATE_IDLE, RECEPTION_STATE_BUSY, RECEPTION_STATE_RECEIVING } |
This enumeration specifies the reception state of the radio. More... | |
enum | TransmissionState { TRANSMISSION_STATE_UNDEFINED, TRANSMISSION_STATE_IDLE, TRANSMISSION_STATE_TRANSMITTING } |
This enumeration specifies the transmission state of the radio. More... | |
Public Types inherited from inet::physicallayer::IPrintableObject | |
enum | PrintLevel { PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO, PRINT_LEVEL_COMPLETE = INT_MIN } |
Public Member Functions | |
virtual const cGate * | getRadioGate () const =0 |
Returns the gate of the radio that receives incoming radio frames. More... | |
virtual RadioMode | getRadioMode () const =0 |
Returns the current radio mode, This is the same mode as the one emitted with the last radioModeChangedSignal. More... | |
virtual void | setRadioMode (RadioMode radioMode)=0 |
Changes the current radio mode. More... | |
virtual ReceptionState | getReceptionState () const =0 |
Returns the current radio reception state. More... | |
virtual TransmissionState | getTransmissionState () const =0 |
Returns the current radio transmission state. More... | |
virtual int | getId () const =0 |
Returns an identifier for this radio which is globally unique for the whole lifetime of the simulation among all radios. More... | |
virtual const IAntenna * | getAntenna () const =0 |
Returns the antenna used by the transceiver of this radio. More... | |
virtual const ITransmitter * | getTransmitter () const =0 |
Returns the transmitter part of this radio. More... | |
virtual const IReceiver * | getReceiver () const =0 |
Returns the receiver part of this radio. More... | |
virtual const IRadioMedium * | getMedium () const =0 |
Returns the radio medium where this radio is transmitting and receiving radio signals. More... | |
virtual const ITransmission * | getTransmissionInProgress () const =0 |
Returns the ongoing transmission that the transmitter is currently transmitting or nullptr. More... | |
virtual const ITransmission * | getReceptionInProgress () const =0 |
Returns the ongoing reception that the receiver is currently receiving or nullptr. More... | |
virtual IRadioSignal::SignalPart | getTransmittedSignalPart () const =0 |
Returns the signal part of the ongoing transmission that the transmitter is currently transmitting or -1 if no transmission is in progress. More... | |
virtual IRadioSignal::SignalPart | getReceivedSignalPart () const =0 |
Returns the signal part of the ongoing reception that the receiver is currently receiving or -1 if no reception is in progress. More... | |
Public Member Functions inherited from inet::IPhysicalLayer | |
virtual | ~IPhysicalLayer () |
Public Member Functions inherited from inet::physicallayer::IPrintableObject | |
virtual | ~IPrintableObject () |
virtual std::ostream & | printToStream (std::ostream &stream, int level) const |
Prints this object to the provided output stream. More... | |
virtual std::string | getInfoStringRepresentation () const |
virtual std::string | getDetailStringRepresentation () const |
virtual std::string | getDebugStringRepresentation () const |
virtual std::string | getTraceStringRepresentation () const |
virtual std::string | getCompleteStringRepresentation () const |
Static Public Member Functions | |
static const char * | getRadioModeName (RadioMode radioMode) |
Returns the name of the provided radio mode. More... | |
static const char * | getRadioReceptionStateName (ReceptionState receptionState) |
Returns the name of the provided radio reception state. More... | |
static const char * | getRadioTransmissionStateName (TransmissionState transmissionState) |
Returns the name of the provided radio transmission state. More... | |
Static Public Attributes | |
static simsignal_t | radioModeChangedSignal = cComponent::registerSignal("radioModeChanged") |
This signal is emitted every time the radio mode changes. More... | |
static simsignal_t | listeningChangedSignal = cComponent::registerSignal("listeningChanged") |
This signal is emitted every time the radio listening changes. More... | |
static simsignal_t | receptionStateChangedSignal = cComponent::registerSignal("receptionStateChanged") |
This signal is emitted every time the radio reception state changes. More... | |
static simsignal_t | transmissionStateChangedSignal = cComponent::registerSignal("transmissionStateChanged") |
This signal is emitted every time the radio transmission state changes. More... | |
static simsignal_t | receivedSignalPartChangedSignal = cComponent::registerSignal("receivedSignalPartChanged") |
This signal is emitted every time the received part changes. More... | |
static simsignal_t | transmittedSignalPartChangedSignal = cComponent::registerSignal("transmittedSignalPartChanged") |
This signal is emitted every time the transmitted part changes. More... | |
Static Protected Attributes | |
static int | nextId = 0 |
static cEnum * | radioModeEnum = nullptr |
The enumeration registered for radio mode. More... | |
static cEnum * | receptionStateEnum = nullptr |
The enumeration registered for radio reception state. More... | |
static cEnum * | transmissionStateEnum = nullptr |
The enumeration registered for radio transmission state. More... | |
This interface represents a physical device that is capable of transmitting and receiving radio signals.
Simultaneous reception and transmission is also supported. The radio has an operation mode and it provides the state of the radio medium at its position.
This enumeration specifies the requested operational mode of the radio.
NOTE: Some parts of the code base may be sensitive to the order of the enum items because they may be used as an array index.
This enumeration specifies the reception state of the radio.
This also determines the state of the radio medium.
This enumeration specifies the transmission state of the radio.
|
pure virtual |
Returns the antenna used by the transceiver of this radio.
This function never returns nullptr.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::GridNeighborCache::addRadio(), inet::physicallayer::QuadTreeNeighborCache::addRadio(), inet::physicallayer::RadioMedium::addRadio(), inet::physicallayer::ScalarAnalogModelBase::computeReceptionPower(), inet::physicallayer::DimensionalAnalogModelBase::computeReceptionPower(), inet::physicallayer::APSKScalarTransmitter::createTransmission(), inet::physicallayer::Ieee80211ScalarTransmitter::createTransmission(), inet::physicallayer::Ieee802154NarrowbandScalarTransmitter::createTransmission(), inet::physicallayer::APSKDimensionalTransmitter::createTransmission(), inet::physicallayer::Ieee80211DimensionalTransmitter::createTransmission(), inet::physicallayer::Ieee80211IdealTransmitter::createTransmission(), inet::physicallayer::IdealTransmitter::createTransmission(), inet::physicallayer::Ieee802154UWBIRTransmitter::createTransmission(), inet::physicallayer::APSKLayeredTransmitter::createTransmission(), inet::physicallayer::Ieee80211LayeredOFDMTransmitter::createTransmission(), inet::physicallayer::GridNeighborCache::fillCubeVector(), inet::physicallayer::GridNeighborCache::sendToNeighbors(), inet::physicallayer::QuadTreeNeighborCache::sendToNeighbors(), and inet::physicallayer::NeighborListNeighborCache::updateNeighborList().
|
pure virtual |
Returns an identifier for this radio which is globally unique for the whole lifetime of the simulation among all radios.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::VectorCommunicationCache::addRadio(), inet::physicallayer::ReferenceCommunicationCache::getRadioCacheEntry(), inet::physicallayer::VectorCommunicationCache::getRadioCacheEntry(), inet::physicallayer::ReferenceCommunicationCache::getReceptionCacheEntry(), inet::physicallayer::VectorCommunicationCache::getReceptionCacheEntry(), inet::physicallayer::NeighborListNeighborCache::RadioEntry::operator==(), inet::physicallayer::ListeningBase::printToStream(), inet::physicallayer::ReceptionBase::printToStream(), inet::physicallayer::TransmissionBase::printToStream(), inet::physicallayer::NeighborListNeighborCache::removeRadio(), inet::physicallayer::GridNeighborCache::removeRadio(), inet::physicallayer::QuadTreeNeighborCache::removeRadio(), inet::physicallayer::RadioMedium::removeRadio(), inet::physicallayer::RadioMedium::sendToAffectedRadios(), inet::physicallayer::NeighborListNeighborCache::sendToNeighbors(), inet::physicallayer::NeighborListNeighborCache::updateNeighborList(), inet::physicallayer::GridNeighborCache::GridNeighborCacheVisitor::visit(), inet::physicallayer::QuadTreeNeighborCache::QuadTreeNeighborCacheVisitor::visit(), and inet::physicallayer::CommunicationLog::writeReception().
|
pure virtual |
Returns the radio medium where this radio is transmitting and receiving radio signals.
This function never returns nullptr.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::ReceiverBase::computeIsReceptionAttempted(), inet::physicallayer::FlatReceiverBase::computeListeningDecision(), inet::physicallayer::APSKLayeredReceiver::computeListeningDecision(), inet::physicallayer::Ieee80211LayeredOFDMReceiver::computeListeningDecision(), inet::physicallayer::TwoRayInterference::computePathLoss(), inet::physicallayer::PathLossBase::computePathLoss(), inet::physicallayer::TwoRayGroundReflection::computePathLoss(), inet::physicallayer::IdealAnalogModel::computeReception(), inet::physicallayer::ScalarAnalogModelBase::computeReceptionPower(), inet::physicallayer::DimensionalAnalogModelBase::computeReceptionPower(), inet::physicallayer::ReceiverBase::computeReceptionResult(), inet::physicallayer::RadioFrame::getArrival(), inet::physicallayer::RadioFrame::getListening(), inet::physicallayer::RadioFrame::getReception(), inet::NetworkConfiguratorBase::getWirelessId(), and inet::visualizer::MediumCanvasVisualizer::radioAdded().
|
pure virtual |
Returns the gate of the radio that receives incoming radio frames.
Implemented in inet::physicallayer::Radio.
|
pure virtual |
Returns the current radio mode, This is the same mode as the one emitted with the last radioModeChangedSignal.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::StateBasedCcEnergyConsumer::computeCurrentConsumption(), inet::physicallayer::StateBasedEpEnergyConsumer::computePowerConsumption(), inet::ieee80211::Ieee80211Mac::configureRadioMode(), and inet::BMacLayer::handleSelfMessage().
|
static |
Returns the name of the provided radio mode.
Referenced by inet::physicallayer::Radio::completeRadioModeSwitch(), and inet::physicallayer::Radio::startRadioModeSwitch().
|
static |
Returns the name of the provided radio reception state.
Referenced by inet::physicallayer::Radio::updateTransceiverState().
|
static |
Returns the name of the provided radio transmission state.
Referenced by inet::physicallayer::Radio::updateTransceiverState().
|
pure virtual |
Returns the signal part of the ongoing reception that the receiver is currently receiving or -1 if no reception is in progress.
This is the same part as the one emitted with the last receivedPartChangedSignal.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::StateBasedCcEnergyConsumer::computeCurrentConsumption(), and inet::physicallayer::StateBasedEpEnergyConsumer::computePowerConsumption().
|
pure virtual |
Returns the receiver part of this radio.
This function never returns nullptr.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::RadioMedium::addRadio(), inet::physicallayer::RadioMedium::computeListeningDecision(), inet::physicallayer::RadioMedium::computeReceptionDecision(), inet::physicallayer::RadioMedium::computeReceptionResult(), inet::physicallayer::RadioMedium::isPotentialReceiver(), inet::physicallayer::RadioMedium::isReceptionAttempted(), inet::physicallayer::RadioMedium::isReceptionPossible(), and inet::physicallayer::RadioMedium::isReceptionSuccessful().
|
pure virtual |
Returns the ongoing reception that the receiver is currently receiving or nullptr.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::ReceiverBase::computeIsReceptionAttempted().
|
pure virtual |
Returns the current radio reception state.
This is the same state as the one emitted with the last receptionStateChangedSignal.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::StateBasedCcEnergyConsumer::computeCurrentConsumption(), inet::physicallayer::StateBasedEpEnergyConsumer::computePowerConsumption(), inet::BMacLayer::handleSelfMessage(), inet::CsmaCaMac::isMediumFree(), inet::CsmaCaMac::isReceiving(), and inet::CSMA::updateStatusCCA().
|
pure virtual |
Returns the ongoing transmission that the transmitter is currently transmitting or nullptr.
Implemented in inet::physicallayer::Radio.
|
pure virtual |
Returns the current radio transmission state.
This is the same state as the one emitted with the last transmissionStateChangedSignal.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::StateBasedCcEnergyConsumer::computeCurrentConsumption(), inet::physicallayer::StateBasedEpEnergyConsumer::computePowerConsumption(), inet::BMacLayer::handleSelfMessage(), and inet::IdealMac::handleUpperPacket().
|
pure virtual |
Returns the signal part of the ongoing transmission that the transmitter is currently transmitting or -1 if no transmission is in progress.
This is the same part as the one emitted with the last transmittedPartChangedSignal.
Implemented in inet::physicallayer::Radio.
Referenced by inet::physicallayer::StateBasedCcEnergyConsumer::computeCurrentConsumption(), and inet::physicallayer::StateBasedEpEnergyConsumer::computePowerConsumption().
|
pure virtual |
Returns the transmitter part of this radio.
This function never returns nullptr.
Implemented in inet::physicallayer::Radio.
Referenced by inet::NetworkConfiguratorBase::computeWirelessLinkWeight(), inet::physicallayer::RadioMedium::createTransmitterRadioFrame(), inet::physicallayer::MediumLimitCache::getMaxCommunicationRange(), and inet::physicallayer::MediumLimitCache::getMaxInterferenceRange().
|
pure virtual |
Changes the current radio mode.
The actual change may take zero or more time. The new radio mode will be emitted with a radioModeChangedSignal.
Implemented in inet::physicallayer::Radio.
Referenced by inet::ieee80211::Ieee80211Mac::handleNodeStart(), inet::BMacLayer::handleSelfMessage(), inet::LMacLayer::handleSelfMessage(), inet::ieee80211::Ieee80211Mac::initialize(), inet::IdealMac::initialize(), inet::CSMA::initialize(), inet::CsmaCaMac::initialize(), inet::physicallayer::StateBasedCcEnergyConsumer::receiveSignal(), inet::IdealMac::receiveSignal(), inet::LMacLayer::receiveSignal(), inet::CsmaCaMac::receiveSignal(), inet::CsmaCaMac::sendAckFrame(), inet::CsmaCaMac::sendDataFrame(), inet::IdealMac::startTransmitting(), inet::CSMA::updateStatusBackoff(), inet::CSMA::updateStatusCCA(), inet::CSMA::updateStatusIdle(), inet::CSMA::updateStatusTransmitAck(), and inet::CSMA::updateStatusTransmitFrame().
|
static |
This signal is emitted every time the radio listening changes.
The signal value is the new listening.
Referenced by inet::physicallayer::RadioMedium::addRadio(), inet::physicallayer::RadioMedium::receiveSignal(), inet::physicallayer::RadioMedium::removeRadio(), inet::physicallayer::Ieee80211Radio::setBand(), inet::physicallayer::Ieee80211Radio::setChannel(), inet::physicallayer::Ieee80211Radio::setChannelNumber(), inet::physicallayer::Ieee80211Radio::setMode(), and inet::physicallayer::Ieee80211Radio::setModeSet().
|
staticprotected |
|
static |
This signal is emitted every time the radio mode changes.
The signal value is the new radio mode.
Referenced by inet::physicallayer::RadioMedium::addRadio(), inet::physicallayer::Radio::completeRadioModeSwitch(), inet::physicallayer::StateBasedEpEnergyConsumer::initialize(), inet::physicallayer::StateBasedCcEnergyConsumer::initialize(), inet::ieee80211::Ieee80211Mac::initialize(), inet::BMacLayer::initialize(), inet::CSMA::initialize(), inet::LMacLayer::initialize(), inet::physicallayer::StateBasedEpEnergyConsumer::receiveSignal(), inet::physicallayer::StateBasedCcEnergyConsumer::receiveSignal(), inet::visualizer::RadioVisualizerBase::receiveSignal(), inet::BMacLayer::receiveSignal(), inet::LMacLayer::receiveSignal(), inet::physicallayer::RadioMedium::receiveSignal(), inet::physicallayer::RadioMedium::removeRadio(), inet::physicallayer::Radio::startRadioModeSwitch(), inet::visualizer::RadioVisualizerBase::subscribe(), and inet::visualizer::RadioVisualizerBase::unsubscribe().
|
staticprotected |
The enumeration registered for radio mode.
Referenced by getRadioModeName().
|
static |
This signal is emitted every time the received part changes.
The signal value is the new received part.
Referenced by inet::physicallayer::StateBasedEpEnergyConsumer::initialize(), inet::physicallayer::StateBasedCcEnergyConsumer::initialize(), inet::ieee80211::Ieee80211Mac::initialize(), inet::physicallayer::StateBasedEpEnergyConsumer::receiveSignal(), inet::ieee80211::Ieee80211Mac::receiveSignal(), inet::physicallayer::StateBasedCcEnergyConsumer::receiveSignal(), and inet::physicallayer::Radio::updateTransceiverPart().
|
static |
This signal is emitted every time the radio reception state changes.
The signal value is the new radio reception state.
Referenced by inet::physicallayer::StateBasedEpEnergyConsumer::initialize(), inet::physicallayer::StateBasedCcEnergyConsumer::initialize(), inet::ieee80211::Ieee80211Mac::initialize(), inet::CsmaCaMac::initialize(), inet::ieee80211::Ieee80211MgmtSTA::processScanCommand(), inet::physicallayer::StateBasedEpEnergyConsumer::receiveSignal(), inet::ieee80211::Ieee80211Mac::receiveSignal(), inet::physicallayer::StateBasedCcEnergyConsumer::receiveSignal(), inet::visualizer::RadioVisualizerBase::receiveSignal(), inet::CsmaCaMac::receiveSignal(), inet::ieee80211::Ieee80211MgmtSTA::receiveSignal(), inet::ieee80211::Ieee80211MgmtSTA::scanNextChannel(), inet::visualizer::RadioVisualizerBase::subscribe(), inet::visualizer::RadioVisualizerBase::unsubscribe(), and inet::physicallayer::Radio::updateTransceiverState().
|
staticprotected |
The enumeration registered for radio reception state.
Referenced by getRadioReceptionStateName().
|
static |
This signal is emitted every time the radio transmission state changes.
The signal value is the new radio transmission state.
Referenced by inet::physicallayer::StateBasedEpEnergyConsumer::initialize(), inet::physicallayer::StateBasedCcEnergyConsumer::initialize(), inet::ieee80211::Ieee80211Mac::initialize(), inet::BMacLayer::initialize(), inet::IdealMac::initialize(), inet::CSMA::initialize(), inet::LMacLayer::initialize(), inet::CsmaCaMac::initialize(), inet::physicallayer::StateBasedEpEnergyConsumer::receiveSignal(), inet::ieee80211::Ieee80211Mac::receiveSignal(), inet::physicallayer::StateBasedCcEnergyConsumer::receiveSignal(), inet::visualizer::RadioVisualizerBase::receiveSignal(), inet::IdealMac::receiveSignal(), inet::BMacLayer::receiveSignal(), inet::CSMA::receiveSignal(), inet::LMacLayer::receiveSignal(), inet::CsmaCaMac::receiveSignal(), inet::visualizer::RadioVisualizerBase::subscribe(), inet::visualizer::RadioVisualizerBase::unsubscribe(), and inet::physicallayer::Radio::updateTransceiverState().
|
staticprotected |
The enumeration registered for radio transmission state.
Referenced by getRadioTransmissionStateName().
|
static |
This signal is emitted every time the transmitted part changes.
The signal value is the new transmitted part.
Referenced by inet::physicallayer::StateBasedEpEnergyConsumer::initialize(), inet::physicallayer::StateBasedCcEnergyConsumer::initialize(), inet::physicallayer::StateBasedEpEnergyConsumer::receiveSignal(), inet::physicallayer::StateBasedCcEnergyConsumer::receiveSignal(), and inet::physicallayer::Radio::updateTransceiverPart().