23 memcpy(buf,str.c_str(),str.length());
32 sprintf(buf,
"%c (%#x) ", (ch>=
' ')?ch:
'.', *
reinterpret_cast<unsigned char*
>(&ch));
40 for (
auto& it : data) {
41 std::string key = it.first;
42 std::string val = it.second;
43 len += 4 + key.length() + 1 + val.length();
45 std::string result(len,
'\0');
46 char *buf = (
char *)result.c_str();
47 for (
auto& it : data) {
48 std::string key = it.first;
49 std::string val = it.second;
50 appendInt32(buf,key.length()+1+val.length());
51 appendString(buf,key);
52 appendString(buf,std::string(
"="));
53 appendString(buf,val);
62 unsigned int len = bin.length();
63 char *at = (
char*) bin.c_str();
70 std::string keyval(at,slen);
71 size_t delim = keyval.find_first_of(
'=',0);
72 if (delim == std::string::npos) {
75 std::string key = keyval.substr(0,delim);
76 std::string val = keyval.substr(delim+1);
88 for (
const auto& it : data) {
89 std::string key = it.first;
90 std::string val = it.second;
const yarp::os::LogComponent & TCPROSCARRIER()
A simple abstraction for a block of bytes.
static int netInt(const yarp::os::Bytes &code)
#define yCTrace(component,...)
#define yCWarning(component,...)
An interface to the operating system, including Port based communication.