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@3:7177e463ac52, 2016-04-06 (annotated)
- Committer:
- 13075593
- Date:
- Wed Apr 06 20:20:25 2016 +0000
- Revision:
- 3:7177e463ac52
- Parent:
- 2:5af11ca8e085
- Child:
- 4:c8f6d3677937
Self functionnal Class.; Initiate constructor with pathname parameter and the class will get those keys : ; - IP; - MASK; - GATEWAY; - URL; - BROADCAST
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 <string> |
13075593 | 0:1405a58a7e8d | 8 | |
13075593 | 0:1405a58a7e8d | 9 | class ConfigurationFile{ |
13075593 | 0:1405a58a7e8d | 10 | public: |
13075593 | 3:7177e463ac52 | 11 | ConfigurationFile(char *pathName); |
13075593 | 0:1405a58a7e8d | 12 | ~ConfigurationFile(); |
13075593 | 0:1405a58a7e8d | 13 | |
13075593 | 0:1405a58a7e8d | 14 | string getIP(); |
13075593 | 0:1405a58a7e8d | 15 | string getMask(); |
13075593 | 0:1405a58a7e8d | 16 | string getGateway(); |
13075593 | 0:1405a58a7e8d | 17 | string getURL(); |
13075593 | 3:7177e463ac52 | 18 | int getBroadcastPort(); |
13075593 | 3:7177e463ac52 | 19 | |
13075593 | 3:7177e463ac52 | 20 | void getUnitConfiguration(); |
13075593 | 0:1405a58a7e8d | 21 | |
13075593 | 0:1405a58a7e8d | 22 | private: |
13075593 | 0:1405a58a7e8d | 23 | ConfigFile cfg; |
13075593 | 1:5b6c5c2a33d0 | 24 | |
13075593 | 0:1405a58a7e8d | 25 | string ip; |
13075593 | 0:1405a58a7e8d | 26 | string mask; |
13075593 | 0:1405a58a7e8d | 27 | string gateway; |
13075593 | 3:7177e463ac52 | 28 | string broadcastPort; |
13075593 | 0:1405a58a7e8d | 29 | string url; |
13075593 | 1:5b6c5c2a33d0 | 30 | |
13075593 | 0:1405a58a7e8d | 31 | void setIP(); |
13075593 | 1:5b6c5c2a33d0 | 32 | void setMask(); |
13075593 | 0:1405a58a7e8d | 33 | void setGateway(); |
13075593 | 0:1405a58a7e8d | 34 | void setURL(); |
13075593 | 3:7177e463ac52 | 35 | void setBroadcastPort(); |
13075593 | 3:7177e463ac52 | 36 | |
13075593 | 3:7177e463ac52 | 37 | void readUnitConfiguration(); |
13075593 | 3:7177e463ac52 | 38 | void readConfigurationFile(char *pathName); |
13075593 | 0:1405a58a7e8d | 39 | }; |
13075593 | 0:1405a58a7e8d | 40 | |
13075593 | 0:1405a58a7e8d | 41 | #endif |