25 #include <gtest/gtest.h> 29 TEST(PacketStorage, initZero)
33 EXPECT_EQ(0, packetStorage.
Size());
36 TEST(PacketStorage, initSmallRequest)
40 EXPECT_EQ(2, packetStorage.
Size());
43 TEST(PacketStorage, initLargeRequest)
47 EXPECT_EQ(8, packetStorage.
Size());
50 TEST(PacketStorage, initDuplicate)
56 TEST(PacketStorage, initUnsupported)
62 TEST(PacketStorage, updatePacket)
94 TEST(PacketStorage, updateIncorrectType)
104 TEST(PacketStorage, updateUncontained)
114 TEST(PacketStorage, updateUnsupportedandUncontained)
122 TEST(PacketStorage, setPacketUpdatedandPacketIsUpdated)
138 TEST(PacketStorage, packetIsUpdatedNotInit)
144 TEST(PacketStorage, setPacketUpdatedUncontained)
151 TEST(PacketStorage, packetIsUpdatedUncontained)
167 TEST(PacketStorage, getPacketNotInit)
174 TEST(PacketStorage, getPacketIncorrectType)
182 TEST(PacketStorage, getPacketUncontained)
190 TEST(PacketStorage, getPacketUnsupportedandUncontained)
198 TEST(PacketStorage, updatePacketandGetPacket)
208 sysPacket.
height = 100100;
235 EXPECT_EQ(sysPacket.
microseconds, sysPacket2.microseconds);
236 EXPECT_EQ(sysPacket.
latitude, sysPacket2.latitude);
237 EXPECT_EQ(sysPacket.
longitude, sysPacket2.longitude);
238 EXPECT_EQ(sysPacket.
height, sysPacket2.height);
239 EXPECT_EQ(sysPacket.
velocity[0], sysPacket2.velocity[0]);
240 EXPECT_EQ(sysPacket.
velocity[1], sysPacket2.velocity[1]);
241 EXPECT_EQ(sysPacket.
velocity[2], sysPacket2.velocity[2]);
245 EXPECT_EQ(sysPacket.
g_force, sysPacket2.g_force);
246 EXPECT_EQ(sysPacket.
orientation[0], sysPacket2.orientation[0]);
247 EXPECT_EQ(sysPacket.
orientation[1], sysPacket2.orientation[1]);
248 EXPECT_EQ(sysPacket.
orientation[2], sysPacket2.orientation[2]);
259 TEST(PacketStorage, UTM_UpdateAndGetPacket)
266 utmPacket.
zone =
'B';
275 EXPECT_EQ(utmPacket.
position[0], utmPacket2.position[0]);
276 EXPECT_EQ(utmPacket.
position[1], utmPacket2.position[1]);
277 EXPECT_EQ(utmPacket.
position[2], utmPacket2.position[2]);
278 EXPECT_EQ(utmPacket.
zone, utmPacket2.zone);
279 EXPECT_EQ(utmPacket.
zone_num, utmPacket2.zone_num);
282 TEST(PacketStorage, containsTrue)
290 TEST(PacketStorage, containsFalse)
301 EXPECT_EQ(2, packetStorage.
Size());
308 EXPECT_EQ(8, packetStorage.
Size());
311 TEST(PacketStorage, printPacketTypes)
316 TEST(PacketStorage, printPacketSizes)
float angular_velocity[3]
union system_state_packet_t::@1 filter_status
TEST(PacketStorage, initZero)
float standard_deviation[3]
static kvh::KvhPacketRequest zeroRequest
KVH Packet storing class header.
uint32_t unix_time_seconds
static kvh::KvhPacketRequest duplicateRequest
static kvh::KvhPacketRequest unsupportedRequest
static kvh::KvhPacketRequest largeRequest
int Init(KvhPacketRequest &)
Correctly sets up a KvhPacketMap for the requested packets.
int GetPacket(packet_id_e _packetId, T &_packet)
int SetPacketUpdated(packet_id_e, bool)
bool PacketIsUpdated(packet_id_e)
static void PrintPacketTypes()
static void PrintPacketSizes()
float body_acceleration[3]
static kvh::KvhPacketRequest smallRequest
bool Contains(packet_id_e)
int UpdatePacket(packet_id_e _packetId, T &_packetData)
union system_state_packet_t::@0 system_status