tobicore
7.0.0
|
TOBI iC interface. More...
#include <tobiplatform/TPiC.hpp>
Public Member Functions | |
int | Set (ICSerializer *serializer) |
Sends an ICMessage. | |
int | Get (ICSerializer *serializer) |
Receives an ICMessage. | |
Public Member Functions inherited from TPInterface | |
TPInterface (void) | |
Constructor. | |
virtual | ~TPInterface (void) |
Destructor. | |
int | Plug (const std::string &ip, const std::string &port, int mode=TPInterface::AsServer) |
Plug. | |
void | Unplug (void) |
Unplug. | |
bool | IsPlugged (void) |
Additional Inherited Members | |
Public Types inherited from TPInterface | |
enum | { AsServer = 0, AsClient } |
Plugging mode. More... | |
enum | { Unsuccessful = 0, Successful, ErrorSocket, ErrorEndpoint, ErrorBound, ErrorGeneric, ErrorNotSupported, ErrorProtocol, ErrorTimeout } |
Status/error codes. More... | |
Protected Member Functions inherited from TPInterface | |
virtual int | ConfAsServer (const std::string &ip, const std::string &port) |
virtual int | ConfAsClient (const std::string &ip, const std::string &port) |
Protected Attributes inherited from TPInterface | |
TPSocket * | _socket |
Socket for TCP communication. | |
TPSocket * | _endpoint |
Reference to communication endpoint. | |
TPSocket * | _com |
Reference to _socket or _endpoint. | |
TPStreamer | _stream |
Data streamer. | |
std::string | _cache |
TOBI iC interface.
Implements a TOBI iC client or sever object by heavily relying on the functionalities provided by TPInterface.
int TPiC::Get | ( | ICSerializer * | serializer | ) |
Receives an ICMessage.
An ICSerializer is configured passing a reference to an ICMessage. This method simply needs a reference to an existing ICSerializer to deserialize a message received via a TCP connection.
Definition at line 37 of file TPiC.cpp.
int TPiC::Set | ( | ICSerializer * | serializer | ) |
Sends an ICMessage.
An ICSerializer is configured passing a reference to an ICMessage. This method simply needs a reference to an existing ICSerializer to serialize its content and send it over a TCP connection.
Definition at line 24 of file TPiC.cpp.