bipedal locomotion framework
A suite of libraries for achieving bipedal locomotion on humanoid robots
BipedalLocomotion::YarpUtilities::VectorsCollectionClient Class Reference

VectorsCollectionClient is a class that implements that allows to receive a VectorsCollection from a VectorsCollectionServer. More...

#include <YarpUtilities/include/BipedalLocomotion/YarpUtilities/VectorsCollectionClient.h>

Public Member Functions

 VectorsCollectionClient ()
 Constructor.
 
virtual ~VectorsCollectionClient ()
 Destructor.
 
bool initialize (std::weak_ptr< const ParametersHandler::IParametersHandler > handler)
 Initialize the server. More...
 
bool connect ()
 Connect to the ports. More...
 
bool disconnect ()
 Disconnect from the ports. More...
 
bool isNewMetadataAvailable () const
 Check if new metadata is available. More...
 
bool getMetadata (BipedalLocomotion::YarpUtilities::VectorsCollectionMetadata &metadata)
 Get the metadata. More...
 
BipedalLocomotion::YarpUtilities::VectorsCollection * readData (bool shouldWait=true)
 Read the data from the port. More...
 

Detailed Description

VectorsCollectionClient is a class that implements that allows to receive a VectorsCollection from a VectorsCollectionServer.

Member Function Documentation

◆ initialize()

bool VectorsCollectionClient::initialize ( std::weak_ptr< const ParametersHandler::IParametersHandler handler)

Initialize the server.

Parameters
handlerpointer 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.

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.

◆ 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
metadatametadata 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
shouldWaitif 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: