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: ConfigFile
ConfigurationFile.h@0:1405a58a7e8d, 2016-04-03 (annotated)
- Committer:
- 13075593
- Date:
- Sun Apr 03 15:44:20 2016 +0000
- Revision:
- 0:1405a58a7e8d
- Child:
- 1:5b6c5c2a33d0
Read Config File;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
13075593 | 0:1405a58a7e8d | 1 | #ifndef CONFIGURATION_FILE_H |
13075593 | 0:1405a58a7e8d | 2 | #define CONFIGURATION_FILE_H |
13075593 | 0:1405a58a7e8d | 3 | |
13075593 | 0:1405a58a7e8d | 4 | #include "mbed.h" |
13075593 | 0:1405a58a7e8d | 5 | #include "ConfigFile.h" |
13075593 | 0:1405a58a7e8d | 6 | #include "ConfigurationFile.h" |
13075593 | 0:1405a58a7e8d | 7 | #include "PC_Comm.h" |
13075593 | 0:1405a58a7e8d | 8 | #include <string> |
13075593 | 0:1405a58a7e8d | 9 | |
13075593 | 0:1405a58a7e8d | 10 | class ConfigurationFile{ |
13075593 | 0:1405a58a7e8d | 11 | public: |
13075593 | 0:1405a58a7e8d | 12 | ConfigurationFile(); |
13075593 | 0:1405a58a7e8d | 13 | ~ConfigurationFile(); |
13075593 | 0:1405a58a7e8d | 14 | void readServerEthernetConfiguration(); |
13075593 | 0:1405a58a7e8d | 15 | void readNodeEthernetConfiguration(); |
13075593 | 0:1405a58a7e8d | 16 | void readConfigurationFile(char *pathName); |
13075593 | 0:1405a58a7e8d | 17 | |
13075593 | 0:1405a58a7e8d | 18 | string getIP(); |
13075593 | 0:1405a58a7e8d | 19 | void setMask(); |
13075593 | 0:1405a58a7e8d | 20 | string getMask(); |
13075593 | 0:1405a58a7e8d | 21 | string getGateway(); |
13075593 | 0:1405a58a7e8d | 22 | string getURL(); |
13075593 | 0:1405a58a7e8d | 23 | |
13075593 | 0:1405a58a7e8d | 24 | private: |
13075593 | 0:1405a58a7e8d | 25 | ConfigFile cfg; |
13075593 | 0:1405a58a7e8d | 26 | Serial *pc; |
13075593 | 0:1405a58a7e8d | 27 | string ip; |
13075593 | 0:1405a58a7e8d | 28 | string mask; |
13075593 | 0:1405a58a7e8d | 29 | string gateway; |
13075593 | 0:1405a58a7e8d | 30 | string url; |
13075593 | 0:1405a58a7e8d | 31 | void setIP(); |
13075593 | 0:1405a58a7e8d | 32 | void setGateway(); |
13075593 | 0:1405a58a7e8d | 33 | void setURL(); |
13075593 | 0:1405a58a7e8d | 34 | }; |
13075593 | 0:1405a58a7e8d | 35 | |
13075593 | 0:1405a58a7e8d | 36 | #endif |