27 #include <gtest/gtest.h> 28 #include <boost/asio.hpp> 72 for (
EIP_UINT i = 10000; i < 10000 + 1000; ++i)
77 for (
EIP_UINT i = 20000; i < 20000 + 1000; ++i)
87 EXPECT_EQ(
sizeof(d), reader.getByteCount());
108 for (
int i = 0; i < mr.
range_data.size(); ++i)
142 for (
int i = 0; i < 1000; ++i)
148 for (
int i = 0; i < 1000; ++i)
157 EXPECT_EQ(
sizeof(d), writer.getByteCount());
159 EXPECT_EQ(d[0], 0xEF);
160 EXPECT_EQ(d[1], 0xBE);
161 EXPECT_EQ(d[2], 0xAD);
162 EXPECT_EQ(d[3], 0xDE);
163 EXPECT_EQ(d[4], 0x40);
164 EXPECT_EQ(d[5], 0x9C);
167 EXPECT_EQ(d[8], 0xAA);
168 EXPECT_EQ(d[9], 0x55);
169 EXPECT_EQ(d[10], 0xAA);
170 EXPECT_EQ(d[11], 0x55);
171 EXPECT_EQ(d[12], 0x45);
172 EXPECT_EQ(d[13], 0xA9);
179 EXPECT_EQ(d[20], 0x45);
181 EXPECT_EQ(d[22], 0xAA);
183 EXPECT_EQ(d[24], 0x0F);
185 EXPECT_EQ(d[26], 0x07);
187 EXPECT_EQ(d[28], 0x03);
189 EXPECT_EQ(d[30], 0x02);
190 EXPECT_EQ(d[31], 0x04);
191 EXPECT_EQ(d[32], 0xAA);
192 EXPECT_EQ(d[33], 0x55);
193 EXPECT_EQ(d[34], 0xA5);
194 EXPECT_EQ(d[35], 0x5A);
213 EXPECT_EQ(d[54], 0xE8);
214 EXPECT_EQ(d[55], 0x03);
216 for (
int i = 0; i < 1000; ++i)
219 EXPECT_EQ((exp_value)&0x00FF, d[56 + i * 2]);
220 EXPECT_EQ((exp_value >> 8) & 0x00FF, d[56 + i * 2 + 1]);
223 for (
int i = 0; i < 1000; ++i)
226 EXPECT_EQ((exp_value)&0x00FF, d[56 + 2000 + i * 2]);
227 EXPECT_EQ((exp_value >> 8) & 0x00FF, d[56 + 2000 + i * 2 + 1]);
vector< EIP_UINT > reflectance_data
virtual Writer & serialize(Writer &writer) const
virtual size_t getLength() const
MeasurementReportHeader header
virtual Reader & deserialize(Reader &reader, size_t length)
TEST_F(RangeAndReflectanceMeasurementTest, test_deserialize)
vector< EIP_UINT > range_data