|
DESERT 4.0.0
|
#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.
|
inline |
UwConnector constructor
| address | string representing an address, whatever that is |
|
inlinevirtual |
UwConnector destructor
|
pure virtual |
|
inlinevirtual |
Function that retrieves the last saved errno code: to be implemented
References local_errno.
|
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.
|
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.
|
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.
|
pure virtual |
|
protected |