iSpike  2.1
Spike conversion library for robotics
ispike::YarpConnection Class Reference

#include <YarpConnection.hpp>

List of all members.

Public Member Functions

 YarpConnection (std::string ip, unsigned port)
 ~YarpConnection ()
int connect_to_port (std::string ip, unsigned port)
map< string, YarpPortDetails > & getPortMap ()
string getSocketString ()
void prepare_to_read_binary ()
void prepare_to_read_text ()
bool read_image (Bitmap &bitmap)
std::string read_until (string until)
int write_text (std::string message)

Detailed Description

Main interface used for communication with Yarp

Definition at line 18 of file YarpConnection.hpp.


Constructor & Destructor Documentation

YarpConnection::YarpConnection ( std::string  ip,
unsigned  port 
)

Constructor

Definition at line 24 of file YarpConnection.cpp.

Destructor

Definition at line 77 of file YarpConnection.cpp.


Member Function Documentation

int YarpConnection::connect_to_port ( std::string  ip,
unsigned  port 
)

Connect to a given YARP port

Parameters:
ipThe IP address of the Yarp server
portThe port number to connect to
Returns:
true if connected, false otherwise

Definition at line 137 of file YarpConnection.cpp.

Definition at line 23 of file YarpConnection.hpp.

Definition at line 97 of file YarpConnection.cpp.

Reverses the connection to enable binary contents to be read. It will no longer be possible to write to this port

Definition at line 167 of file YarpConnection.cpp.

Reverses the connection to enable text to be read It will no longer be possible to write to this port

Definition at line 156 of file YarpConnection.cpp.

bool YarpConnection::read_image ( Bitmap bitmap)

Reads image data into the supplied bitmap, resizing it if necessary Returns true if data has been successfully read, false otherwise.

Definition at line 203 of file YarpConnection.cpp.

string YarpConnection::read_until ( string  until)

Read text until a given string is received

Parameters:
untilThe string where we stop
Returns:
The text that has been read including the stop characters

Definition at line 124 of file YarpConnection.cpp.

int YarpConnection::write_text ( std::string  message)

Write text contents to a previously opened socket

Parameters:
messageThe message to be written
Returns:
something

Definition at line 88 of file YarpConnection.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines