Sample code for Band Capabilities

//--------------------------------------------------------------------------------------------------
/**
* Test: Get platform band capabilities.
*
* le_mrc_GetBandCapabilities() API test
* le_mrc_GetLteBandCapabilities() API test
* le_mrc_GetTdScdmaBandCapabilities() API test
*/
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
/**
* Test band capabilities according to RAT
*/
//--------------------------------------------------------------------------------------------------
static bool Test_BandCapabilities
(
le_mrc_RatBitMask_t ratMask,
)
{
bool test = true;
le_mrc_RatBitMask_t bitMaskOrigin;
 
// Get the current rat preference.
 
{
test = false;
}
// Restore origin RAT.
return test;
}
 
//--------------------------------------------------------------------------------------------------
/**
* Test: Get platform band capabilities.
*/
//--------------------------------------------------------------------------------------------------
static void Testle_mrc_GetBandCapabilities
(
void
)
{
le_mrc_BandBitMask_t bands;
le_mrc_LteBandBitMask_t lteBands;
le_mrc_TdScdmaBandBitMask_t tdScdmaBands;
 
// Not supported on all platform
switch(res)
{
case LE_OK:
LE_ASSERT(0L != bands);
LE_INFO("Get 2G/3G Band Capabilities bit mask: 0x%016"PRIX64, (uint64_t)bands);
break;
LE_WARN("Unable to get Band Capabilities on this platform");
break;
default:
LE_FATAL("le_mrc_GetBandCapabilities failed");
break;
}
 
// Test if LTE Band Capabilities are supported
 
LE_ASSERT(true == Test_BandCapabilities(LE_MRC_BITMASK_RAT_LTE, res));
 
switch(res)
{
case LE_OK:
LE_ASSERT(0 != lteBands);
LE_INFO("Get LTE Band Capabilities bit mask: 0x%016"PRIX64, (uint64_t)lteBands);
break;
LE_WARN("Unable to get Band Capabilities on this platform");
break;
default:
LE_FATAL("le_mrc_GetLteBandCapabilities failed");
break;
}
 
// Test if TD-SCDMA Band Capabilities are supported
res = le_mrc_GetTdScdmaBandCapabilities(&tdScdmaBands);
 
LE_ASSERT(true == Test_BandCapabilities(LE_MRC_BITMASK_RAT_TDSCDMA, res));
 
switch(res)
{
case LE_OK:
LE_ASSERT(0 != tdScdmaBands);
LE_INFO("Get TD-SCDMA Band Capabilities bit mask: 0x%016"PRIX64,
(uint64_t)tdScdmaBands);
break;
LE_WARN("Unable to get Band Capabilities on this platform");
break;
default:
LE_FATAL("le_mrc_GetTdScdmaBandCapabilities failed");
break;
}
}