|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
32 " > sending to [%s] %s",
44 rpc(getRosCoreAddress(),
"xmlrpc", req, reply);
50 std::string::size_type break1 = url.find(
"://",0);
51 if (break1==std::string::npos) {
55 std::string::size_type break2 = url.find(
':',break1+3);
56 if (break2==std::string::npos) {
60 std::string::size_type break3 = url.find(
'/',break2+1);
61 if (break3==std::string::npos) {
65 hostname = url.substr(break1+3,break2-break1-3);
67 vportnum.
fromString(url.substr(break2+1,break3-break2-1).c_str());
71 rpc(getRosCoreAddress(),
"xmlrpc", req, reply);
93 rpc(c,
"xmlrpc",req,reply);
100 yCError(
TCPROSCARRIER,
"Failure looking up topic %s: expected list of protocols", name.c_str());
114 "topic %s available at %s:%d",
131 static bool checkedEnv =
false;
134 Contact c = getRosCoreAddressFromEnv();
A simple collection of objects that can be described and transmitted in a portable way.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
std::string getEnvironment(const char *key, bool *found=nullptr)
Read a variable from the environment.
static bool write(const Contact &contact, PortWriter &cmd, PortReader &reply, bool admin=false, bool quiet=false, double timeout=-1)
Send a single command to a port and await a single response.
bool lookupTopic(const std::string &name)
static bool rpc(const Contact &c, const char *carrier, Bottle &writer, Bottle &reader)
static yarp::os::Contact getRosCoreAddressFromEnv()
static Contact queryName(const std::string &name)
Find out information about a registered name.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Bottle & addList()
Places an empty nested list in the bottle, at the end of the list.
static yarp::os::Contact getRosCoreAddress()
virtual std::string asString() const
Get string value.
void addString(const char *str)
Places a string in the bottle, at the end of the list.
bool lookupCore(const std::string &name)
#define yCError(component,...)
virtual std::int32_t asInt32() const
Get 32-bit integer value.
An interface to the operating system, including Port based communication.
#define yCDebug(component,...)
std::string toString(const T &value)
convert an arbitrary type to string.
void fromString(const char *str)
Set value to correspond to a textual representation.
virtual Bottle * asList() const
Get list value.
A single value (typically within a Bottle).
const yarp::os::LogComponent & TCPROSCARRIER()