|
DESERT 4.0.0
|
#include <uwmulti-stack-controller-phy-master.h>


Classes | |
| class | UwMultiStackSignalingTimer |
Public Member Functions | |
| UwMultiStackControllerPhyMaster () | |
| virtual | ~UwMultiStackControllerPhyMaster () |
| virtual int | command (int, const char *const *) |
| virtual void | recv (Packet *p, int idSrc) |
Public Member Functions inherited from UwMultiStackControllerPhy | |
| UwMultiStackControllerPhy () | |
| virtual | ~UwMultiStackControllerPhy () |
Public Member Functions inherited from UwMultiStackController | |
| UwMultiStackController () | |
| virtual | ~UwMultiStackController () |
| virtual void | addLayer (int id, int order) |
| virtual void | addThreshold (int i, int j, double thres_ij) |
| virtual void | recv (Packet *p) |
| int | getOrder (int layer_id) |
| int | getId (int layer_order) |
Protected Member Functions | |
| virtual int | getBestLayer (Packet *p) |
| virtual void | checkAndSignal () |
| virtual void | resetCheckAndSignal () |
| virtual int | checkBestLayer () |
| virtual void | signalsBestPhy () |
| int | recvSyncClMsg (ClMessage *m) |
| virtual void | updateMasterStatistics (Packet *p, int idSrc) |
| int | getShorterRangeLayer (int layer_id) |
| int | getLongerRangeLayer (int layer_id) |
Protected Member Functions inherited from UwMultiStackControllerPhy | |
| virtual void | initInfo () |
| virtual void | stateIdle () |
| virtual void | stateBusy2Rx (int id) |
| virtual void | stateBusy2Tx (Packet *p) |
Protected Member Functions inherited from UwMultiStackController | |
| virtual void | recvFromUpperLayers (Packet *p) |
| virtual bool | isLayerAvailable (int id) |
| virtual double | getMetricFromSelectedLowerLayer (int id, Packet *p) |
| virtual bool | getThreshold (int i, int j, double &thres_ij) |
| virtual void | eraseThreshold (int i, int j) |
| void | setThreshold (int i, int j, double thres_ij) |
Protected Attributes | |
| int | signaling_active_ |
| int | last_layer_used_ |
| double | power_statistics_ |
| int | power_stat_node_ |
| double | alpha_ |
| double | signaling_period_ |
| int | signaling_sent_ |
| UwMultiStackSignalingTimer | signaling_timer_ |
Protected Attributes inherited from UwMultiStackControllerPhy | |
| int | receiving_id |
| UWPHY_CONTROLLER_STATE | current_state |
Protected Attributes inherited from UwMultiStackController | |
| int | debug_ |
| double | min_delay_ |
| Mode | switch_mode_ |
| int | lower_id_active_ |
| std::map< int, int > | id2order |
| ThresMatrix | threshold_map |
| std::map< int, int > | order2id |
| int | signaling_pktSize_ |
Additional Inherited Members | |
Static Public Attributes inherited from UwMultiStackController | |
| static int const | layer_not_exist = -1 |
Protected Types inherited from UwMultiStackControllerPhy | |
| enum | UWPHY_CONTROLLER_STATE { UWPHY_CONTROLLER_STATE_IDLE = 1 , UWPHY_CONTROLLER_STATE_BUSY_2_TX , UWPHY_CONTROLLER_STATE_BUSY_2_RX } |
Protected Types inherited from UwMultiStackController | |
| enum | Mode { UW_MANUAL_SWITCH = 0 , UW_AUTOMATIC_SWITCH } |
Static Protected Attributes inherited from UwMultiStackControllerPhy | |
| static map< UWPHY_CONTROLLER_STATE, string > | state_info |
Class used to represents the UwMultiStackControllerPhyMaster layer of a node.
| UwMultiStackControllerPhyMaster::UwMultiStackControllerPhyMaster | ( | ) |
Constructor of UwMultiPhy class.
References alpha_, signaling_active_, and signaling_period_.
|
inlinevirtual |
Destructor of UwMultiPhy class.
|
protectedvirtual |
If signaling is active, check the average power thresholds at each packet received
References checkBestLayer(), last_layer_used_, UwMultiStackController::lower_id_active_, power_statistics_, signaling_active_, and signalsBestPhy().
Referenced by resetCheckAndSignal(), and updateMasterStatistics().

|
protectedvirtual |
Check the average power thresholds
References UwMultiStackController::debug_, getLongerRangeLayer(), getShorterRangeLayer(), UwMultiStackController::getThreshold(), last_layer_used_, UwMultiStackController::lower_id_active_, power_statistics_, signaling_active_, signaling_period_, and signaling_timer_.
Referenced by checkAndSignal(), and getBestLayer().

|
virtual |
TCL command interpreter. It implements the following OTcl methods:
| argc | Number of arguments in argv. |
| argv | Array of strings which are the command parameters (Note that argv[0] is the name of the object). |
Reimplemented from UwMultiStackControllerPhy.
References alpha_, UwMultiStackControllerPhy::command(), last_layer_used_, UwMultiStackController::lower_id_active_, signaling_active_, and signaling_sent_.

|
protectedvirtual |
Return the best layer to forward the packet when the system works in AUTOMATIC_MODE. It overloads in the extended classes to implement the choice rule.
| p | pointer to the packet |
Reimplemented from UwMultiStackController.
References checkBestLayer(), last_layer_used_, UwMultiStackController::lower_id_active_, power_statistics_, signaling_active_, UwMultiStackController::switch_mode_, and UwMultiStackController::UW_AUTOMATIC_SWITCH.

|
inlineprotected |
Return the previous layer in order which can achieve longer range with lower bitrete.
| layer_id | id of the current layer |
References UwMultiStackController::getId(), UwMultiStackController::getOrder(), and UwMultiStackController::layer_not_exist.
Referenced by checkBestLayer().

|
inlineprotected |
Return the next layer in order which can achieve shorter range with higer bitrete.
| layer_id | id of the current layer |
References UwMultiStackController::getId(), UwMultiStackController::getOrder(), and UwMultiStackController::layer_not_exist.
Referenced by checkBestLayer().

|
virtual |
It manages each packet reception, either from the upper and the lower layer
| p | pointer to the packet will be received |
| idSrc | unique id of the module that has sent the packet |
Reimplemented from UwMultiStackControllerPhy.
References PT_MULTI_ST_SIGNALING, UwMultiStackControllerPhy::recv(), and updateMasterStatistics().

|
protectedvirtual |
Cross-Layer messages synchronous interpreter. It has to be properly extended in order to interpret custom cross-layer messages used by this particular plug-in. This type of communication need to be directly answered in the message exchanged in order to be synchronous with the source.
| m | an instance of ClMessage that represent the message received and used for the answer |
Reimplemented from UwMultiStackControllerPhy.
References PT_MULTI_ST_SIGNALING, and UwMultiStackControllerPhy::recvSyncClMsg().

|
protectedvirtual |
If signaling is active and signaling timer expires, check the average power thresholds at each packet received
References checkAndSignal(), UwMultiStackController::debug_, power_stat_node_, power_statistics_, and signaling_active_.

|
protectedvirtual |
Signals the best phy
References UwMultiStackController::debug_, UwMultiStackController::lower_id_active_, UwMultiStackController::min_delay_, power_stat_node_, PT_MULTI_ST_SIGNALING, signaling_active_, UwMultiStackController::signaling_pktSize_, and signaling_sent_.
Referenced by checkAndSignal().
|
protectedvirtual |
It implements the slave choice rule to choose the lower layer when the system works in AUTOMATIC_MODE.
| p | pointer to the packet |
| idSrc | unique id of the module that has sent the packet |
References alpha_, checkAndSignal(), UwMultiStackController::debug_, UwMultiStackController::lower_id_active_, power_stat_node_, power_statistics_, and signaling_active_.
Referenced by recv().

|
protected |
Address of the node which the master is collecting the average power IIR parameter
Referenced by command(), updateMasterStatistics(), and UwMultiStackControllerPhyMaster().
|
protected |
If true master is in signaling mode, otherwise not
Referenced by checkAndSignal(), checkBestLayer(), command(), and getBestLayer().
|
protected |
Average received power from the closest node according to the IIR filter
Referenced by resetCheckAndSignal(), signalsBestPhy(), and updateMasterStatistics().
|
protected |
ID of the last PHY layer used
Referenced by checkAndSignal(), checkBestLayer(), getBestLayer(), resetCheckAndSignal(), and updateMasterStatistics().
|
protected |
|
protected |
Referenced by checkBestLayer(), and UwMultiStackControllerPhyMaster().
|
protected |
Period to check the best layer if no interactions occurs
Referenced by command(), and signalsBestPhy().
|
protected |
Number of signaling packets sent UwMultiStack signaling timer handler
Referenced by checkBestLayer().