远程配置

主动获取配置

IotRemoteConfigCallback_t callback = {
    .cbRemoteNotice = cbRemoteNotice,
    .cbRemoteVersionResponse = cbRemoteVersionResponse,
    .cbRemoteStatusResponse = cbRemoteStatusResponse
};

IotRemoteConfig_Init(true, callback);

IotRemoteConfig_UploadVersion(0);

订阅获取

int cbRemoteNotice(cJSON *config, int version, char **msg) {
    IotLogDebug("remote config:%s version:%d", cJSON_PrintUnformatted(config), version);
    *msg = "remote config ok";

    IotRemoteConfig_UploadStatus(IOT_REMOTE_CONFIG_STATUS_SUCCESS, version, *msg);
    return 0;
}

results matching ""

    No results matching ""