21 return sizeof (uint64_t) * 3
23 +
sizeof (uint32_t) * 1;
28 int64_t & buffer_remaining)
31 if ((
size_t)buffer_remaining >=
sizeof (
size))
33 memcpy (&
size, buffer,
sizeof (
size));
35 buffer +=
sizeof (
size);
37 buffer_remaining -=
sizeof (
size);
48 if ((
size_t)buffer_remaining >=
sizeof (
updates))
54 buffer_remaining -=
sizeof (
updates);
57 if ((
size_t)buffer_remaining >=
sizeof (
clock))
61 buffer +=
sizeof (
clock);
63 buffer_remaining -=
sizeof (
clock);
66 if ((
size_t)buffer_remaining >=
sizeof (
timestamp))
75 if (buffer_remaining >= 1)
77 memcpy (&
ttl, buffer, 1);
80 buffer_remaining -= 1;
87 int64_t & buffer_remaining)
90 if ((
size_t)buffer_remaining >=
sizeof (
size))
93 buffer +=
sizeof (
size);
95 buffer_remaining -=
sizeof (
size);
106 if ((
size_t)buffer_remaining >=
sizeof (
updates))
111 buffer_remaining -=
sizeof (
updates);
114 if ((
size_t)buffer_remaining >=
sizeof (
clock))
117 buffer +=
sizeof (
clock);
119 buffer_remaining -=
sizeof (
clock);
122 if ((
size_t)buffer_remaining >=
sizeof (
timestamp))
130 if (buffer_remaining >= 1)
132 memcpy (buffer, &
ttl, 1);
135 buffer_remaining -= 1;
143 std::stringstream buffer;
144 buffer <<
"29: size (8:" <<
size <<
"), ";
145 buffer <<
"encoding (8:" <<
madara_id <<
"), ";
146 buffer <<
"numupdates (4:" <<
updates <<
"), ";
147 buffer <<
"clock (8:" <<
clock <<
"), ";
148 buffer <<
"ttl (1:" <<
ttl <<
"), ";
150 return buffer.str ();
MADARA_Export uint64_t endian_swap(uint64_t value)
Converts a host format uint64_t into big endian.