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: FileManager GPSGms6 SDFileSystem mbed
Fork of 2545_SD_Card by
FileManager.h@4:aa7ac2ac6913, 2016-05-09 (annotated)
- Committer:
- Lucyjungz
- Date:
- Mon May 09 08:59:23 2016 +0000
- Revision:
- 4:aa7ac2ac6913
- Parent:
- 2:c96b02fcb98e
- Child:
- 5:07aaa6e3784c
read variable list from another xml file
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Lucyjungz | 4:aa7ac2ac6913 | 1 | #define SETUP_FILE_NAME "/sd/RMS_Tester.xml" |
| Lucyjungz | 4:aa7ac2ac6913 | 2 | #define GPS_LOG_FILE_NAME "/sd/gps.csv" |
| Lucyjungz | 4:aa7ac2ac6913 | 3 | #define VARIABLE_FILE_NAME "/sd/20160216185627_upload.xml" |
| Lucyjungz | 4:aa7ac2ac6913 | 4 | #define MINIRMS_LOG_FILE_NAME "/sd/miniRMS.log" |
| Lucyjungz | 4:aa7ac2ac6913 | 5 | |
| Lucyjungz | 2:c96b02fcb98e | 6 | #define GPS_TAG "<Gps>" |
| Lucyjungz | 2:c96b02fcb98e | 7 | #define DATA_TAG "<Data>" |
| Lucyjungz | 2:c96b02fcb98e | 8 | #define UPDATE_INTERVAL_TAG "<Update_Interval>" |
| Lucyjungz | 4:aa7ac2ac6913 | 9 | #define VAR_NAME_TAG "<varName>" |
| Lucyjungz | 4:aa7ac2ac6913 | 10 | #define VAR_ADDR_TAG "<varAddress>" |
| Lucyjungz | 2:c96b02fcb98e | 11 | #define XMLTEXT_SIZE 20 |
| Lucyjungz | 2:c96b02fcb98e | 12 | |
| Lucyjungz | 4:aa7ac2ac6913 | 13 | #define VAR_NAME_MAX_SIZE 20 |
| Lucyjungz | 4:aa7ac2ac6913 | 14 | #define VAR_ADDR_MAX_SIZE 10 |
| Lucyjungz | 4:aa7ac2ac6913 | 15 | #define MAX_VAR 50 |
| Lucyjungz | 2:c96b02fcb98e | 16 | |
| Lucyjungz | 2:c96b02fcb98e | 17 | typedef enum { |
| Lucyjungz | 2:c96b02fcb98e | 18 | STATE_FINDING, /** Finding */ |
| Lucyjungz | 2:c96b02fcb98e | 19 | STATE_FOUND_DATA, /** Found Data tag */ |
| Lucyjungz | 2:c96b02fcb98e | 20 | STATE_FOUND_DATA_INTERVAL, /**< Found update internal of tag*/ |
| Lucyjungz | 2:c96b02fcb98e | 21 | STATE_FOUND_GPS, /** Found GPS tag */ |
| Lucyjungz | 2:c96b02fcb98e | 22 | STATE_FOUND_GPS_INTERVAL, /** Found update internal of GPS*/ |
| Lucyjungz | 2:c96b02fcb98e | 23 | }ReadingFileState; |
| Lucyjungz | 2:c96b02fcb98e | 24 | |
| Lucyjungz | 2:c96b02fcb98e | 25 | |
| Lucyjungz | 4:aa7ac2ac6913 | 26 | typedef struct |
| Lucyjungz | 4:aa7ac2ac6913 | 27 | { |
| Lucyjungz | 4:aa7ac2ac6913 | 28 | char varName[VAR_NAME_MAX_SIZE]; |
| Lucyjungz | 4:aa7ac2ac6913 | 29 | char varAddress[VAR_ADDR_MAX_SIZE+1]; |
| Lucyjungz | 4:aa7ac2ac6913 | 30 | } Variable_Data_TypeDef; |
| Lucyjungz | 2:c96b02fcb98e | 31 | |
| Lucyjungz | 2:c96b02fcb98e | 32 | void readSetupFile(); |
| Lucyjungz | 2:c96b02fcb98e | 33 | void delete_file(char filename[]); |
| Lucyjungz | 2:c96b02fcb98e | 34 | int GPSInterval(); |
| Lucyjungz | 2:c96b02fcb98e | 35 | int DataInterval(); |
| Lucyjungz | 2:c96b02fcb98e | 36 | void logGPSData(char date[], char time[]); |
| Lucyjungz | 2:c96b02fcb98e | 37 | void logSystemData(float gps_interval); |
| Lucyjungz | 4:aa7ac2ac6913 | 38 | Variable_Data_TypeDef * readVarFile(); |
| Lucyjungz | 4:aa7ac2ac6913 | 39 | int getVarListAmount(); |
