DESERT 3.5.1
Loading...
Searching...
No Matches
UWMconnector Class Referenceabstract

#include <uwmconnector.h>

Inheritance diagram for UWMconnector:
Collaboration diagram for UWMconnector:

Public Member Functions

 UWMconnector (UWMdriver *, std::string)
 
 ~UWMconnector ()
 
virtual int openConnection ()=0
 
virtual void closeConnection ()
 
virtual int writeToModem (std::string)=0
 
std::string readFromModem ()
 
void setDriverQueueLength (int length)
 
uint getDriverQueueLength ()
 
 UWMconnector (UWMdriver *, std::string)
 
 ~UWMconnector ()
 
virtual int openConnection ()=0
 
virtual void closeConnection ()
 
virtual int writeToModem (std::string)=0
 
std::string readFromModem ()
 
void setDriverQueueLength (int length)
 
uint getDriverQueueLength ()
 

Public Attributes

std::queue< msgModemqueueMsg
 

Protected Attributes

UWMdriverpmDriver
 
std::string pathToDevice
 
uint driver_queue_length
 

Detailed Description

The class needed by UWMPhy_modem to manage string exchange with the modem.

This class just provides the definition of the basic needed functionalities and it must be extended to handle e.g., serial connection (see Mserial) or TCP/IP connection (see Msocket).

Definition at line 80 of file DESERT_Framework/DESERT/physical/uwmphy_modem/uwmconnector.h.

Constructor & Destructor Documentation

◆ UWMconnector() [1/2]

UWMconnector::UWMconnector ( UWMdriver pmDriver_,
std::string  pathToDevice_ 
)

Class constructor.

Parameters
pmDriver_pointer to the UWMdriver object to link with this UWMconnector object.
pathToDevice_the path to the device that must be connected with NS-Miracle (e.g., /dev/ttyUSB0 for a serial connection)

Definition at line 79 of file DESERT_Framework/DESERT/physical/uwmphy_modem/uwmconnector.cpp.

◆ ~UWMconnector() [1/2]

UWMconnector::~UWMconnector ( )

Class destructor.

Definition at line 87 of file DESERT_Framework/DESERT/physical/uwmphy_modem/uwmconnector.cpp.

◆ UWMconnector() [2/2]

UWMconnector::UWMconnector ( UWMdriver ,
std::string   
)

Class constructor.

Parameters
pmDriver_pointer to the UWMdriver object to link with this UWMconnector object.
pathToDevice_the path to the device that must be connected with NS-Miracle (e.g., /dev/ttyUSB0 for a serial connection)

◆ ~UWMconnector() [2/2]

UWMconnector::~UWMconnector ( )

Class destructor.

Member Function Documentation

◆ closeConnection() [1/2]

virtual void UWMconnector::closeConnection ( )
virtual

Method to close the connection with the modem.

Reimplemented in Msocket, and Msocket.

◆ closeConnection() [2/2]

void UWMconnector::closeConnection ( )
virtual

Method to close the connection with the modem.

Reimplemented in Msocket, and Msocket.

Definition at line 92 of file DESERT_Framework/DESERT/physical/uwmphy_modem/uwmconnector.cpp.

◆ getDriverQueueLength() [1/2]

uint UWMconnector::getDriverQueueLength ( )
inline

Definition at line 133 of file DESERT_Addons/uwmphy_modem/uwmconnector.h.

◆ getDriverQueueLength() [2/2]

uint UWMconnector::getDriverQueueLength ( )
inline

◆ openConnection() [1/2]

virtual int UWMconnector::openConnection ( )
pure virtual

Method to open the connection with the modem.

Returns
_MODEM_OK if everything went fine, any other int value otherwise.

Implemented in Msocket, and Msocket.

◆ openConnection() [2/2]

virtual int UWMconnector::openConnection ( )
pure virtual

Method to open the connection with the modem.

Returns
_MODEM_OK if everything went fine, any other int value otherwise.

Implemented in Msocket, and Msocket.

◆ readFromModem() [1/2]

std::string UWMconnector::readFromModem ( )

Method to check the receiving modem buffer.

Returns
return_str the string corresponding to the last received message from the modem

◆ readFromModem() [2/2]

std::string UWMconnector::readFromModem ( )

Method to check the receiving modem buffer.

Returns
return_str the string corresponding to the last received message from the modem

Definition at line 103 of file DESERT_Framework/DESERT/physical/uwmphy_modem/uwmconnector.cpp.

◆ setDriverQueueLength() [1/2]

void UWMconnector::setDriverQueueLength ( int  length)

◆ setDriverQueueLength() [2/2]

void UWMconnector::setDriverQueueLength ( int  length)

◆ writeToModem() [1/2]

virtual int UWMconnector::writeToModem ( std::string  )
pure virtual

Method for writing to the modem.

Parameters
[in]strthe string to pass to the modem
Returns
the number of transmitted bytes

Implemented in Msocket, and Msocket.

◆ writeToModem() [2/2]

virtual int UWMconnector::writeToModem ( std::string  )
pure virtual

Method for writing to the modem.

Parameters
[in]strthe string to pass to the modem
Returns
the number of transmitted bytes

Implemented in Msocket, and Msocket.

Member Data Documentation

◆ driver_queue_length

uint UWMconnector::driver_queue_length
protected

◆ pathToDevice

std::string UWMconnector::pathToDevice
protected

The path to be connected with the modem device.

Definition at line 141 of file DESERT_Framework/DESERT/physical/uwmphy_modem/uwmconnector.h.

◆ pmDriver

UWMdriver * UWMconnector::pmDriver
protected

Pointer to UWMdriver object that contains this UWMconnector.

Definition at line 139 of file DESERT_Framework/DESERT/physical/uwmphy_modem/uwmconnector.h.

◆ queueMsg

std::queue< msgModem > UWMconnector::queueMsg

Queue used to buffer incoming strings from the modem.

Definition at line 83 of file DESERT_Framework/DESERT/physical/uwmphy_modem/uwmconnector.h.


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