31 memcpy((
char*)(&tmp), code.
get(), code.
length());
39 if (code.
length() !=
sizeof(i)) {
40 yCError(NETTYPE,
"not enough room for integer");
47 #ifndef YARP_NO_DEPRECATED
81 return yarp::conf::numeric::from_string<int>(x);
97 return yarp::conf::numeric::from_string<yarp::conf::float32_t>(s);
102 return yarp::conf::numeric::from_string<yarp::conf::float64_t>(s);
107 return yarp::conf::numeric::from_string<yarp::conf::float32_t>(s);
112 return yarp::conf::numeric::from_string<yarp::conf::float64_t>(s);
134 for (n = 0; n < 256; n++) {
135 c = (
unsigned long)n;
136 for (k = 0; k < 8; k++) {
138 c = 0xedb88320L ^ (c >> 1);
153 static unsigned long update_crc(
unsigned long crc,
unsigned char* buf,
size_t len)
156 unsigned long c = crc;
162 for (n = 0; n < len; n++) {
163 c =
crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8);
171 return update_crc(0xffffffffL, (
unsigned char*)buf, len) ^ 0xffffffffL;
static int crc_table_computed
static unsigned long crc_table[256]
static unsigned long update_crc(unsigned long crc, unsigned char *buf, size_t len)
static void make_crc_table()
A simple abstraction for a block of bytes.
static int netInt(const yarp::os::Bytes &code)
static std::string toString(int x)
static yarp::conf::float64_t toFloat64(const std::string &s)
static std::string toHexString(int x)
static unsigned long int getCrc(char *buf, size_t len)
static int toInt(const std::string &x)
static yarp::conf::float32_t toFloat32(const std::string &s)
#define yCError(component,...)
#define yCAssert(component, x)
#define YARP_OS_LOG_COMPONENT(name, name_string)
std::string to_hex_string(IntegerType i)
std::string to_string(IntegerType x)
The components from which ports and connections are built.
An interface to the operating system, including Port based communication.
std::int32_t NetInt32
Definition of the NetInt32 type.