Telematics SDK - Interface Specification  v1.38.19

Data Structures

class  telux::config::ConfigFactory
 ConfigFactory allows creation of config related classes. More...
 
struct  telux::config::ConfigInfo
 
class  telux::config::IModemConfigListener
 Listener class for getting notifications related to configuration change detection. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe. More...
 
class  telux::config::IModemConfigManager
 IModemConfigManager provides interface to list config files present in modem's storage. load a new config file in modem, activate a config file, get active config file information, deactivate a config file, delete config file from the modem's storage, get and set mode of config auto selection, register and deregister listener for config update in modem. The config files are also referred to as MBNs. More...
 

Typedefs

using telux::config::ConfigId = std::string
 
using telux::config::ConfigListCallback = std::function< void(std::vector< ConfigInfo > configList, telux::common::ErrorCode error)>
 
using telux::config::GetAutoSelectionModeCallback = std::function< void(AutoSelectionMode mode, telux::common::ErrorCode error)>
 
using telux::config::GetActiveConfigCallback = std::function< void(ConfigInfo configInfo, telux::common::ErrorCode error)>
 

Enumerations

enum  telux::config::ConfigType { telux::config::ConfigType::HARDWARE, telux::config::ConfigType::SOFTWARE }
 
enum  telux::config::AutoSelectionMode { telux::config::AutoSelectionMode::DISABLED, telux::config::AutoSelectionMode::ENABLED }
 
enum  telux::config::ConfigUpdateStatus { telux::config::ConfigUpdateStatus::START, telux::config::ConfigUpdateStatus::COMPLETE }
 

Detailed Description

This section contains APIs related to Modem Config operations.


Data Structure Documentation

class telux::config::ConfigFactory

ConfigFactory allows creation of config related classes.

Public Member Functions

std::shared_ptr< IModemConfigManagergetModemConfigManager ()
 

Static Public Member Functions

static ConfigFactorygetInstance ()
 

Member Function Documentation

static ConfigFactory& telux::config::ConfigFactory::getInstance ( )
static

Get instance of Config Factory

std::shared_ptr<IModemConfigManager> telux::config::ConfigFactory::getModemConfigManager ( )

Get instance of ModemConfig manager

Returns
pointer of IModemConfigManager object.
struct telux::config::ConfigInfo
Data Fields
ConfigId id

id - stores the id of the configuration type - stores config type size - stores the size of the configuration desc - stores the configuration description version - stores version of the config file

ConfigType type
uint32_t size
string desc
uint32_t version
class telux::config::IModemConfigListener

Listener class for getting notifications related to configuration change detection. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe.

Public Member Functions

virtual void onConfigUpdateStatus (ConfigUpdateStatus status, int slotId)
 
virtual ~IModemConfigListener ()
 
- Public Member Functions inherited from telux::common::IServiceStatusListener
virtual void onServiceStatusChange (ServiceStatus status)
 
virtual ~IServiceStatusListener ()
 

Constructor & Destructor Documentation

virtual telux::config::IModemConfigListener::~IModemConfigListener ( )
virtual

Destructor of IModemConfigListener

Member Function Documentation

virtual void telux::config::IModemConfigListener::onConfigUpdateStatus ( ConfigUpdateStatus  status,
int  slotId 
)
virtual

This function is called when a configuration update is detected. It is applicable only to SOFTWARE config.

Parameters
[in]statusupdate status of config.
[in]slotIdslotId where update is detected.
class telux::config::IModemConfigManager

IModemConfigManager provides interface to list config files present in modem's storage. load a new config file in modem, activate a config file, get active config file information, deactivate a config file, delete config file from the modem's storage, get and set mode of config auto selection, register and deregister listener for config update in modem. The config files are also referred to as MBNs.

Public Member Functions

virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual telux::common::Status requestConfigList (ConfigListCallback cb)=0
 
virtual telux::common::Status loadConfigFile (std::string filePath, ConfigType configType, telux::common::ResponseCallback cb=nullptr)=0
 
virtual telux::common::Status activateConfig (ConfigType configType, ConfigId configId, int slotId=DEFAULT_SLOT_ID, telux::common::ResponseCallback cb=nullptr)=0
 
virtual telux::common::Status getActiveConfig (ConfigType configType, GetActiveConfigCallback cb, int slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status deactivateConfig (ConfigType configType, int slotId=DEFAULT_SLOT_ID, telux::common::ResponseCallback cb=nullptr)=0
 
virtual telux::common::Status deleteConfig (ConfigType configType, ConfigId configId="", telux::common::ResponseCallback cb=nullptr)=0
 
virtual telux::common::Status getAutoSelectionMode (GetAutoSelectionModeCallback cb, int slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status setAutoSelectionMode (AutoSelectionMode mode, int slotId=DEFAULT_SLOT_ID, telux::common::ResponseCallback cb=nullptr)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< IModemConfigListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< IModemConfigListener > listener)=0
 
virtual ~IModemConfigManager ()
 

Constructor & Destructor Documentation

virtual telux::config::IModemConfigManager::~IModemConfigManager ( )
virtual

Destructor of IModemConfigManager

Member Function Documentation

virtual bool telux::config::IModemConfigManager::isSubsystemReady ( )
pure virtual

Checks the status of modem config subsystem and returns the result.

Returns
If true that means ModemConfigManager is ready for performing config operations.
virtual std::future<bool> telux::config::IModemConfigManager::onSubsystemReady ( )
pure virtual

Wait for modem config subsystem to be ready.

Returns
A future that caller can wait on to be notified when modem config subsystem is ready.
virtual telux::common::Status telux::config::IModemConfigManager::requestConfigList ( ConfigListCallback  cb)
pure virtual

Fetching the list of config files present in modem's storage.

Parameters
[in]cb- callback to the Response function.

returns SUCCESS if the request to get config list is sent successfully.

virtual telux::common::Status telux::config::IModemConfigManager::loadConfigFile ( std::string  filePath,
ConfigType  configType,
telux::common::ResponseCallback  cb = nullptr 
)
pure virtual

Loads a new config file into the modem's storage. This is a persistent operation. Only the config files loaded into the modem's storage can be activated.

Parameters
[in]filePath- it defines the path to the config file.
[in]configType- type of the config file.
[in]cb- callback to the response function.

returns SUCCESS if the request to load config file is sent successfully.

virtual telux::common::Status telux::config::IModemConfigManager::activateConfig ( ConfigType  configType,
ConfigId  configId,
int  slotId = DEFAULT_SLOT_ID,
telux::common::ResponseCallback  cb = nullptr 
)
pure virtual

Activates the config file on specified slot id. A file for activation must be loaded or should already be present in modem's storage.

Parameters
[in]configType- type of the config file.
[in]configId- id of the config file.
[in]slotId- it defines the slot id to be selected.
[in]cb- callback to the response function.
Returns
SUCCESS if the request to activate config file is sent successfully.
virtual telux::common::Status telux::config::IModemConfigManager::getActiveConfig ( ConfigType  configType,
GetActiveConfigCallback  cb,
int  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Get the currently active config file information for the specified slot id. In case default config files are activated, would return error.

Parameters
[in]configType- type of the config file.
[in]cb- callback to the response function.
[in]slotId- it defines the slot id to be selected.
Returns
SUCCESS if the request to get active config information is sent successfully.
virtual telux::common::Status telux::config::IModemConfigManager::deactivateConfig ( ConfigType  configType,
int  slotId = DEFAULT_SLOT_ID,
telux::common::ResponseCallback  cb = nullptr 
)
pure virtual

Deactivates the config file for the specified slot id.

Parameters
[in]configType- type of the config file.
[in]slotId- slot id to be selected for deactivation of config.
[in]cb- callback to the response function.
Returns
SUCCESS if the request to deactivate config file is sent successfully
virtual telux::common::Status telux::config::IModemConfigManager::deleteConfig ( ConfigType  configType,
ConfigId  configId = "",
telux::common::ResponseCallback  cb = nullptr 
)
pure virtual

Deletes the config file from the modem's storage.

Parameters
[in]configType- type of the config file.
[in]configId- id of the config file. This parameter is optional if not provided all the config files of the given config type are deleted from modem's storage.
[in]cb- callback to the Response function.
Returns
SUCCESS if the request to delete config file is sent successfully
virtual telux::common::Status telux::config::IModemConfigManager::getAutoSelectionMode ( GetAutoSelectionModeCallback  cb,
int  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Fetching the mode of config auto selection for specified slot id.

Parameters
[in]cb- callback to the response function.
[in]slotId- slot id of config.
Returns
SUCCESS if the request to get selection mode is sent successfully
virtual telux::common::Status telux::config::IModemConfigManager::setAutoSelectionMode ( AutoSelectionMode  mode,
int  slotId = DEFAULT_SLOT_ID,
telux::common::ResponseCallback  cb = nullptr 
)
pure virtual

Setting the mode of config auto selection for specified slot id.

Parameters
[in]mode- auto selection mode status.
[in]slotId- slot id of the config.
[in]cb- callback to the response function.
Returns
SUCCESS if the request to set selection mode is sent successfully.
virtual telux::common::Status telux::config::IModemConfigManager::registerListener ( std::weak_ptr< IModemConfigListener listener)
pure virtual

Registeres the listener for indications.

Parameters
[in]listener- pointer to implemented listener.
Returns
SUCCESS if the request to register listener is sent successfully.
virtual telux::common::Status telux::config::IModemConfigManager::deregisterListener ( std::weak_ptr< IModemConfigListener listener)
pure virtual

Deregisteres the listener from indications.

Parameters
[in]listener- pointer to registered listener.
Returns
SUCCESS if the request to deregister listener is sent successfully.

Typedef Documentation

using telux::config::ConfigId = typedef std::string
using telux::config::ConfigListCallback = typedef std::function<void (std::vector<ConfigInfo> configList, telux::common::ErrorCode error)>

This function is called as a response to requestConfigList().

Parameters
[in]configList- Contains the list of config files in modem's storage.
[in]error- Return code which indicates whether the operation succeeded or not. ErrorCode
using telux::config::GetAutoSelectionModeCallback = typedef std::function<void (AutoSelectionMode mode, telux::common::ErrorCode error)>

This function is called as a response to getAutoSelectionMode().

Parameters
[in]mode- contains status of auto selection for configs.
[in]error- Return code which indicates whether the operation succeeded or not. ErrorCode
using telux::config::GetActiveConfigCallback = typedef std::function<void (ConfigInfo configInfo, telux::common::ErrorCode error)>

This function is called as a response to getActiveConfig().

Parameters
[in]configInfo- Information of active config file for specified slot id.
[in]error- Return code which indicates whether the operation succeeded or not. ErrorCode

Enumeration Type Documentation

Enumerator
HARDWARE 

For hardware or platform related configuration files

SOFTWARE 

For software or carrier related configuration files

Selection Mode defines status of auto selection mode for configs.

Enumerator
DISABLED 

Auto selection disabled

ENABLED 

Auto selection enabled

ConfigUpdateStatus represent status of config update, a update of config happens when a software config is activated and all segments using the config are updated with new config.

Enumerator
START 

start of updation process

COMPLETE 

end of updation process