8 : size (encoded_size ()),
9 type (0), updates (0), quality (0), clock (0),
10 timestamp (time (NULL)), ttl (0)
27 return sizeof (uint64_t) * 3
30 +
sizeof (uint32_t) * 3;
36 return sizeof (uint64_t) * 3
39 +
sizeof (uint32_t) * 3;
44 int64_t & buffer_remaining)
47 if ((
size_t)buffer_remaining >=
sizeof (
size))
49 memcpy (&
size, buffer,
sizeof (
size));
51 buffer +=
sizeof (
size);
53 buffer_remaining -=
sizeof (
size);
80 if ((
size_t)buffer_remaining >=
sizeof (
type))
82 memcpy (&
type, buffer,
sizeof (
type));
84 buffer +=
sizeof (
type);
86 buffer_remaining -=
sizeof (
type);
89 if ((
size_t)buffer_remaining >=
sizeof (
updates))
95 buffer_remaining -=
sizeof (
updates);
98 if ((
size_t)buffer_remaining >=
sizeof (
quality))
104 buffer_remaining -=
sizeof (
quality);
107 if ((
size_t)buffer_remaining >=
sizeof (
clock))
111 buffer +=
sizeof (
clock);
113 buffer_remaining -=
sizeof (
clock);
116 if ((
size_t)buffer_remaining >=
sizeof (
timestamp))
125 if (buffer_remaining >= 1)
127 memcpy (&
ttl, buffer, 1);
130 buffer_remaining -= 1;
137 int64_t & buffer_remaining)
140 if ((
size_t)buffer_remaining >=
sizeof (
size))
143 buffer +=
sizeof (
size);
145 buffer_remaining -=
sizeof (
size);
172 if ((
size_t)buffer_remaining >=
sizeof (
type))
175 buffer +=
sizeof (
type);
177 buffer_remaining -=
sizeof (
type);
180 if ((
size_t)buffer_remaining >=
sizeof (
updates))
185 buffer_remaining -=
sizeof (
updates);
188 if ((
size_t)buffer_remaining >=
sizeof (
quality))
193 buffer_remaining -=
sizeof (
quality);
196 if ((
size_t)buffer_remaining >=
sizeof (
clock))
199 buffer +=
sizeof (
clock);
201 buffer_remaining -=
sizeof (
clock);
204 if ((
size_t)buffer_remaining >=
sizeof (
timestamp))
211 if (buffer_remaining >= 1)
213 memcpy (buffer, &
ttl, 1);
216 buffer_remaining -= 1;
224 std::stringstream buffer;
226 buffer <<
"140: size (8:" <<
size <<
"), ";
227 buffer <<
"encoding (8:" <<
madara_id <<
"), ";
228 buffer <<
"domain (32:" <<
domain <<
"), ";
230 buffer <<
"type (4:" <<
type <<
"), ";
231 buffer <<
"numupdates (4:" <<
updates <<
"), ";
232 buffer <<
"quality (4:" <<
quality <<
"), ";
233 buffer <<
"clock (8:" <<
clock <<
"), ";
234 buffer <<
"wallclock (8:" <<
timestamp <<
"), ";
235 buffer <<
"ttl (1:" << (int)
ttl <<
"), ";
237 return buffer.str ();
MADARA_Export uint64_t endian_swap(uint64_t value)
Converts a host format uint64_t into big endian.