DESERT 3.5.1
|
#include <uwconnector.h>
Public Member Functions | |
UwConnector () | |
virtual | ~UwConnector () |
virtual void | setServer () |
virtual void | setTCP () |
virtual void | setUDP () |
virtual bool | openConnection (const std::string &path)=0 |
virtual bool | closeConnection ()=0 |
virtual int | writeToDevice (const std::string &msg)=0 |
virtual int | readFromDevice (void *wpos, int maxlen)=0 |
virtual const int | getErrno () |
virtual const bool | isConnected ()=0 |
Protected Attributes | |
int | local_errno |
Class UwConnector allows to specify an interface between the UwDriver object and the device.
The connector is typically a TCP or UDP connection, but may also be a serial connection. It allows to retrieve the data packets received by the transducer and to send commands to it. UwConnector assumes the connector works on a byte-based flow.
Definition at line 51 of file uwconnector.h.
|
inline |
UwConnector constructor.
address | string representing an address, whatever that is |
Definition at line 59 of file uwconnector.h.
|
inlinevirtual |
UwConnector destructor.
Definition at line 64 of file uwconnector.h.
|
pure virtual |
|
inlinevirtual |
Function that retrieves the last saved errno code: to be implemented.
Definition at line 120 of file uwconnector.h.
|
pure virtual |
|
pure virtual |
Method that opens up a connection to a device.
This method can open a conection with the modem's data/config interface or directly to some remote host at the end of the connection. @path string representing the path to connect to: its meaning depends on the type of connection established
|
pure virtual |
Function that dumps data from the device's memory to data char array.
The downloaded data is saved to a temporary buffer, to be later parsed.
pos | char pointer to the beginning of the writable area; it is duty of the caller to take care of the writable area |
maxlen | maximum integer number of char to write to wpos |
|
inlinevirtual |
Method required in client-server connection (e.g.
TCP)
Reimplemented in UwSocket.
Definition at line 69 of file uwconnector.h.
|
inlinevirtual |
Method that should set, for a socket connector, the TCP transport protocol.
To be left untouched by other types of connectors.
Reimplemented in UwSocket.
Definition at line 75 of file uwconnector.h.
|
inlinevirtual |
Method that should set, for a socket connector, the UDP transport protocol.
To be left untouched by other types of connectors.
Reimplemented in UwSocket.
Definition at line 81 of file uwconnector.h.
|
pure virtual |
|
protected |
Definition at line 133 of file uwconnector.h.