DESERT 3.5.1
|
#include <mdriverS2C_Evo_lowlev.h>
Public Member Functions | |
MdriverS2C_Evo_lowlev (UWMPhy_modem *) | |
~MdriverS2C_Evo_lowlev () | |
void | start () |
void | stop () |
void | setBitrate (int index) |
void | setSourceLevel (int level) |
void | setPktBitLen (int bitlen) |
void | modemTx () |
void | modemTxBurst () |
void | modemTxPBM () |
void | modemCfgDSP () |
void | modemCfgBitrate () |
virtual void | modemSetID () |
virtual modem_state_t | updateStatus () |
![]() | |
UWMdriver (UWMPhy_modem *) | |
~UWMdriver () | |
void | setID (int ID_) |
void | resetModemStatus () |
void | updateTx (int, std::string) |
void | updateRx (int, int, std::string) |
int | getID () |
modem_state_t | getStatus () |
std::string | getRxPayload () |
int | getSrc () |
int | getDstPktRx () |
log_level_t | getDebug () |
void | setModemID (bool set) |
bool | getModemID () |
void | setResetModemQueue (bool reset_m_queue) |
bool | getResetModemQueue () |
log_level_t | getLogLevel () |
std::string | getLogFile () |
void | printOnLog (log_level_t log_level, std::string module, std::string message) |
UWMdriver (UWMPhy_modem *) | |
~UWMdriver () | |
void | setID (int ID_) |
void | resetModemStatus () |
void | updateTx (int, std::string) |
void | updateRx (int, int, std::string) |
int | getID () |
modem_state_t | getStatus () |
std::string | getRxPayload () |
int | getSrc () |
int | getDstPktRx () |
log_level_t | getDebug () |
void | setModemID (bool set) |
bool | getModemID () |
void | setResetModemQueue (bool reset_m_queue) |
bool | getResetModemQueue () |
log_level_t | getLogLevel () |
std::string | getLogFile () |
void | printOnLog (log_level_t log_level, std::string module, std::string message) |
Protected Member Functions | |
void | modemTxManager () |
void | updateTxState (ll_tx_state_t) |
![]() | |
void | setConnections (UWMinterpreter *, UWMconnector *) |
void | setConnections (UWMinterpreter *, UWMconnector *) |
Private Attributes | |
MinterpreterTEL | mInterpreter |
Msocket | mConnector |
ll_tx_state_t | m_state_tx |
ll_rx_state_t | m_state_rx |
std::queue< std::string > | queue_tx |
std::queue< std::string > | queue_rx |
int | _gain |
int | _SL |
int | _bitrate_i |
int | _chipset |
int | _th |
int | _mps_th |
double | _delay |
int | _delay_flag |
int | _msg_bitlen |
Additional Inherited Members | |
![]() | |
UWMPhy_modem * | pmModem |
UWMinterpreter * | pmInterpreter |
UWMconnector * | pmConnector |
int | ID |
modem_state_t | status |
std::string | payload_tx |
int | dest |
std::string | payload_rx |
int | src |
int | dstPktRx |
bool | SetModemID |
int | debug_ |
std::ofstream | outLog |
bool | ResetModemQueue |
Class containing the basic functions to drive the S2C EvoLogics acoustic modem transmissions/receptions according to Low Level drivers (this class is a derived class of UWMdriver).
Definition at line 75 of file mdriverS2C_Evo_lowlev.h.
MdriverS2C_Evo_lowlev::MdriverS2C_Evo_lowlev | ( | UWMPhy_modem * | pmModem_ | ) |
Class constructor.
Definition at line 106 of file mdriverS2C_Evo_lowlev.cpp.
MdriverS2C_Evo_lowlev::~MdriverS2C_Evo_lowlev | ( | ) |
Class destructor.
Definition at line 125 of file mdriverS2C_Evo_lowlev.cpp.
void MdriverS2C_Evo_lowlev::modemCfgBitrate | ( | ) |
Method that notifies the driver that there is a configuration to be sent to the modem (Bitrate).
NOTE: when this function is called (by an UWMPhy_modem object) the driver's status must be set to MODEM_TX and the configuration must be sent immediately to the modem.
void MdriverS2C_Evo_lowlev::modemCfgDSP | ( | ) |
Method that notifies the driver that there is a configuration to be sent to the modem (DSP).
NOTE: when this function is called (by an UWMPhy_modem object) the driver's status must be set to MODEM_TX and the configuration must be sent immediately to the modem.
|
virtual |
Method to set the ID of the modem.
On the Low Level firmware is not possible to set any ID so the method is left empty.
Implements UWMdriver.
Definition at line 571 of file mdriverS2C_Evo_lowlev.cpp.
|
virtual |
Method that notifies the driver that there is a packet to be sent via the modem.
NOTE: when this function is called (by an UWMPhy_modem object) the driver's status must be set to MODEM_TX and the packet must be sent immediately to the modem.
Implements UWMdriver.
Definition at line 162 of file mdriverS2C_Evo_lowlev.cpp.
void MdriverS2C_Evo_lowlev::modemTxBurst | ( | ) |
Method that notifies the driver that there is a packet to be sent via the modem.
On the Low Level firmware nothing as this exists so the call is passed to modemTx(). NOTE: when this function is called (by an UWMPhy_modem object) the driver's status must be set to MODEM_TX and the packet must be sent immediately to the modem.
|
protectedvirtual |
Method that manages the transmission of TELEGRAMS and configurations via GPIOs to the modem.
Implements UWMdriver.
Definition at line 397 of file mdriverS2C_Evo_lowlev.cpp.
void MdriverS2C_Evo_lowlev::modemTxPBM | ( | ) |
Method that notifies the driver that there is a packet to be sent via the modem.
On the Low Level firmware nothing as this exists so the call is passed to modeTx(). NOTE: when this function is called (by an UWMPhy_modem object) the driver's status must be set to MODEM_TX and the packet must be sent immediately to the modem.
void MdriverS2C_Evo_lowlev::setBitrate | ( | int | index | ) |
Method to set the bitrate that will be sent to the modem config.
Definition at line 553 of file mdriverS2C_Evo_lowlev.cpp.
void MdriverS2C_Evo_lowlev::setPktBitLen | ( | int | bitlen | ) |
Method to set the msg bitlength that will be received by rx.
Definition at line 565 of file mdriverS2C_Evo_lowlev.cpp.
void MdriverS2C_Evo_lowlev::setSourceLevel | ( | int | level | ) |
Method to set the source level that will be sent to the modem config.
Definition at line 559 of file mdriverS2C_Evo_lowlev.cpp.
|
virtual |
Method to let the driver start operations and initialize configurations.
Implements UWMdriver.
Definition at line 130 of file mdriverS2C_Evo_lowlev.cpp.
|
virtual |
Method to stop the driver operations.
To be called before finishing the simulation.
Implements UWMdriver.
Definition at line 148 of file mdriverS2C_Evo_lowlev.cpp.
|
virtual |
Method to update modem status.
This method has to update the modem status according to the messages received from the modem/channel (e.g., after a check of the modem buffer's output). NOTE: This method may return after an arbitrary period if nothing has happened, but it must return immediately after a change of UWMdriver::status.
Implements UWMdriver.
Definition at line 170 of file mdriverS2C_Evo_lowlev.cpp.
|
protected |
Method for updating the state after a significant change, namely: a configuration of the firmware parameters, a trasmission of a packet and a reception of a packet.
Definition at line 491 of file mdriverS2C_Evo_lowlev.cpp.
|
private |
Variable holding the bitrate index of the low level firmware.
Definition at line 94 of file mdriverS2C_Evo_lowlev.h.
|
private |
Variable holding the chipset that will be used by the low level firmware.
Definition at line 96 of file mdriverS2C_Evo_lowlev.h.
|
private |
Variable that holds the delay required for doing some operations, e.g., sending a message, stopping listening.
Definition at line 104 of file mdriverS2C_Evo_lowlev.h.
|
private |
Variable that holds that flag that triggers the waiting time for some operations e.g., sending a packet, stopping listening.
Definition at line 107 of file mdriverS2C_Evo_lowlev.h.
|
private |
Variable holding the Gain level of the low level driver.
Definition at line 92 of file mdriverS2C_Evo_lowlev.h.
|
private |
Variable holding the MPS treshold used by the low level firmware.
Definition at line 101 of file mdriverS2C_Evo_lowlev.h.
|
private |
Very very temporary parameter to let the receiver not screw up and read only the, known, number of bytes.
Definition at line 111 of file mdriverS2C_Evo_lowlev.h.
|
private |
Variable holding the Source Level of the low level driver.
Definition at line 93 of file mdriverS2C_Evo_lowlev.h.
|
private |
Variable holding the threshold used by the low level firmware.
Definition at line 99 of file mdriverS2C_Evo_lowlev.h.
|
private |
RX state to manage reception methods.
Definition at line 85 of file mdriverS2C_Evo_lowlev.h.
|
private |
TX state to manage transmission methods.
Definition at line 84 of file mdriverS2C_Evo_lowlev.h.
|
private |
Object that handles the physical host to modem communications via TCP/IP sockets.
Definition at line 80 of file mdriverS2C_Evo_lowlev.h.
|
private |
Object that builds/parses TELEGRAMS and GPIO settings.
Definition at line 78 of file mdriverS2C_Evo_lowlev.h.
|
private |
Queue used to buffer incoming strings for rx messages.
Definition at line 90 of file mdriverS2C_Evo_lowlev.h.
|
private |
Queue used to buffer incoming strings for tx messages.
Definition at line 87 of file mdriverS2C_Evo_lowlev.h.