DESERT 3.5.1
Loading...
Searching...
No Matches
UwMultiStackControllerPhySlave Class Reference

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

Inheritance diagram for UwMultiStackControllerPhySlave:
Collaboration diagram for UwMultiStackControllerPhySlave:

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
 

Detailed Description

Class used to represents the UwMultiStackControllerPhySlave layer of a node.

Definition at line 47 of file uwmulti-stack-controller-phy-slave.h.

Constructor & Destructor Documentation

◆ UwMultiStackControllerPhySlave()

UwMultiStackControllerPhySlave::UwMultiStackControllerPhySlave ( )

Constructor of UwMultiPhy class.

Definition at line 58 of file uwmulti-stack-controller-phy-slave.cc.

◆ ~UwMultiStackControllerPhySlave()

virtual UwMultiStackControllerPhySlave::~UwMultiStackControllerPhySlave ( )
inlinevirtual

Destructor of UwMultiPhy class.

Definition at line 59 of file uwmulti-stack-controller-phy-slave.h.

Member Function Documentation

◆ command()

int UwMultiStackControllerPhySlave::command ( int  argc,
const char *const *  argv 
)
virtual

TCL command interpreter.

It implements the following OTcl methods:

Parameters
argcNumber of arguments in argv.
argvArray of strings which are the command parameters (Note that argv[0] is the name of the object).
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.

Reimplemented from UwMultiStackControllerPhy.

Definition at line 67 of file uwmulti-stack-controller-phy-slave.cc.

◆ getBestLayer()

int UwMultiStackControllerPhySlave::getBestLayer ( Packet *  p)
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.

Parameters
ppointer to the packet
Returns
id of the module representing the best layer

Reimplemented from UwMultiStackController.

Definition at line 147 of file uwmulti-stack-controller-phy-slave.cc.

◆ recv()

void UwMultiStackControllerPhySlave::recv ( Packet *  p,
int  idSrc 
)
virtual

It manages each packet reception, either from the upper and the lower layer.

Parameters
ppointer to the packet will be received
idSrcunique id of the module that has sent the packet
See also
SAP, ChSAP

Reimplemented from UwMultiStackControllerPhy.

Definition at line 100 of file uwmulti-stack-controller-phy-slave.cc.

◆ recvSyncClMsg()

int UwMultiStackControllerPhySlave::recvSyncClMsg ( ClMessage *  m)
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.

Parameters
man instance of ClMessage that represent the message received and used for the answer
Returns
zero if successful
See also
NodeCore, ClMessage, ClSAP, ClTracer, UwMultiStackControllerPhy

Reimplemented from UwMultiStackControllerPhy.

Definition at line 131 of file uwmulti-stack-controller-phy-slave.cc.

◆ updateSlave()

void UwMultiStackControllerPhySlave::updateSlave ( Packet *  p,
int  idSrc 
)
protectedvirtual

It implements the slave choice rule to choose the lower layer when the system works in AUTOMATIC_MODE.

Parameters
ppointer to the packet
idSrcunique id of the module that has sent the packet

Definition at line 164 of file uwmulti-stack-controller-phy-slave.cc.

Member Data Documentation

◆ signaling_active_

int UwMultiStackControllerPhySlave::signaling_active_
protected

Number of signaling packets received.

Definition at line 86 of file uwmulti-stack-controller-phy-slave.h.

◆ signaling_recv_

int UwMultiStackControllerPhySlave::signaling_recv_
protected

Definition at line 85 of file uwmulti-stack-controller-phy-slave.h.

◆ slave_lower_layer_

int UwMultiStackControllerPhySlave::slave_lower_layer_
protected

Definition at line 84 of file uwmulti-stack-controller-phy-slave.h.


The documentation for this class was generated from the following files: