|
tobicore
7.0.0
|
TOBI iD interface. More...
#include <tobiplatform/TPiD.hpp>
Inheritance diagram for TPiD:
Collaboration diagram for TPiD:Public Member Functions | |
| TPiD (void) | |
| Constructor. | |
| virtual | ~TPiD (void) |
| Destructor. | |
| int | Set (IDSerializer *serializer, int bidx=TCBlock::BlockIdxUnset, int *abidx=NULL) |
| Sends an IDMessage. | |
| int | Get (IDSerializer *serializer) |
| Receives an IDMessage. | |
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 iD interface.
Implements a TOBI iD client relying on the functionalities provided by TPInterface.
| int TPiD::Get | ( | IDSerializer * | serializer | ) |
Receives an IDMessage.
An IDSerializer is configured passing a reference to an IDMessage. This method simply needs a reference to an existing IDSerializer to serialize its content and send it over a TCP connection.
Definition at line 68 of file TPiD.cpp.
Here is the call graph for this function:| int TPiD::Set | ( | IDSerializer * | serializer, |
| int | bidx = TCBlock::BlockIdxUnset, |
||
| int * | abidx = NULL |
||
| ) |
Sends an IDMessage.
An IDSerializer is configured passing a reference to an IDMessage. This method simply needs a reference to an existing IDSerializer to serialize its content and send it over a TCP connection. Each time we send an IDMessage to the acquisition server we need to tag the aformentioned message with a frame number. Once the server received the IDMessage, it replies to the sender by sending a status message containg the frame number at which the message was received.
Definition at line 24 of file TPiD.cpp.
Here is the call graph for this function: