Sample code for Enable/Disable GNSS device
//--------------------------------------------------------------------------------------------------/*** Test: Legato GNSS functions.**///--------------------------------------------------------------------------------------------------static void TestLeGnssDevice(void){uint32_t ttffValue;uint32_t acqRate;uint8_t minElevation;le_result_t result;int32_t altitudeOnWgs84=0;int64_t altitudeOnPZ90;le_gnss_ConstellationBitMask_t constellationMask;le_gnss_NmeaBitMask_t nmeaMask = 0;le_gnss_ConstellationArea_t constellationArea;LE_INFO("Start Test Testle_gnss_DeviceTest");// GNSS device enabled by default// Disable GNSS device (DISABLED state)// Check Disabled state&constellationArea)));&constellationArea)));result = le_gnss_SetAcquisitionRate(acqRate);// test le_gnss_Get/SetMinElevation when GNSS device is disabled and the engine is not started.minElevation = 40;LE_INFO("GNSS min elevation obtained: %d",minElevation);LE_ASSERT(minElevation == 40);// Enable GNSS device (READY state)LE_ASSERT_OK(le_gnss_GetConstellation(&constellationMask));LE_ASSERT(constellationMask == LE_GNSS_CONSTELLATION_GPS);&constellationArea));LE_ASSERT(LE_GNSS_OUTSIDE_US_AREA == constellationArea);&constellationArea));LE_ASSERT(LE_GNSS_WORLDWIDE_AREA == constellationArea);acqRate = 0;acqRate = 1100;LE_INFO("NMEA mask: %x",nmeaMask);// test le_gnss_Get/SetMinElevation when GNSS device is enabled and the engine is not started.minElevation = 0;LE_INFO("GNSS min elevation obtained: %d",minElevation);LE_ASSERT(minElevation == 0);// Start GNSS device (ACTIVE state)result = le_gnss_SetAcquisitionRate(acqRate);// test le_gnss_Get/SetMinElevation when le_gnss_ENABLE ON and le_gnss_Start ONminElevation = LE_GNSS_MIN_ELEVATION_MAX_DEGREE;LE_INFO("GNSS min elevation obtained: %d",minElevation);LE_ASSERT(minElevation == LE_GNSS_MIN_ELEVATION_MAX_DEGREE);// test le_gnss_SetMinElevation wrong value (when le_gnss_ENABLE ON and le_gnss_Start ON)minElevation = LE_GNSS_MIN_ELEVATION_MAX_DEGREE+1;// Stop GNSS device (READY state)LE_ASSERT(constellationMask == LE_GNSS_CONSTELLATION_GPS);// test le_gnss_ConvertDataCoordinate error casesaltitudeOnWgs84,NULL)));altitudeOnWgs84,&altitudeOnPZ90)));altitudeOnWgs84,&altitudeOnPZ90)));altitudeOnWgs84,&altitudeOnPZ90)));altitudeOnWgs84,&altitudeOnPZ90)));}