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


Public Member Functions | |
| UwMultiStackControllerPhySlave () | |
| virtual | ~UwMultiStackControllerPhySlave () |
| 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 | updateSlave (Packet *p, int idSrc) |
| int | recvSyncClMsg (ClMessage *m) |
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 | slave_lower_layer_ |
| int | signaling_recv_ |
| int | signaling_active_ |
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 UwMultiStackControllerPhySlave layer of a node.
| UwMultiStackControllerPhySlave::UwMultiStackControllerPhySlave | ( | ) |
Constructor of UwMultiPhy class.
References signaling_active_.
|
inlinevirtual |
Destructor of UwMultiPhy class.
|
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 UwMultiStackControllerPhy::command(), UwMultiStackController::lower_id_active_, signaling_active_, signaling_recv_, and slave_lower_layer_.

|
protectedvirtual |
If true slave is in signaling mode, otherwise not Return the best layer to forward the packet when the system works in AUTOMATIC_MODE. It has to be overload in the extended classes to implement the choice rule.
| p | pointer to the packet |
Reimplemented from UwMultiStackController.
References UwMultiStackController::debug_, UwMultiStackController::lower_id_active_, slave_lower_layer_, UwMultiStackController::switch_mode_, and UwMultiStackController::UW_AUTOMATIC_SWITCH.
|
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 UwMultiStackController::debug_, UwMultiStackController::lower_id_active_, UwMultiStackController::min_delay_, PT_MULTI_ST_SIGNALING, UwMultiStackControllerPhy::recv(), signaling_active_, signaling_recv_, and updateSlave().

|
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 |
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 UwMultiStackController::debug_, and slave_lower_layer_.
Referenced by recv().
|
protected |
Number of signaling packets received
Referenced by command(), recv(), and UwMultiStackControllerPhySlave().
|
protected |
Referenced by command(), getBestLayer(), and updateSlave().