3 #include <boost/test/unit_test.hpp> 11 BOOST_CHECK_EQUAL(
true, std::is_pod<time_message>::value);
14 char const buf[] = u8
"\x06" 19 BOOST_REQUIRE_EQUAL(
sizeof(buf) - 1,
sizeof(msg));
20 std::memcpy(&msg, buf,
sizeof(msg));
21 BOOST_CHECK_EQUAL(
int(msg.
length.value()), 6);
23 BOOST_CHECK_EQUAL(msg.
time.value(), 34200);
25 std::ostringstream os;
28 os.str(), std::string(
"length=6,message_type=32,time=34200"));
BOOST_AUTO_TEST_CASE(time_message_basic)
boost::endian::little_uint8_buf_t length
boost::endian::little_uint8_buf_t message_type
Represent the 'Time' message in the PITCH-2.X protocol.
boost::endian::little_int32_buf_t time