31 memcpy((
char*)(&tmp), code.
get(), code.
length());
39 if (code.
length() !=
sizeof(i)) {
40 yCError(NETTYPE,
"not enough room for integer");
65 for (n = 0; n < 256; n++) {
67 for (k = 0; k < 8; k++) {
69 c = 0xedb88320L ^ (c >> 1);
84static unsigned long update_crc(
unsigned long crc,
unsigned char* buf,
size_t len)
87 unsigned long c = crc;
93 for (n = 0; n < len; n++) {
94 c =
crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8);
102 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 unsigned long int getCrc(char *buf, size_t len)
#define yCError(component,...)
#define yCAssert(component, x)
#define YARP_OS_LOG_COMPONENT(name, name_string)
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.