BLE EddystoneService example
This example is a fork of the following mbed-os example:
https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-ble-EddystoneService/
Please read the documentation in this page.
source/PersistentStorageHelper/ConfigParamsPersistence.h@41:97bbb1eb43d7, 2017-07-28 (annotated)
- Committer:
- bcostm
- Date:
- Fri Jul 28 10:07:05 2017 +0200
- Revision:
- 41:97bbb1eb43d7
- Parent:
- 3:5120491ba317
Add DISCO_L475VG_IOT01A in mbed_app.json
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 3:5120491ba317 | 1 | /* mbed Microcontroller Library |
mbed_official | 3:5120491ba317 | 2 | * Copyright (c) 2006-2015 ARM Limited |
mbed_official | 3:5120491ba317 | 3 | * |
mbed_official | 3:5120491ba317 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mbed_official | 3:5120491ba317 | 5 | * you may not use this file except in compliance with the License. |
mbed_official | 3:5120491ba317 | 6 | * You may obtain a copy of the License at |
mbed_official | 3:5120491ba317 | 7 | * |
mbed_official | 3:5120491ba317 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 3:5120491ba317 | 9 | * |
mbed_official | 3:5120491ba317 | 10 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 3:5120491ba317 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 3:5120491ba317 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 3:5120491ba317 | 13 | * See the License for the specific language governing permissions and |
mbed_official | 3:5120491ba317 | 14 | * limitations under the License. |
mbed_official | 3:5120491ba317 | 15 | */ |
mbed_official | 3:5120491ba317 | 16 | |
mbed_official | 3:5120491ba317 | 17 | #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__ |
mbed_official | 3:5120491ba317 | 18 | #define __BLE_CONFIG_PARAMS_PERSISTENCE_H__ |
mbed_official | 3:5120491ba317 | 19 | |
mbed_official | 3:5120491ba317 | 20 | #include "../EddystoneService.h" |
mbed_official | 3:5120491ba317 | 21 | |
mbed_official | 3:5120491ba317 | 22 | /** |
mbed_official | 3:5120491ba317 | 23 | * Generic API to load the Eddystone Service configuration parameters from persistent |
mbed_official | 3:5120491ba317 | 24 | * storage. If persistent storage isn't available, the persistenceSignature |
mbed_official | 3:5120491ba317 | 25 | * member of params may be left un-initialized to the MAGIC, and this will cause |
mbed_official | 3:5120491ba317 | 26 | * a reset to default values. |
mbed_official | 3:5120491ba317 | 27 | * |
mbed_official | 3:5120491ba317 | 28 | * @param[out] paramsP |
mbed_official | 3:5120491ba317 | 29 | * The parameters to be filled in from persistence storage. This |
mbed_official | 3:5120491ba317 | 30 | * argument can be NULL if the caller is only interested in |
mbed_official | 3:5120491ba317 | 31 | * discovering the persistence status of params. |
mbed_official | 3:5120491ba317 | 32 | * |
mbed_official | 3:5120491ba317 | 33 | * @return true if params were loaded from persistent storage and have usefully |
mbed_official | 3:5120491ba317 | 34 | * initialized fields. |
mbed_official | 3:5120491ba317 | 35 | */ |
mbed_official | 3:5120491ba317 | 36 | bool loadEddystoneServiceConfigParams(EddystoneService::EddystoneParams_t *paramsP); |
mbed_official | 3:5120491ba317 | 37 | |
mbed_official | 3:5120491ba317 | 38 | /** |
mbed_official | 3:5120491ba317 | 39 | * Generic API to store the Eddystone Service configuration parameters to persistent |
mbed_official | 3:5120491ba317 | 40 | * storage. It typically initializes the persistenceSignature member of the |
mbed_official | 3:5120491ba317 | 41 | * params to the MAGIC value to indicate persistence. |
mbed_official | 3:5120491ba317 | 42 | * |
mbed_official | 3:5120491ba317 | 43 | * @param[in,out] paramsP |
mbed_official | 3:5120491ba317 | 44 | * The params to be saved; persistenceSignature member gets |
mbed_official | 3:5120491ba317 | 45 | * updated if persistence is successful. |
mbed_official | 3:5120491ba317 | 46 | * |
mbed_official | 3:5120491ba317 | 47 | * @note The save operation may be asynchronous. It may be a short while before |
mbed_official | 3:5120491ba317 | 48 | * the request takes affect. Reading back saved configParams may not yield |
mbed_official | 3:5120491ba317 | 49 | * correct behaviour if attempted soon after a store. |
mbed_official | 3:5120491ba317 | 50 | */ |
mbed_official | 3:5120491ba317 | 51 | void saveEddystoneServiceConfigParams(const EddystoneService::EddystoneParams_t *paramsP); |
mbed_official | 3:5120491ba317 | 52 | |
mbed_official | 3:5120491ba317 | 53 | #endif /* #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__*/ |