diff options
author | Joshua Allen <axlecrusher@gmail.com> | 2017-02-25 14:20:28 -0500 |
---|---|---|
committer | Joshua Allen <axlecrusher@gmail.com> | 2017-02-25 14:20:28 -0500 |
commit | 4c4969d0cb0f817de2aa866a7d8abfde6ecaff82 (patch) | |
tree | b55983fec48b807ed806ec328416c25f52d6863a /src/survive_config.h | |
parent | 5060fd7a4f1fa4313d7b928cebc392e5f6fd3641 (diff) | |
download | libsurvive-4c4969d0cb0f817de2aa866a7d8abfde6ecaff82.tar.gz libsurvive-4c4969d0cb0f817de2aa866a7d8abfde6ecaff82.tar.bz2 |
initial commit of config parser
Diffstat (limited to 'src/survive_config.h')
-rw-r--r-- | src/survive_config.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/survive_config.h b/src/survive_config.h new file mode 100644 index 0000000..03e5eb8 --- /dev/null +++ b/src/survive_config.h @@ -0,0 +1,36 @@ +// (C) 2017 <>< Joshua Allen, Under MIT/x11 License. + + +#ifndef _SURVIVE_CONFIG_H +#define _SURVIVE_CONFIG_H + +#include "survive_internal.h" + +typedef enum { + CONFIG_UNKNOWN = 0, + CONFIG_FLOAT = 1, + CONFIG_UINT32 = 2, + CONFIG_STRING = 3 +} cval_type; +/* +typedef union { + uint32_t i; + float f; + } Numeric; +*/ +typedef struct { + char *tag; + cval_type type; + union { + uint32_t i; + float f; + } numeric; + char *str; +} config_val; + + +void config_open(const char* path, const char* mode); +void config_close(); +void config_write_lighthouse(struct BaseStationData* bsd, uint8_t length); + +#endif
\ No newline at end of file |