S5-P05 / ConfigurationFile

Dependencies:   ConfigFile

Dependents:   Ethernet

Committer:
13075593
Date:
Wed Apr 06 15:46:53 2016 +0000
Revision:
2:5af11ca8e085
Parent:
1:5b6c5c2a33d0
Child:
3:7177e463ac52
Change for broadcast

Who changed what in which revision?

UserRevisionLine numberNew 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 0:1405a58a7e8d 11 ConfigurationFile();
13075593 0:1405a58a7e8d 12 ~ConfigurationFile();
13075593 0:1405a58a7e8d 13 void readServerEthernetConfiguration();
13075593 0:1405a58a7e8d 14 void readNodeEthernetConfiguration();
13075593 0:1405a58a7e8d 15 void readConfigurationFile(char *pathName);
13075593 1:5b6c5c2a33d0 16 void getServerConfiguration();
13075593 1:5b6c5c2a33d0 17 void getNodeConfiguration();
13075593 0:1405a58a7e8d 18
13075593 0:1405a58a7e8d 19 string getIP();
13075593 0:1405a58a7e8d 20 string getMask();
13075593 0:1405a58a7e8d 21 string getGateway();
13075593 0:1405a58a7e8d 22 string getURL();
13075593 2:5af11ca8e085 23 string getBroadcastAddress();
13075593 0:1405a58a7e8d 24
13075593 0:1405a58a7e8d 25 private:
13075593 0:1405a58a7e8d 26 ConfigFile cfg;
13075593 1:5b6c5c2a33d0 27
13075593 0:1405a58a7e8d 28 string ip;
13075593 0:1405a58a7e8d 29 string mask;
13075593 0:1405a58a7e8d 30 string gateway;
13075593 2:5af11ca8e085 31 string broadcastAddress;
13075593 0:1405a58a7e8d 32 string url;
13075593 1:5b6c5c2a33d0 33
13075593 0:1405a58a7e8d 34 void setIP();
13075593 1:5b6c5c2a33d0 35 void setMask();
13075593 0:1405a58a7e8d 36 void setGateway();
13075593 0:1405a58a7e8d 37 void setURL();
13075593 2:5af11ca8e085 38 void setBroadcastAddress();
13075593 0:1405a58a7e8d 39 };
13075593 0:1405a58a7e8d 40
13075593 0:1405a58a7e8d 41 #endif