Start a new topic

registerEditableConfig function configuration read at power on

Hi,


I need to update some variable of my configuration registered on instamsg server using registerEditableConfig function at power on of device.

Please replay how can i do it??


Hi Krunal.

If the config-value needs to be loaded before the multi-faceted registerEditableConfig call, that can be done in the following manner ::


 

    char jsonBuffer[MAX_BUFFER_SIZE] = {0};
    char *configKeyName = "keyName";
    char configValue[MAX_BUFFER_SIZE] = {0};

    int rc = get_config_value_from_persistent_storage(configKeyName, jsonBuffer, sizeof(jsonBuffer));
    if(rc == SUCCESS)
    {
        memset(configValue, 0, sizeof(configValue));
        getJsonKeyValueIfPresent(jsonBuffer, CONFIG_VALUE_KEY, configValue);

        /* At this point, "configValue" will contain the desired value. */
    }

 

 

Hi,


What can i set the min. time interval of data publish to instamsg server when my device is connected through WAN?


Hi Krunal.

It's 1 second (BUSINESS_LOGIC_INTERVAL config).

Also, kindly open a new thread for an independent topic :)

 

Login or Signup to post a comment