|
DESERT 4.0.0
|
#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 () |
Public Member Functions inherited from UWMconnector | |
| 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 | |
Public Attributes inherited from UWMconnector | |
| std::queue< msgModem > | queueMsg |
Protected Attributes inherited from UWMconnector | |
| 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).
| 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) |
References UWMconnector::pathToDevice, portno, server_host, and sockfd.
| Msocket::~Msocket | ( | ) |
Class destructor.
| 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.
References sockfd.
Referenced by MdriverS2C_Evo_lowlev::stop().
|
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. |
|
inline |
Method to read the pointer to the socket where to write (it is needed by the reading function invoked by the parallel thread)
References sockfd.
|
inline |
Method to read the pointer to the socket where to write (it is needed by the reading function invoked by the parallel thread)
References sockfd.
Referenced by read_process_msocket().
|
virtual |
Method to open the connection with the modem.
Implements UWMconnector.
|
virtual |
Method to open the connection with the modem.
Implements UWMconnector.
References portno, rc, read_process_msocket(), serv_addr, server, server_host, sockfd, and thread_id.
Referenced by MdriverS2C_Evo_lowlev::start().

|
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.
References msg_tx, and sockfd.
Referenced by MdriverS2C_Evo_lowlev::modemTxManager().
|
private |
|
private |
Message to be transmitted host to modem.
Referenced by writeToModem().
|
private |
Port number.
Referenced by Msocket(), and openConnection().
|
private |
Indicator of the thread creation.
Referenced by openConnection().
|
private |
Structure to contain the Internet address to be used.
Referenced by openConnection().
|
private |
Structure to define the server host.
Referenced by openConnection().
|
private |
Name of the server host on the Internet to which we want to be connected as client.
Referenced by Msocket(), and openConnection().
|
private |
Pointer to the socket.
Referenced by closeConnection(), getSocket(), Msocket(), openConnection(), and writeToModem().
|
private |
Id of a parallel thread.
Referenced by openConnection().