DESERT 3.5.1
|
#include <msocket.h>
Public Member Functions | |
Msocket (UWMdriver *, std::string) | |
~Msocket () | |
virtual int | openConnection () |
virtual void | closeConnection () |
virtual int | writeToModem (std::string) |
int | getSocket () |
Msocket (UWMdriver *, std::string) | |
~Msocket () | |
virtual int | openConnection () |
virtual void | closeConnection () |
virtual int | writeToModem (std::string) |
int | getSocket () |
![]() | |
UWMconnector (UWMdriver *, std::string) | |
~UWMconnector () | |
std::string | readFromModem () |
void | setDriverQueueLength (int length) |
uint | getDriverQueueLength () |
UWMconnector (UWMdriver *, std::string) | |
~UWMconnector () | |
std::string | readFromModem () |
void | setDriverQueueLength (int length) |
uint | getDriverQueueLength () |
Private Member Functions | |
void | error (const char *) |
void | error (const char *) |
Private Attributes | |
int | sockfd |
int | portno |
int | rc |
pthread_t | thread_id |
struct sockaddr_in | serv_addr |
std::string | server_host |
struct hostent * | server |
char | msg_tx [_MAX_MSG_LENGTH] |
int | modem_queue_length |
Additional Inherited Members | |
![]() | |
std::queue< msgModem > | queueMsg |
![]() | |
UWMdriver * | pmDriver |
std::string | pathToDevice |
uint | driver_queue_length |
Class used to manage host/modem string exchange via TCP/IP connection (this class is a derived class of UWMconnector).
Definition at line 60 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
Msocket::Msocket | ( | UWMdriver * | pmDriver_, |
std::string | portno_ | ||
) |
Class constructor.
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., the port "9200" for a TCP/IP connection) |
Definition at line 50 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.cpp.
Msocket::~Msocket | ( | ) |
Class destructor.
Definition at line 69 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.cpp.
Msocket::Msocket | ( | UWMdriver * | , |
std::string | |||
) |
Class constructor.
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., the port "9200" for a TCP/IP connection) |
Msocket::~Msocket | ( | ) |
Class destructor.
|
virtual |
Method to close the connection with the modem.
Reimplemented from UWMconnector.
|
virtual |
Method to close the connection with the modem.
Reimplemented from UWMconnector.
Definition at line 108 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.cpp.
|
private |
Method report errors.
[in] | msg | pointer to an error message to report. |
|
private |
Method report errors.
[in] | msg | pointer to an error message to report. |
Definition at line 44 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.cpp.
|
inline |
Method to read the pointer to the socket where to write (it is needed by the reading function invoked by the parallel thread)
Definition at line 129 of file DESERT_Addons/uwmphy_modem/msocket.h.
|
inline |
Method to read the pointer to the socket where to write (it is needed by the reading function invoked by the parallel thread)
Definition at line 129 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
|
virtual |
Method to open the connection with the modem.
Implements UWMconnector.
|
virtual |
Method to open the connection with the modem.
Implements UWMconnector.
Definition at line 74 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.cpp.
|
virtual |
Method for writing to the modem.
[in] | str | the string to pass to the modem |
Implements UWMconnector.
|
virtual |
Method for writing to the modem.
[in] | str | the string to pass to the modem |
Implements UWMconnector.
Definition at line 115 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.cpp.
|
private |
Definition at line 76 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
|
private |
Message to be transmitted host to modem.
Definition at line 74 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
|
private |
Port number.
Definition at line 63 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
|
private |
Indicator of the thread creation.
Definition at line 64 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
|
private |
Structure to contain the Internet address to be used.
Definition at line 66 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
|
private |
Structure to define the server host.
Definition at line 73 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
|
private |
Name of the server host on the Internet to which we want to be connected as client.
Definition at line 69 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
|
private |
Pointer to the socket.
Definition at line 62 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.
|
private |
Id of a parallel thread.
Definition at line 65 of file DESERT_Framework/DESERT/physical/uwmphy_modem/msocket.h.