47 #define SROS_SERIALIZE_PRIMITIVE(ptr, data) { memcpy(ptr, &data, sizeof(data)); ptr += sizeof(data); } 48 #define SROS_SERIALIZE_BUFFER(ptr, data, data_size) { if (data_size > 0) { memcpy(ptr, data, data_size); ptr += data_size; } } 49 #define SROS_DESERIALIZE_PRIMITIVE(ptr, data) { memcpy(&data, ptr, sizeof(data)); ptr += sizeof(data); } 50 #define SROS_DESERIALIZE_BUFFER(ptr, data, data_size) { if (data_size > 0) { memcpy(data, ptr, data_size); ptr += data_size; } } 71 return parse(buffer.data(),
size, error_msg);
77 while (buf < buffer + size)
84 error_msg =
"Received an invalid TCPROS header. Each element must be prepended by a 4-byte length.";
95 size_t eqpos = line.find_first_of(
"=", 0);
96 if (eqpos == string::npos)
98 error_msg =
"Received an invalid TCPROS header. Each line must have an equals sign.";
103 string key = line.substr(0, eqpos);
104 string value = line.substr(eqpos+1);
114 M_string::const_iterator
it =
read_map_->find(key);
130 M_string::const_iterator
it = key_vals.begin();
131 M_string::const_iterator
end = key_vals.end();
132 for (; it !=
end; ++
it)
137 size +=
static_cast<uint32_t>(key.length());
138 size +=
static_cast<uint32_t>(value.length());
149 std::vector<uint8_t>
v(0, size);
150 buffer = std::vector<uint8_t> (
size, 0);
151 char* ptr = (
char*)buffer.data();
155 M_string::const_iterator
it = key_vals.begin();
156 M_string::const_iterator
end = key_vals.end();
157 for (; it !=
end; ++
it)
165 static const char equals =
'=';
GLsizei const GLchar *const * string
GLenum GLuint GLenum GLsizei const GLchar * buf
::std_msgs::Header_< std::allocator< void > > Header
std::map< std::string, std::string > M_string
#define CONSOLE_BRIDGE_logError(fmt,...)