47#include <sys/socket.h>
48#include <netinet/in.h>
82 void error(
const char *);
void * read_process_msocket(void *)
Function to read from the modem via a TCP/IP connection (it must be called as a pure C function).
Header of the class needed by UWMPhy_modem to handle the physical connection between NS-Miracle and a...
#define _MAX_MSG_LENGTH
Variable defining the maximum length of the messages \ exchanged between host and modem.
Class used to manage host/modem string exchange via TCP/IP connection (this class is a derived class ...
~Msocket()
Class destructor.
pthread_t thread_id
Id of a parallel thread.
char msg_tx[_MAX_MSG_LENGTH]
Message to be transmitted host to modem.
virtual int writeToModem(std::string)
Method for writing to the modem.
int rc
Indicator of the thread creation.
int getSocket()
Method to read the pointer to the socket where to write (it is needed by the reading function invoked...
struct sockaddr_in serv_addr
Structure to contain the Internet address to be used.
struct hostent * server
Structure to define the server host.
virtual int openConnection()
Method to open the connection with the modem.
int sockfd
Pointer to the socket.
virtual void closeConnection()
Method to close the connection with the modem.
std::string server_host
Name of the server host on the Internet to which we want to be connected as client.
void error(const char *)
Method report errors.
The class needed by UWMPhy_modem to manage string exchange with the modem.
The class needed by UWMPhy_modem to handle the different transmissions cases and corresponding protoc...