VectorsCollectionClient is a class that implements that allows to receive a VectorsCollection from a VectorsCollectionServer.
More...
#include <YarpUtilities/include/BipedalLocomotion/YarpUtilities/VectorsCollectionClient.h>
VectorsCollectionClient is a class that implements that allows to receive a VectorsCollection from a VectorsCollectionServer.
◆ initialize()
Initialize the server.
- Parameters
-
| handler | pointer to the parameters handler. |
- Note
- The following parameters are required:
| Parameter Name | Type | Description |
| local | string | Name of the local port. |
| remote | string | Name of the remote port. |
| carrier | string | Name of the carrier. |
- Returns
- true if the server has been initialized successfully, false otherwise.
◆ connect()
| bool VectorsCollectionClient::connect |
( |
| ) |
|
Connect to the ports.
- Note
- The cached metadata are discarded, since the server may be a new instance.
- Returns
- true if the connection has been established successfully, false otherwise.
◆ disconnect()
| bool VectorsCollectionClient::disconnect |
( |
| ) |
|
Disconnect from the ports.
- Returns
- true if the connection has been closed successfully, false otherwise.
◆ isConnected()
| bool VectorsCollectionClient::isConnected |
( |
| ) |
const |
Check if the data connection with the server is still alive.
- Note
- The server is not contacted, since it may block its streaming. The connection is alive if the local port has an input connection and the server registered in the name server is the one found at connection time. This function queries the name server, so it should not be called in a real-time loop.
- Returns
- true if the client is connected to the server, false otherwise.
◆ isNewMetadataAvailable()
| bool VectorsCollectionClient::isNewMetadataAvailable |
( |
| ) |
const |
Check if new metadata is available.
- Returns
- true if new metadata is available, false otherwise.
- Note
- it requires that the client is connected and that at least one data or metadata has been read from the server.
◆ getMetadata()
| bool VectorsCollectionClient::getMetadata |
( |
BipedalLocomotion::YarpUtilities::VectorsCollectionMetadata & |
metadata | ) |
|
Get the metadata.
- Parameters
-
| metadata | metadata of the vectors collection. |
- Returns
- true if the metadata has been retrieved successfully, false otherwise.
◆ readData()
| BipedalLocomotion::YarpUtilities::VectorsCollection * VectorsCollectionClient::readData |
( |
bool |
shouldWait = true | ) |
|
Read the data from the port.
- Parameters
-
| shouldWait | if true the function will wait until the data is available. |
- Returns
- a pointer to the VectorsCollection. The ownership of the pointer is controlled by the yarp port.
The documentation for this class was generated from the following files: