Stores control information from mac to upper layer. More...
#include <MacToNetwControlInfo.h>
Public Member Functions | |
MacToNetwControlInfo (long lastHop, double ber=0, double rssi=0) | |
Initializes with the passed last hop address and bit error rate. | |
double | getBitErrorRate () const |
Returns the bit error rate for this packet. | |
virtual void | setBitErrorRate (double ber) |
Sets the bit error rate for this control infos packet. | |
long | getLastHopMac () const |
Returns the MAC address of the packets last hop. | |
virtual void | setLastHopMac (long lastHop) |
Sets the MAC address of the packets last hop. | |
virtual const double | getRSSI () |
Returns the packets received signal strength. | |
void | setRSSI (double _rssi) |
Sets the packets received signal strength. | |
Protected Attributes | |
double | bitErrorRate |
The bit error rate for this packet. | |
long | lastHopMac |
MAC address of the last hop of this packet. | |
double | rssi |
The received signal strength for this packet. |
Stores control information from mac to upper layer.
Holds the bit error rate of the transmission as well as the MAC address of the last hop.
Definition at line 33 of file MacToNetwControlInfo.h.
virtual const double MacToNetwControlInfo::getRSSI | ( | ) | [inline, virtual] |
Returns the packets received signal strength.
Definition at line 94 of file MacToNetwControlInfo.h.
References rssi.
{ return rssi; }
virtual void MacToNetwControlInfo::setBitErrorRate | ( | double | ber | ) | [inline, virtual] |
Sets the bit error rate for this control infos packet.
ber | The bit error rate |
Definition at line 69 of file MacToNetwControlInfo.h.
References bitErrorRate.
Referenced by CSMA802154::decapsMsg().
{ bitErrorRate = ber; }
virtual void MacToNetwControlInfo::setLastHopMac | ( | long | lastHop | ) | [inline, virtual] |
Sets the MAC address of the packets last hop.
lastHop | The last hops MAC address |
Definition at line 85 of file MacToNetwControlInfo.h.
References lastHopMac.
{ lastHopMac = lastHop; }
void MacToNetwControlInfo::setRSSI | ( | double | _rssi | ) | [inline] |
Sets the packets received signal strength.
_rssi | The received signal strength |
Definition at line 102 of file MacToNetwControlInfo.h.
References rssi.
Referenced by CSMA802154::decapsMsg().
{ rssi = _rssi; }