58#define MAX_LOG_LEVEL 2
enum MODEM_STATES modem_state_t
enum LOG_LEVEL log_level_t
@ MODEM_CHANGE_POWER_LEVEL
Header of the class needed by UWMPhy_modem to handle the physical connection between NS-Miracle and a...
enum MODEM_STATES modem_state_t
enum LOG_LEVEL log_level_t
Header of the class that is in charge of building/parsing the necessary messages to make the UWMdrive...
The main class implementing the module used to implement the interface between ns2/NS-Miracle and rea...
The class needed by UWMPhy_modem to manage string exchange with the modem.
The class needed by UWMPhy_modem to handle the different transmissions cases and corresponding protoc...
void updateRx(int, int, std::string)
Method to write in UWMdriver::payload_rx, UWMdriver::src and UWMdriver::dstPktRx.
UWMdriver(UWMPhy_modem *)
Class constructor.
void updateTx(int, std::string)
Method to update the values of both UWMdriver::payload_tx and UWMdriver::dest.
log_level_t getLogLevel()
Method to return the flag used to enable the printing of log messages in UWMPhy_modem::logFile.
std::string payload_tx
String where to save the payload of the next packet to send via modem.
UWMconnector * pmConnector
pointer to the object that handles the physical transmission and reception of acoustic packets
int getSrc()
Method to access to the ID of the source of the last packet acoustically received.
modem_state_t getStatus()
Method to return the modem's status.
int getDstPktRx()
Method to access to the ID of the destination of the last packet acoustically received.
virtual void stop()=0
Driver stopper.
virtual void modemTxManager()=0
Method to manage modem to host and host to modem communications.
std::string getLogFile()
Method to return the name of the disk-fiel used to print the log messages.
bool getResetModemQueue()
int dest
Variable where to save the destination ID of the next packet to send via modem.
virtual void modemSetID()=0
int debug_
Flag to enable debug mode (i.e., printing of debug messages) if set to 1.
bool SetModemID
Variable to decide whether the interface has to set the acoustic ID of the modem or not.
void printOnLog(log_level_t log_level, std::string module, std::string message)
virtual void modemTx()=0
Method to notify to the driver that there is a packet to be sent via modem.
int src
Variable storing the source ID of the last packet received via modem.
virtual void start()=0
Driver starter.
void setResetModemQueue(bool reset_m_queue)
UWMinterpreter * pmInterpreter
pointer to the object that builds/parses the necessary messages to make UWMdriver able to communicate...
void setModemID(bool set)
void setConnections(UWMinterpreter *, UWMconnector *)
Link connector.
int dstPktRx
Variable where to save the destination ID of the last packet received via modem.
virtual modem_state_t updateStatus()=0
Method to update modem status.
void resetModemStatus()
Method to reset the modem status.
UWMPhy_modem * pmModem
link to the UWMPhy_modem object that contains this driver
int getID()
Method to return modem ID.
std::string getRxPayload()
Method to access to the payload of the last packet acoustically received.
log_level_t getDebug()
Method to return the flag used to enable debug messages.
std::ofstream outLog
output strem to print into a disk-file log messages.
modem_state_t status
Status of the driver's general state machine.
std::string payload_rx
String where to save the payload of the last packet received via modem.
void setID(int ID_)
Method to change the modem ID.
~UWMdriver()
Class destructor.
This class is in charge of building/parsing the necessary messages to make the UWMdriver able to comm...