static void TestLeGnssDevice
(
void
)
{
uint32_t ttffValue;
uint32_t acqRate;
uint8_t minElevation;
int32_t altitudeOnWgs84=0;
int64_t altitudeOnPZ90;
le_gnss_ConstellationBitMask_t constellationMask;
le_gnss_NmeaBitMask_t nmeaMask = 0;
LE_INFO(
"Start Test Testle_gnss_DeviceTest");
"Factory restart in disabled state");
"Hot start in disabled state");
"Warm start in disabled state");
"Cold start in disabled state");
"Factory start in disabled state");
"Set constellation in disabled state");
"Get constellation in disabled state");
LE_GNSS_WORLDWIDE_AREA),
"Set GPS constellation area in disabled state");
&constellationArea),
"Get GPS constellation area in disabled state");
LE_GNSS_WORLDWIDE_AREA),
"Set GLONASS constellation area in disabled state");
&constellationArea),
"Get GLONASS constellation area in disabled state");
"Get acquisition rate in disabled state");
"Set acquisition rate in disabled state");
"Set NMEA sentences in disabled state");
"Get NMEA sentences in disabled state");
minElevation = 40;
LE_INFO(
"GNSS min elevation obtained: %d",minElevation);
LE_TEST_OK(minElevation == 40,
"Confirm min elevation is set to %d", minElevation);
"Set constellation GPS");
"Set invalid Galileo constellation area");
LE_GNSS_OUTSIDE_US_AREA),
"Set Galileo constellation area outside US");
&constellationArea),
"Get Galileo constellation area");
LE_TEST_OK(LE_GNSS_OUTSIDE_US_AREA == constellationArea,
"Confirm Galileo constellation area is set to %d", LE_GNSS_OUTSIDE_US_AREA);
LE_GNSS_WORLDWIDE_AREA),
"Set Galileo constellation area worldwide");
&constellationArea),
"Get Galileo constellation area");
LE_TEST_OK(LE_GNSS_WORLDWIDE_AREA == constellationArea,
"Confirm Galileo constellation area is set to %d", LE_GNSS_WORLDWIDE_AREA);
acqRate = 0;
"Set invalid acquisition rate");
acqRate = 1100;
minElevation = 0;
LE_TEST_INFO(
"GNSS min elevation obtained: %d",minElevation);
LE_TEST_OK(minElevation == 0,
"Confirm min elevation is set to 0");
"Set constellation in wrong state");
"Get constellation in wrong state");
"Hot start in active state");
"Warm start in active state");
"Cold start in active state");
"Factory start in active state");
"Get acquisition rate in wrong state");
"Set acquisition rate in wrong state");
"Set NMEA sentences in wrong state");
"Get NMEA sentences in wrong state");
LE_TEST_INFO(
"GNSS min elevation obtained: %d",minElevation);
"Set invalid min elevation");
"Set GPS constellation");
"Confirm constellation is set to GPS");
altitudeOnWgs84,
NULL)),
"ConvertDataCoordinateSystem error test: NULL pointer");
altitudeOnWgs84,
&altitudeOnPZ90)),
"ConvertDataCoordinateSystem error test: invalid source coordinate");
altitudeOnWgs84,
&altitudeOnPZ90)),
"ConvertDataCoordinateSystem error test: wrong source coordinate");
altitudeOnWgs84,
&altitudeOnPZ90)),
"ConvertDataCoordinateSystem error test: invalid data type");
altitudeOnWgs84,
&altitudeOnPZ90)),
"ConvertDataCoordinateSystem error test: mismatched coordinates");
}