|
DESERT 4.0.0
|
#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 () |
Public Member Functions inherited from UWMdriver | |
| 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) |
Protected Member Functions inherited from UWMdriver | |
| 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 | |
Protected Attributes inherited from UWMdriver | |
| 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).
| MdriverS2C_Evo_lowlev::MdriverS2C_Evo_lowlev | ( | UWMPhy_modem * | pmModem_ | ) |
Class constructor
References m_state_rx, m_state_tx, mConnector, mInterpreter, RX_STATE_IDLE, UWMdriver::setConnections(), and TX_STATE_IDLE.

| MdriverS2C_Evo_lowlev::~MdriverS2C_Evo_lowlev | ( | ) |
Class destructor
| 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.
|
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.
References m_state_tx, MODEM_TX, modemTxManager(), UWMdriver::status, and TX_STATE_DATA.

| 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.
References _bitrate_i, _chipset, _delay, _delay_flag, _gain, _mps_th, _msg_bitlen, _SL, _th, MinterpreterTEL::build_bitrate(), MinterpreterTEL::build_busy_FPGA(), MinterpreterTEL::build_clear_tx(), MinterpreterTEL::build_config_DSP(), MinterpreterTEL::build_poweroff_DSP(), MinterpreterTEL::build_poweron_DSP(), MinterpreterTEL::build_recv_data(), MinterpreterTEL::build_send_ctrl(), MinterpreterTEL::build_send_data(), MinterpreterTEL::build_stop_listen(), LOG_LEVEL_INFO, m_state_tx, mConnector, mInterpreter, UWMdriver::payload_tx, UWMdriver::printOnLog(), TX_STATE_ASK_BUSY, TX_STATE_BITRATE_CFG, TX_STATE_CLEAR_TX, TX_STATE_CTRL, TX_STATE_DATA, TX_STATE_DSP_CFG, TX_STATE_IDLE, TX_STATE_OFF1, TX_STATE_OFF2, TX_STATE_OFF3, TX_STATE_ON1, TX_STATE_ON2, TX_STATE_ON3, TX_STATE_ON4, TX_STATE_STOP_LISTEN, updateTxState(), and Msocket::writeToModem().
Referenced by modemTx(), start(), stop(), updateStatus(), and updateTxState().

| 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
References _bitrate_i.
Referenced by MS2C_Evo_lowlev::MS2C_Evo_lowlev().
| void MdriverS2C_Evo_lowlev::setPktBitLen | ( | int | bitlen | ) |
Method to set the msg bitlength that will be received by rx
References _msg_bitlen.
Referenced by MS2C_Evo_lowlev::MS2C_Evo_lowlev().
| void MdriverS2C_Evo_lowlev::setSourceLevel | ( | int | level | ) |
Method to set the source level that will be sent to the modem config
References _SL.
Referenced by MS2C_Evo_lowlev::MS2C_Evo_lowlev().
|
virtual |
Method to let the driver start operations and initialize configurations.
Implements UWMdriver.
References LOG_LEVEL_DEBUG, m_state_tx, mConnector, MODEM_CFG, modemTxManager(), Msocket::openConnection(), UWMdriver::printOnLog(), UWMconnector::readFromModem(), UWMdriver::status, and TX_STATE_ON1.

|
virtual |
Method to stop the driver operations. To be called before finishing the simulation.
Implements UWMdriver.
References Msocket::closeConnection(), m_state_tx, mConnector, MODEM_QUIT, modemTxManager(), UWMconnector::readFromModem(), UWMdriver::status, and TX_STATE_OFF1.

|
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.
References LOG_LEVEL_INFO, m_state_rx, m_state_tx, mConnector, mInterpreter, MODEM_CFG, MODEM_IDLE, MODEM_IDLE_RX, MODEM_QUIT, MODEM_RESET, MODEM_RX, MODEM_TX, modemTxManager(), MinterpreterTEL::parse_TELEGRAM(), UWMdriver::payload_rx, UWMdriver::printOnLog(), queue_rx, queue_tx, UWMconnector::readFromModem(), RX_STATE_DATA, RX_STATE_IDLE, UWMdriver::status, TX_STATE_BITRATE_CFG, TX_STATE_DSP_CFG, and TX_STATE_IDLE.

|
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.
References m_state_tx, modemTxManager(), TX_STATE_ASK_BUSY, TX_STATE_BITRATE_CFG, TX_STATE_CLEAR_TX, TX_STATE_CTRL, TX_STATE_DATA, TX_STATE_DSP_CFG, TX_STATE_IDLE, TX_STATE_OFF1, TX_STATE_OFF2, TX_STATE_OFF3, TX_STATE_ON1, TX_STATE_ON2, TX_STATE_ON3, TX_STATE_ON4, and TX_STATE_STOP_LISTEN.
Referenced by modemTxManager().

|
private |
Variable holding the bitrate index of the low level firmware
Referenced by modemTxManager(), and setBitrate().
|
private |
Variable holding the chipset that will be used by the low level firmware
Referenced by modemTxManager().
|
private |
Variable that holds the delay required for doing some operations, e.g., sending a message, stopping listening
Referenced by modemTxManager().
|
private |
Variable that holds that flag that triggers the waiting time for some operations e.g., sending a packet, stopping listening
Referenced by modemTxManager().
|
private |
Variable holding the Gain level of the low level driver
Referenced by modemTxManager().
|
private |
Variable holding the MPS treshold used by the low level firmware
Referenced by modemTxManager().
|
private |
Very very temporary parameter to let the receiver not screw up and read only the, known, number of bytes
Referenced by modemTxManager(), and setPktBitLen().
|
private |
Variable holding the Source Level of the low level driver
Referenced by modemTxManager(), and setSourceLevel().
|
private |
Variable holding the threshold used by the low level firmware
Referenced by modemTxManager().
|
private |
RX state to manage reception methods
Referenced by MdriverS2C_Evo_lowlev(), and updateStatus().
|
private |
TX state to manage transmission methods
Referenced by MdriverS2C_Evo_lowlev(), modemTx(), modemTxManager(), start(), stop(), updateStatus(), and updateTxState().
|
private |
Object that handles the physical host to modem communications via TCP/IP sockets.
Referenced by MdriverS2C_Evo_lowlev(), modemTxManager(), start(), stop(), and updateStatus().
|
private |
Object that builds/parses TELEGRAMS and GPIO settings.
Referenced by MdriverS2C_Evo_lowlev(), modemTxManager(), and updateStatus().
|
private |
Queue used to buffer incoming strings for rx messages.
Referenced by updateStatus().
|
private |
Queue used to buffer incoming strings for tx messages.
Referenced by updateStatus().