Creating a Static CommandList

SCLs contain a list of commands that are run by the SSM. The SysCLE runs these commands as per the policy. The policy for deciding which commandLists are run by the SysCLE is included within the system state Manager component (SysStateMgr.exe).

When there is a system state or a property transition, SysState goes through a series of policy steps to find which commandList must be run by SysCLE. SysCLE responds with a result code which is passed back to the state policy plug-in. The next action returned by the state policy plug-in depends on this result code. SCLs contains a list of commands that are run by the SSM and SysCLE runs the commands as per the policy. SysCLE is based on SysStart, but it is converted into a DLL. After GSA is migrated to SSMA, the current Static Startup Configuration (SSC) commands are maintained. The following table lists the new commands and functions that are introduced into SysCLE.

Follow the steps given below to create a static commandList:


  1. Include ssmcmd.rh to write a commandList.

  2. Include ssmsubstates.hrh to write a commandList for the system-wide property.

  3. Include a constant, UID2 KUidSsmCommandListResourceFile to identify the startup list.

  4. Include RESOURCE SSM_COMMAND_LIST_ROOT. This is the first resource in a commandList resource file that needs to be included. RESOURCE SSM_COMMAND_LIST_ROOT has RESOURCE SSM_COMMAND_LIST_MAPPING and RESOURCE SSM_COMMAND_LIST.
    Note: Resource STRUCT SSM_START_AMA_STARTER is a resource structure in the command list resource file that needs to be included to launch After Market Components (AMCs) at phone boot time. This structure contains the UID of the DSC to execute. The DSC can be created using the After Market Application (AMA) Starter component.

The static command list is created.

Example

The following example code shows how a static commandList is created:


#include <ssmcmd.rh>
#include <ssmsubstates.hrh>
UID2 KUidSsmCommandListResourceFile
// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
// The SSM relies on this having a resource ID of 1.
RESOURCE SSM_COMMAND_LIST_ROOT
    {
    command_list_mapping = r_command_list_mapping;
    }

RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
    {
    mappings =
        {
        SSM_COMMANDLISTID_TO_RESOURCEID
            {
            command_list_1 = ESsm_1;
            resource_id_1 = r_commands_1;
            },
        };
    }

RESOURCE SSM_COMMAND_LIST r_command_1
    {
    commands =
        {
        r_command_1, 
        r_command_2, 
        r_command_3, 
        r_command_4
        };
    }

RESOURCE SSM_COMMAND_LIST r_ command_2
    {
    commands =
        {
        r_command_1, 
        r_command_2, 
        r_command_3
    };
}