Public Member Functions | |
MMacCsma () | |
virtual void | AckTimeout () |
virtual void | BackoffEnded () |
Protected Member Functions | |
virtual void | recvFromUpperLayers (Packet *p) |
virtual void | Phy2MacEndTx (const Packet *p) |
virtual void | Phy2MacStartRx (const Packet *p) |
virtual void | Phy2MacEndRx (Packet *p) |
virtual void | recvData4Me (Packet *p) |
virtual void | recvAck4Me (Packet *p) |
virtual void | recvWhateverElse (Packet *p) |
virtual void | enterState_IDLE () |
virtual void | enterState_RX_DATA () |
virtual void | enterState_TX_ACK (int macSA_of_data_pkt) |
virtual void | enterState_CHK_PENDING_PKT () |
virtual void | enterState_CHK_FROZEN_BACKOFF () |
virtual void | enterState_BACKOFF () |
virtual void | enterState_FREEZE_BACKOFF () |
virtual void | enterState_TX_DATA () |
virtual void | enterState_START_ACK_TIMEOUT () |
virtual void | enterState_WAIT_ACK () |
virtual void | enterState_RX_ACK () |
virtual void | enterState_CHK_ACK_TIMEOUT_EXPIRED () |
virtual void | enterState_TX_SUCCESSFUL () |
virtual void | enterState_TX_FAILED () |
void | setState (enum MMAC_CSMA_STATE s) |
bool | PendingPacket () |
bool | FrozenBackoff () |
bool | AckTimeoutExpired () |
Protected Attributes | |
enum MMAC_CSMA_STATE | state |
const Packet * | PktRx |
Packet * | PktTx |
std::queue< Packet * > | Q |
int | ConsecutiveFailedTxAttempts |
MAC queue used for packet scheduling. | |
Backoff_Timer | backoff_timer |
Ack_Timer | ack_timer |
int | HeaderSize_ |
double | BaseBackoffTime_ |
double | AckTimeout_ |
int | debug_states_ |
Static Protected Attributes | |
static int | uidcnt = 1000 |
Definition at line 118 of file mmac-csma.h.
void MMacCsma::recvFromUpperLayers | ( | Packet * | p | ) | [protected, virtual] |
Handle a packet coming from upper layers
p | pointer to the packet |
Reimplemented from MMac.
Definition at line 120 of file mmac-csma.cc.
References DEBUG_EVENT, enterState_TX_DATA(), PendingPacket(), PktTx, Q, state, and STATE_IDLE.
Here is the call graph for this function:
void MMacCsma::Phy2MacEndTx | ( | const Packet * | p | ) | [protected, virtual] |
Handle the end-of-PHY-transmission event
This method is expected to be re- implemented by a class inheriting from MMac in order to perform the necessary MAC operations.
p | pointer to the packet whose transmission has ended. Note that the Packet is not any more under control of the MAC at the time this event occurs, hence the 'const' declaration. |
Reimplemented from MMac.
Definition at line 141 of file mmac-csma.cc.
References DEBUG_EVENT, DEBUG_UNEXPECTED_EVENT, enterState_CHK_PENDING_PKT(), enterState_START_ACK_TIMEOUT(), state, STATE_TX_ACK, and STATE_TX_DATA.
Here is the call graph for this function:
void MMacCsma::Phy2MacStartRx | ( | const Packet * | p | ) | [protected, virtual] |
Handle the detected-start-of-PHY-reception event (e.g., PHY preamble successfully detected, so we expect to receive a new packet, possibly with errors)
This method is expected to be re- implemented by a class inheriting from MMac in order to perform the necessary MAC operations.
p | pointer to the packet whose reception has begun. Note that the Packet is not yet under control of the MAC at the time this event occurs, hence the 'const' declaration. |
Reimplemented from MMac.
Definition at line 158 of file mmac-csma.cc.
References DEBUG_EVENT, DEBUG_UNEXPECTED_EVENT, enterState_FREEZE_BACKOFF(), enterState_RX_ACK(), enterState_RX_DATA(), PktRx, state, STATE_BACKOFF, STATE_IDLE, and STATE_WAIT_ACK.
Here is the call graph for this function:
void MMacCsma::Phy2MacEndRx | ( | Packet * | p | ) | [protected, virtual] |
Handle the end-of-PHY-reception event
This method is expected to be re- implemented by a class inheriting from MMac in order to perform the necessary MAC operations.
p | pointer to the packet whose reception has ended. The receiving MAC can modify it at will (changing header fields, deleting it...) |
Reimplemented from MMac.
Definition at line 181 of file mmac-csma.cc.
References MMac::addr, DEBUG_EVENT, PktRx, PT_MMAC_ACK, recvAck4Me(), recvData4Me(), and recvWhateverElse().
Here is the call graph for this function: