DESERT 3.5.1
Loading...
Searching...
No Matches
MdriverS2C_Evo_lowlev Class Reference

#include <mdriverS2C_Evo_lowlev.h>

Inheritance diagram for MdriverS2C_Evo_lowlev:
Collaboration diagram for MdriverS2C_Evo_lowlev:

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_modempmModem
 
UWMinterpreterpmInterpreter
 
UWMconnectorpmConnector
 
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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MdriverS2C_Evo_lowlev()

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::~MdriverS2C_Evo_lowlev ( )

Class destructor.

Definition at line 125 of file mdriverS2C_Evo_lowlev.cpp.

Member Function Documentation

◆ modemCfgBitrate()

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.

◆ modemCfgDSP()

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.

◆ modemSetID()

void MdriverS2C_Evo_lowlev::modemSetID ( )
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.

◆ modemTx()

void MdriverS2C_Evo_lowlev::modemTx ( )
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.

◆ modemTxBurst()

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.

◆ modemTxManager()

void MdriverS2C_Evo_lowlev::modemTxManager ( )
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.

◆ modemTxPBM()

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.

◆ setBitrate()

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.

◆ setPktBitLen()

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.

◆ setSourceLevel()

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.

◆ start()

void MdriverS2C_Evo_lowlev::start ( )
virtual

Method to let the driver start operations and initialize configurations.

Implements UWMdriver.

Definition at line 130 of file mdriverS2C_Evo_lowlev.cpp.

◆ stop()

void MdriverS2C_Evo_lowlev::stop ( )
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.

◆ updateStatus()

modem_state_t MdriverS2C_Evo_lowlev::updateStatus ( )
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.

Returns
UWMdriver::status, the updated modem's status.

Implements UWMdriver.

Definition at line 170 of file mdriverS2C_Evo_lowlev.cpp.

◆ updateTxState()

void MdriverS2C_Evo_lowlev::updateTxState ( ll_tx_state_t  state)
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.

Member Data Documentation

◆ _bitrate_i

int MdriverS2C_Evo_lowlev::_bitrate_i
private

Variable holding the bitrate index of the low level firmware.

Definition at line 94 of file mdriverS2C_Evo_lowlev.h.

◆ _chipset

int MdriverS2C_Evo_lowlev::_chipset
private

Variable holding the chipset that will be used by the low level firmware.

Definition at line 96 of file mdriverS2C_Evo_lowlev.h.

◆ _delay

double MdriverS2C_Evo_lowlev::_delay
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.

◆ _delay_flag

int MdriverS2C_Evo_lowlev::_delay_flag
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.

◆ _gain

int MdriverS2C_Evo_lowlev::_gain
private

Variable holding the Gain level of the low level driver.

Definition at line 92 of file mdriverS2C_Evo_lowlev.h.

◆ _mps_th

int MdriverS2C_Evo_lowlev::_mps_th
private

Variable holding the MPS treshold used by the low level firmware.

Definition at line 101 of file mdriverS2C_Evo_lowlev.h.

◆ _msg_bitlen

int MdriverS2C_Evo_lowlev::_msg_bitlen
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.

◆ _SL

int MdriverS2C_Evo_lowlev::_SL
private

Variable holding the Source Level of the low level driver.

Definition at line 93 of file mdriverS2C_Evo_lowlev.h.

◆ _th

int MdriverS2C_Evo_lowlev::_th
private

Variable holding the threshold used by the low level firmware.

Definition at line 99 of file mdriverS2C_Evo_lowlev.h.

◆ m_state_rx

ll_rx_state_t MdriverS2C_Evo_lowlev::m_state_rx
private

RX state to manage reception methods.

Definition at line 85 of file mdriverS2C_Evo_lowlev.h.

◆ m_state_tx

ll_tx_state_t MdriverS2C_Evo_lowlev::m_state_tx
private

TX state to manage transmission methods.

Definition at line 84 of file mdriverS2C_Evo_lowlev.h.

◆ mConnector

Msocket MdriverS2C_Evo_lowlev::mConnector
private

Object that handles the physical host to modem communications via TCP/IP sockets.

Definition at line 80 of file mdriverS2C_Evo_lowlev.h.

◆ mInterpreter

MinterpreterTEL MdriverS2C_Evo_lowlev::mInterpreter
private

Object that builds/parses TELEGRAMS and GPIO settings.

Definition at line 78 of file mdriverS2C_Evo_lowlev.h.

◆ queue_rx

std::queue<std::string> MdriverS2C_Evo_lowlev::queue_rx
private

Queue used to buffer incoming strings for rx messages.

Definition at line 90 of file mdriverS2C_Evo_lowlev.h.

◆ queue_tx

std::queue<std::string> MdriverS2C_Evo_lowlev::queue_tx
private

Queue used to buffer incoming strings for tx messages.

Definition at line 87 of file mdriverS2C_Evo_lowlev.h.


The documentation for this class was generated from the following files: