67#define MIN_MODEM_QUEUE_LENGTH 2
68#define MAX_MODEM_QUEUE_LENGTH 30
128 virtual int command(
int,
const char *
const *);
208 inline unsigned long int
352 virtual inline double
391 <<
": in constructor of CheckTimer which points to modem: "
#define _MTBL
Defintion of the maximum length of the transmission buffer to store \ packets at the interface level.
Header of the class needed by UWMPhy_modem to handle the different transmissions cases and correspond...
enum MODEM_STATES modem_state_t
enum LOG_LEVEL log_level_t
The class used by UwModem to handle simulator's event expirations; it is exploited to schedule the re...
UwModem * pmModem
Pointer to an UwModem object.
virtual void expire(Event *e)
Method to handle the expiration of a given event.
CheckTimer(UWMPhy_modem *pmModem_)
Class constructor.
virtual void expire(Event *e)
DropTimer(UWMPhy_modem *pModem_)
The main class implementing the module used to implement the interface between ns2/NS-Miracle and rea...
virtual double getTxDuration(Packet *p)
Method to get the transmission duration for a given packet.
Packet * popTxBuff()
Method to pop the oldest packet in the TX buffer or to delete after a tx or to drop it.
unsigned long int getEpoch()
Calculate the epoch of the event.
std::ofstream outLog
output strem to print into a disk-file log messages.
virtual void startRx(Packet *)
Method to start a packet reception.
virtual void endTx(Packet *)
Method to end a packet transmission.
int debug_
Flag to enable debug mode (i.e., printing of debug messages) if set to 1.
char * log_suffix
Possibility to insert a log suffix.
CheckTimer * pcheckTmr
Pointer to an object to schedule the "check-modem" events.
virtual int getModulationType(Packet *p)
Method to get the modulation type used to transmit/receive a given packet.
UWMdriver * pmDriver
Pointer to an object to drive the modem operations.
std::string getLogFile()
Method to return the name of the file where to log messages.
virtual modem_state_t check_modem()=0
Modem checker.
UWMPhy_modem(std::string)
Class constructor.
virtual int recvSyncClMsg(ClMessage *m)=0
std::string getPathToDevice()
Method to return the path to the device to be connect with the network simulator.
log_level_t getLogLevel()
Method to return the flag used to enable the printing of log messages in UWMPhy_modem::logFile.
int getID()
Method to return the node ID.
double period
Checking period of the modem's buffer.
virtual void start()
Connection starter.
virtual void endRx(Packet *)
Method to end a packet reception.
~UWMPhy_modem()
Class destructor.
virtual void stop()
Connection stopper.
int SetModemID
Flag to indicate if the interface has to force the modem to have the ID indicated in the tcl script.
Packet * modemTxBuff[_MTBL]
Transmission buffer to store packets that cannot be sent immediately because the real acoustic modem ...
Packet * PktRx
Transmission buffer's index; it must be in {-1, 0, 1, ..., _MTBL-1}.
virtual int command(int, const char *const *)
Method to map tcl commands into c++ methods.
std::string logFile
Name of the disk-file where to write the interface's log messages.
int loglevel_
Log level on file, from ERROR (0) to DEBUG (2) in UWMPhy_modem::logFile.
std::string pToDevice
A string containing the path to the device to be connected with the network simulator.
virtual void recv(Packet *)
Method to handle the reception of packets arriving from the upper layers of the network simulator.
virtual void startTx(Packet *)
Method to send to an UWMdriver object the packet to be transmitted, see UWMdriver::modemTx().
double getPeriod()
Method to return the checking period of the modem (i.e., the time interval between two succesive chec...
int getDebug()
Method to return the flag used to enable debug messages.
void setConnections(CheckTimer *, UWMdriver *, DropTimer *)
Link connector.
void updatePktRx(Packet *)
Method to update the value of the pointer to the last received packet.
The class needed by UWMPhy_modem to handle the different transmissions cases and corresponding protoc...
int getDebug()
Method to return the flag used to enable debug messages.
Header of the class providing the Uwal header's description.
Header of the main class that implements the adaptation layer between ns2/NS-Miracle and binary data ...
Provides the UWIP packets header description. Definition of the class that define the network layer.