Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface FXOS8700Q HTTPClient HTTPD MQTTS SDFileSystem YodiwoPlegma mbed-rpc mbed-rtos mbed wolfSSL
config.h@2:b7489c070d1f, 2015-09-04 (annotated)
- Committer:
 - mitsarionas
 - Date:
 - Fri Sep 04 08:41:34 2015 +0000
 - Revision:
 - 2:b7489c070d1f
 - Child:
 - 3:11b767300d32
 
pairing & configuration read/write working
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| mitsarionas | 2:b7489c070d1f | 1 | #ifndef __CONFIG_H__ | 
| mitsarionas | 2:b7489c070d1f | 2 | #define __CONFIG_H__ | 
| mitsarionas | 2:b7489c070d1f | 3 | |
| mitsarionas | 2:b7489c070d1f | 4 | #ifdef __cplusplus | 
| mitsarionas | 2:b7489c070d1f | 5 | extern "C" { | 
| mitsarionas | 2:b7489c070d1f | 6 | #endif | 
| mitsarionas | 2:b7489c070d1f | 7 | |
| mitsarionas | 2:b7489c070d1f | 8 | #include <stdint.h> | 
| mitsarionas | 2:b7489c070d1f | 9 | #include <stdlib.h> | 
| mitsarionas | 2:b7489c070d1f | 10 | #include "yodiwo_helpers.h" | 
| mitsarionas | 2:b7489c070d1f | 11 | |
| mitsarionas | 2:b7489c070d1f | 12 | typedef struct | 
| mitsarionas | 2:b7489c070d1f | 13 | { | 
| mitsarionas | 2:b7489c070d1f | 14 | char *uuid; | 
| mitsarionas | 2:b7489c070d1f | 15 | char *name; | 
| mitsarionas | 2:b7489c070d1f | 16 | char *nodeKey; | 
| mitsarionas | 2:b7489c070d1f | 17 | char *nodeSecret; | 
| mitsarionas | 2:b7489c070d1f | 18 | char *pairingServerUrl; | 
| mitsarionas | 2:b7489c070d1f | 19 | char *ypchannelServer; | 
| mitsarionas | 2:b7489c070d1f | 20 | int32_t ypchannelServerPort; | 
| mitsarionas | 2:b7489c070d1f | 21 | int32_t webPort; | 
| mitsarionas | 2:b7489c070d1f | 22 | char *mqttBrokerHostname; | 
| mitsarionas | 2:b7489c070d1f | 23 | } config_t; | 
| mitsarionas | 2:b7489c070d1f | 24 | |
| mitsarionas | 2:b7489c070d1f | 25 | |
| mitsarionas | 2:b7489c070d1f | 26 | int read_config(config_t *config, char *filename); | 
| mitsarionas | 2:b7489c070d1f | 27 | int write_config(config_t *config, char *filename); | 
| mitsarionas | 2:b7489c070d1f | 28 | |
| mitsarionas | 2:b7489c070d1f | 29 | #ifdef __cplusplus | 
| mitsarionas | 2:b7489c070d1f | 30 | } | 
| mitsarionas | 2:b7489c070d1f | 31 | #endif | 
| mitsarionas | 2:b7489c070d1f | 32 | |
| mitsarionas | 2:b7489c070d1f | 33 | #endif /* __CONFIG_H__ */ |