ChannelControl Class Reference¶
|
Simu5G
|
#include <ChannelControl.h>
Public Member Functions | |
| RadioRef | registerRadio (cModule *radioModule, cGate *radioInGate=nullptr) override |
| void | unregisterRadio (RadioRef r) override |
| cModule * | getRadioModule (RadioRef r) const override |
| cGate * | getRadioGate (RadioRef r) const override |
| int | getRadioChannel (RadioRef r) const override |
| void | setRadioPosition (RadioRef r, const inet::Coord &pos) override |
| void | setRadioChannel (RadioRef r, int channel) override |
| int | getNumChannels () override |
| const TransmissionList & | getOngoingTransmissions (int channel) override |
| void | sendToChannel (RadioRef srcRadio, AirFrame *airFrame) override |
| double | getInterferenceRange (RadioRef r) override |
| void | disableReception (RadioRef r) override |
| void | enableReception (RadioRef r) override |
| double | getPropagationSpeed () override |
Protected Types | |
| typedef std::vector< TransmissionList > | ChannelTransmissionLists |
Protected Member Functions | |
| virtual double | calcInterfDist () |
| void | initialize (int stage) override |
| virtual void | purgeOngoingTransmissions () |
| virtual void | checkChannel (int channel) |
| virtual const RadioRefVector & | getNeighbors (RadioRef h) |
| virtual void | addOngoingTransmission (RadioRef h, AirFrame *frame) |
| virtual RadioRef | lookupRadio (cModule *radioModule) |
Protected Attributes | |
| simtime_t | lastOngoingTransmissionsUpdate = 0 |
| double | maxInterferenceDistance |
| int | numChannels |
Detailed Description
Monitors which radios are "in range". Supports multiple channels.
- See also
- ChannelAccess
Member Typedef Documentation
◆ ChannelTransmissionLists
|
protected |
keeps track of ongoing transmissions; this is needed when a radio switches to another channel (then it needs to know whether the target channel is empty or busy)
Member Function Documentation
◆ calcInterfDist()
|
protectedvirtual |
Calculate interference distance
Reimplemented in LteChannelControl.
◆ initialize()
|
overrideprotected |
Reads init parameters and calculates a maximum interference distance
◆ purgeOngoingTransmissions()
|
protectedvirtual |
Throws away expired transmissions.
◆ checkChannel()
|
protectedvirtual |
Validate the channel identifier
◆ getNeighbors()
|
protectedvirtual |
Get the list of modules in range of the given host
◆ addOngoingTransmission()
|
protectedvirtual |
Notifies the channel control with an ongoing transmission
◆ lookupRadio()
|
protectedvirtual |
Returns the "handle" of a previously registered radio. The pointer to the registering (radio) module must be provided
◆ registerRadio()
|
overridevirtual |
Registers the given radio. If radioInGate==NULL, the "radioIn" gate is assumed
Implements IChannelControl.
◆ unregisterRadio()
|
overridevirtual |
Unregisters the given radio
Implements IChannelControl.
◆ getRadioModule()
|
inlineoverridevirtual |
Returns the host module that contains the given radio
Implements IChannelControl.
◆ getRadioGate()
|
inlineoverridevirtual |
Returns the input gate of the host for receiving AirFrames
Implements IChannelControl.
◆ getRadioChannel()
|
inlineoverridevirtual |
Returns the channel the given radio listens on
Implements IChannelControl.
◆ setRadioPosition()
|
overridevirtual |
To be called when the host moved; updates proximity info
Implements IChannelControl.
◆ setRadioChannel()
|
overridevirtual |
Called when host switches channel
Implements IChannelControl.
◆ getNumChannels()
|
inlineoverridevirtual |
Returns the number of radio channels (frequencies) simulated
Implements IChannelControl.
References numChannels.
◆ getOngoingTransmissions()
|
overridevirtual |
Provides a list of transmissions currently on the air
Implements IChannelControl.
◆ sendToChannel()
|
overridevirtual |
Called from ChannelAccess, to transmit a frame to the radios in range, on the frame's channel
Implements IChannelControl.
Reimplemented in LteChannelControl.
◆ getInterferenceRange()
|
inlineoverridevirtual |
Returns the maximum interference distance
Implements IChannelControl.
References maxInterferenceDistance.
◆ disableReception()
|
inlineoverridevirtual |
Disable the reception in the reference module
Implements IChannelControl.
◆ enableReception()
|
inlineoverridevirtual |
Enable the reception in the reference module
Implements IChannelControl.
◆ getPropagationSpeed()
|
inlineoverridevirtual |
Returns propagation speed of the signal in meters/sec
Implements IChannelControl.
Member Data Documentation
◆ lastOngoingTransmissionsUpdate
|
protected |
used to clear the transmission list from time to time
◆ maxInterferenceDistance
|
protected |
the maximum interference distance in the network.
Referenced by getInterferenceRange().
◆ numChannels
|
protected |
the number of controlled channels
Referenced by getNumChannels().
Generated by