Stg_restore_multiple()

Top  Previous  Next

Description:

API procedure, initializes (sets the default values for) all or multiple settings.

Syntax:

function stg_restore_multiple(init_mode as en_stg_init_modes) as en_stg_status_codes

Returns:

One of these en_stg_status_codes: EN_STG_STATUS_OK, EN_STG_STATUS_NOT_STARTED, EN_STG_STATUS_FAILURE, EN_STG_STATUS_INVALID.

See Also:

Verifying and Initializing Settings

 


Part

Description

init_mode

Initialization mode:

Modes 0- EN_STG_INIT_MODE_NORMAL and 1- 1- EN_STG_INIT_MODE_OVERRIDE work on non-volatile and volatile settings.

Modes 2- EN_STG_INIT_MODE_RAM_ONLY and 3- EN_STG_INIT_MODE_RAM_ONLY_OVERRIDE only work on volatile settings. Non-volatile settings are not checked at all.

Modes 0- EN_STG_INIT_MODE_NORMAL and 2- EN_STG_INIT_MODE_RAM_ONLY cause conditional initialization of settings according to the value of their initialization mode field in the descriptor file: settings with mode "A" ("always") are always initialized, settings with mode "I" ("when invalid") are initialized only when their current value is invalid (EN_STG_STATUS_INVALID) or corrupted (EN_STG_STATUS_FAILURE).

Modes 1- EN_STG_INIT_MODE_OVERRIDE and 3- EN_STG_INIT_MODE_RAM_ONLY_OVERRIDE cause initialization of settings regardless of their validity.

stg_timestamp variable

When STG_TIMESTAMP is 1, this variable should be preset with the desired timestamp prior to calling stg_restore_member(). All affected settings will receive the same timestamp.

Details

Default values for setting members are stored in the descriptor file.

When this procedure executes, callback_stg_post_set() is called for each setting being initialized.