| | |
| | | * All rights reserved. |
| | | * |
| | | * Filename: config.h |
| | | * Description: This file is mqttd configure file parser function |
| | | * Description: This file is lightd configure file parser function |
| | | * |
| | | * Version: 1.0.0(2019年06月25日) |
| | | * Author: Guo Wenxue <guowenxue@gmail.com> |
| | |
| | | #define __CONF_H_ |
| | | |
| | | #include <stddef.h> |
| | | #include "utils.h" |
| | | #include "gpio.h" |
| | | |
| | | enum |
| | |
| | | } iotd_ctx_t; |
| | | |
| | | /* get iotd_ctx address by mqtt_ctx address */ |
| | | #define container_of(ptr, type, member) ((type *)((char *)(ptr) - offsetof(type, member))) |
| | | #define to_iotd(ctx) container_of(ctx, iotd_ctx_t, mqtt); |
| | | |
| | | extern int parser_conf(const char *conf_file, iotd_ctx_t *ctx, int debug); |