25 #include <gtest/gtest.h> 30 TEST(DeviceConfiguration, calcBaudRateZeroPacket){
34 TEST(DeviceConfiguration, calcBaudRateSmall){
38 TEST(DeviceConfiguration, calcBaudRateLarge){
42 TEST(DeviceConfiguration, calcBaudRateLargeVarying){
46 TEST(DeviceConfiguration, calcBaudRateMinFrequency){
50 TEST(DeviceConfiguration, calcBaudRateMaxFrequency){
55 TEST(DeviceConfiguration, calcBaudRateExceedingMaxFrequency){
59 TEST(DeviceConfiguration, calcBaudRateUnsupported){
63 TEST(DeviceConfiguration, calcBaudRateDuplicate){
67 TEST(DeviceConfiguration, createPacketPeriodsZeroRequest)
70 memset(&periodsPacket, 0,
sizeof(periodsPacket));
77 TEST(DeviceConfiguration, createPacketPeriodsSmallRequest)
91 TEST(DeviceConfiguration, createPacketPeriodsUnsupported)
98 TEST(DeviceConfiguration, createPacketPeriodsDuplicated)
105 TEST(DeviceConfiguration, createPacketPeriodsUnsupportedandDuplicated)
112 TEST(DeviceConfiguration, createPacketPeriodsExceedingMaxPeriods)
115 for(
int i = 0; i < 60; i++)
121 maxPeriods, periodsPacket));
124 TEST(DeviceConfiguration, createFilterOptionsDefault)
130 EXPECT_EQ(
true, filterOptions.
permanent);
139 TEST(DeviceConfiguration, createFilterOptionsVehicleOutOfRange)
143 filterOptions,
true, 15));
146 TEST(DeviceConfiguration, setBaudRate)
static int SetBaudRate(std::string _port, int _curBaudRate, int _primaryBaudRate, int _gpioBaudRate=115200, int _auxBaudRate=115200)
This function can be used to set the buad rate independent of the other functions of the driver...
KVH Geo Fog 3D driver class header.
packet_period_t packet_periods[MAXIMUM_PACKET_PERIODS]
uint8_t motion_analysis_enabled
static kvh::KvhPacketRequest minFrequencyRequest
static int CreateFilterOptionsPacket(filter_options_packet_t &, bool _permanent=true, uint8_t _vehicle_type=vehicle_type_car, bool _internal_gnss_enabled=true, bool _atmospheric_altitude_enabled=true, bool _velocity_heading_enabled=true, bool _reversing_detection_enabled=true, bool _motion_analysis_enabled=true)
static kvh::KvhPacketRequest unsupportedDuplicateRequest
static int CalculateRequiredBaud(KvhPacketRequest &)
Helper functions for configuring the hardware.
static kvh::KvhPacketRequest largeVaryingRatesRequest
uint8_t atmospheric_altitude_enabled
static kvh::KvhPacketRequest zeroRequest
static kvh::KvhPacketRequest duplicateRequest
static kvh::KvhPacketRequest unsupportedRequest
static kvh::KvhPacketRequest exceedingMaxFrequencyRequest
static kvh::KvhPacketRequest largeRequest
std::vector< std::pair< packet_id_e, uint16_t > > KvhPacketRequest
uint8_t internal_gnss_enabled
TEST(DeviceConfiguration, calcBaudRateZeroPacket)
uint8_t reversing_detection_enabled
static kvh::KvhPacketRequest smallRequest
static int CreatePacketPeriodsPacket(KvhPacketRequest &_packetsRequested, packet_periods_packet_t &_packetPeriods)
static kvh::KvhPacketRequest maxFrequencyRequest
std::pair< packet_id_e, uint16_t > freqPair
uint8_t velocity_heading_enabled