tobicore  7.0.0
 All Classes Functions Variables Typedefs Enumerator Friends Groups Pages
TPiC Class Reference

TOBI iC interface. More...

#include <tobiplatform/TPiC.hpp>

+ Inheritance diagram for TPiC:
+ Collaboration diagram for TPiC:

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

Detailed Description

TOBI iC interface.

Implements a TOBI iC client or sever object by heavily relying on the functionalities provided by TPInterface.

Examples:
tpicclient.cpp, and tpicserver.cpp.

Definition at line 32 of file TPiC.hpp.

Member Function Documentation

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.

Examples:
tpicserver.cpp.

Definition at line 37 of file TPiC.cpp.

+ Here is the call graph for this function:

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.

Examples:
tpicclient.cpp.

Definition at line 24 of file TPiC.cpp.

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: