Public Member Functions | Protected Attributes

MacToPhyControlInfo Class Reference
[phyLayer - physical layer modulesmacLayer - MAC layer modules]

Stores information which is needed by the physical layer when sending a MacPkt. More...

#include <MacToPhyControlInfo.h>

Inherited by MacToUWBIRPhyControlInfo.

Collaboration diagram for MacToPhyControlInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MacToPhyControlInfo (Signal *signal=0)
 Initialize the MacToPhyControlInfo with the passed signal or null if signal is ommited.
virtual ~MacToPhyControlInfo ()
 Delete the signal if it is still in our ownership.
void setSignal (Signal *s)
 Sets the signal of this MacToPhyControlInfo.
SignalretrieveSignal ()
 Returns a pointer to the Signal of this ControlInfo.

Protected Attributes

Signalsignal
 A pointer to the signal representing the transmission.

Detailed Description

Stores information which is needed by the physical layer when sending a MacPkt.

Definition at line 13 of file MacToPhyControlInfo.h.


Constructor & Destructor Documentation

MacToPhyControlInfo::MacToPhyControlInfo ( Signal signal = 0  )  [inline]

Initialize the MacToPhyControlInfo with the passed signal or null if signal is ommited.

NOTE: Once a signal is passed to the MacToPhyControlInfo, MacToPhyControlInfo takes the ownership of the Signal.

Definition at line 26 of file MacToPhyControlInfo.h.

                                         :
    signal(signal) {}


Member Function Documentation

Signal* MacToPhyControlInfo::retrieveSignal (  )  [inline]

Returns a pointer to the Signal of this ControlInfo.

NOTE: The ownership of the Signal is passed together with the Signal itself. This means the caller of this method is responsible for deletion of the Signal. MacToPhyControlInfo also loses its pointer to the Signal when this Method is called so following calls of this method will return null!

Definition at line 60 of file MacToPhyControlInfo.h.

References signal.

Referenced by PhyLayerUWBIR::encapsMsg().

                           {
    Signal* tmp = signal;
    signal = 0;
    return tmp;
  }

void MacToPhyControlInfo::setSignal ( Signal s  )  [inline]

Sets the signal of this MacToPhyControlInfo.

NOTE: Once a signal is passed to the MacToPhyControlInfo, MacToPhyControlInfo takes the ownership of the Signal.

Definition at line 43 of file MacToPhyControlInfo.h.

References signal.

                            {
    if(signal)
      delete signal;

    signal = s;
  }


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