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.
Diff: FileManager.h
- Revision:
- 21:0c52dbc23f52
- Parent:
- 20:61f5769a0716
- Child:
- 22:2fc64ad66e35
--- a/FileManager.h Wed May 25 07:26:01 2016 +0000 +++ b/FileManager.h Wed May 25 10:21:50 2016 +0000 @@ -14,6 +14,7 @@ #define DEVICE_NAME "sd" /*!< Device directory */ // DEVICE_NAME must be put in between "/" for file name +#define PREFIX_FILE_NAME "/sd/" /*!< Prefix File Name */ #define SETUP_FILE_NAME "/sd/RMS_Tester.xml" /*!< Setup File Name */ #define GPS_LOG_FILE_NAME "/sd/YYYY-MM-DD.gps.csv " /*!< GPS Log File Name */ #define RTL_LOG_FILE_NAME "/sd/YYYY-MM-DD.rtl.csv" /*!< RMS Log File Name */ @@ -23,6 +24,7 @@ /** XML Tag */ #define GPS_TAG "<Gps>" /*!< GPS Tag */ #define DATA_TAG "<Data>" /*!< Data Tag */ +#define VAR_LIST_FILE_TAG "<List_File_Name>" /*!< Variable List File Name Tag */ #define UPDATE_INTERVAL_TAG "<Update_Interval>" /*!< Update Internal Tag */ #define VAR_NAME_TAG "<varName>" /*!< Variable Name Tag */ #define VAR_ADDR_TAG "<varAddress>" /*!< Variable Address Tag */ @@ -42,6 +44,7 @@ #define VAR_BITMASK_MAX_SIZE 5 /*!< Variable Bit Mask Maximum Size */ #define VAR_UNIT_MAX_SIZE 20 /*!< Variable Unit Maximum Size */ +#define MAX_FILE_NAME_SIZE 40 /*!< Maximum File name size to be supported */ #define MAX_VAR 50 /*!< Maximum variable to be supported */ #define RMS_HEADER_TIME "Time" /*!< RMS Header Time tag */ @@ -96,7 +99,6 @@ /* ############### Exported variable ################## */ -extern DigitalOut sdSwitch; extern bool m_SdCardHasDisconnected; @@ -110,8 +112,11 @@ Variable_Data_TypeDef * FILEMANAGER_ReadVarFile(); int FILEMANAGER_GetAmountVarList(); Variable_Data_TypeDef * FILEMANAGER_GetVarList(); -void FILEMANAGER_LogRMSData(time_t timestamp ,float * var, int size); +void FILEMANAGER_LogRMSData(time_t timestamp ,float * var, int size, bool * p_headerRequired); void FILEMANAGER_LogRMSHeader(time_t timestamp); bool FILEMANAGER_IsFileExist(char filename[]); +void FILEMANAGER_SDDisconnect(); +void FILEMANAGER_SDConnect(); +void FILEMANAGER_Init(); #endif
