IChannelControl Class Reference

Simu5G: IChannelControl Class Reference
Simu5G
IChannelControl Class Referenceabstract

#include <IChannelControl.h>

Inheritance diagram for IChannelControl:
[legend]

Classes

struct  RadioEntry

Public Member Functions

virtual RadioRef registerRadio (cModule *radioModule, cGate *radioInGate=nullptr)=0
virtual void unregisterRadio (RadioRef r)=0
virtual cModule * getRadioModule (RadioRef r) const =0
virtual cGate * getRadioGate (RadioRef r) const =0
virtual int getRadioChannel (RadioRef r) const =0
virtual void setRadioPosition (RadioRef r, const inet::Coord &pos)=0
virtual void setRadioChannel (RadioRef r, int channel)=0
virtual int getNumChannels ()=0
virtual const TransmissionList & getOngoingTransmissions (int channel)=0
virtual void sendToChannel (RadioRef srcRadio, AirFrame *airFrame)=0
virtual double getInterferenceRange (RadioRef r)=0
virtual void disableReception (RadioRef r)=0
virtual void enableReception (RadioRef r)=0
virtual double getPropagationSpeed ()=0

Detailed Description

Interface to implement for a module that controls radio frequency channel access.

Member Function Documentation

◆ registerRadio()

virtual RadioRef registerRadio ( cModule * radioModule,
cGate * radioInGate = nullptr )
pure virtual

Registers the given radio. If radioInGate==nullptr, the "radioIn" gate is assumed

Implemented in ChannelControl.

◆ unregisterRadio()

virtual void unregisterRadio ( RadioRef r)
pure virtual

Unregisters the given radio

Implemented in ChannelControl.

◆ getRadioModule()

virtual cModule * getRadioModule ( RadioRef r) const
pure virtual

Returns the host module that contains the given radio

Implemented in ChannelControl.

◆ getRadioGate()

virtual cGate * getRadioGate ( RadioRef r) const
pure virtual

Returns the input gate of the host for receiving AirFrames

Implemented in ChannelControl.

◆ getRadioChannel()

virtual int getRadioChannel ( RadioRef r) const
pure virtual

Returns the channel the given radio listens on

Implemented in ChannelControl.

◆ setRadioPosition()

virtual void setRadioPosition ( RadioRef r,
const inet::Coord & pos )
pure virtual

To be called when the host moved; updates proximity info

Implemented in ChannelControl.

◆ setRadioChannel()

virtual void setRadioChannel ( RadioRef r,
int channel )
pure virtual

Called when host switches channel

Implemented in ChannelControl.

◆ getNumChannels()

virtual int getNumChannels ( )
pure virtual

Returns the number of radio channels (frequencies) simulated

Implemented in ChannelControl.

◆ getOngoingTransmissions()

virtual const TransmissionList & getOngoingTransmissions ( int channel)
pure virtual

Provides a list of transmissions currently on the air

Implemented in ChannelControl.

◆ sendToChannel()

virtual void sendToChannel ( RadioRef srcRadio,
AirFrame * airFrame )
pure virtual

Called from ChannelAccess, to transmit a frame to the radios in range, on the frame's channel

Implemented in ChannelControl, and LteChannelControl.

◆ getInterferenceRange()

virtual double getInterferenceRange ( RadioRef r)
pure virtual

Returns the maximal interference distance

Implemented in ChannelControl.

◆ disableReception()

virtual void disableReception ( RadioRef r)
pure virtual

Disable the reception in the reference module

Implemented in ChannelControl.

◆ enableReception()

virtual void enableReception ( RadioRef r)
pure virtual

Enable the reception in the reference module

Implemented in ChannelControl.

◆ getPropagationSpeed()

virtual double getPropagationSpeed ( )
pure virtual

Returns propagation speed of the signal in meters/sec

Implemented in ChannelControl.