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
Diff: ConfigurationFile.cpp
- Revision:
- 2:5af11ca8e085
- Parent:
- 1:5b6c5c2a33d0
- Child:
- 3:7177e463ac52
--- a/ConfigurationFile.cpp Mon Apr 04 22:04:09 2016 +0000
+++ b/ConfigurationFile.cpp Wed Apr 06 15:46:53 2016 +0000
@@ -88,24 +88,24 @@
return url;
}
-void ConfigurationFile::setServerAddress()
+void ConfigurationFile::setBroadcastAddress()
{
char value[BUFSIZ];
- if (cfg.getValue( "SERVER", &value[0], sizeof(value)))
+ if (cfg.getValue( "BROADCAST", &value[0], sizeof(value)))
{
- printf("'%s'='%s'\n", "Server Address", value);
+ printf("'%s'='%s'\n", "Broadcast Address", value);
string s = value;
- serverAddress = s;
+ broadcastAddress = s;
}
else
{
- error("Failure to read Server Address key");
+ error("Failure to read Broadcast Address key");
}
}
-string ConfigurationFile::getServerAddress()
+string ConfigurationFile::getBroadcastAddress()
{
- return serverAddress;
+ return broadcastAddress;
}
@@ -115,6 +115,7 @@
setMask();
setGateway();
setURL();
+ setBroadcastAddress();
}
void ConfigurationFile::readNodeEthernetConfiguration()
@@ -122,7 +123,7 @@
setIP();
setMask();
setGateway();
- setServerAddress();
+ setBroadcastAddress();
}
void ConfigurationFile::getServerConfiguration()
@@ -131,6 +132,7 @@
getMask();
getGateway();
getURL();
+ getBroadcastAddress();
}
void ConfigurationFile::getNodeConfiguration()
@@ -138,7 +140,7 @@
getIP();
getMask();
getGateway();
- getServerAddress();
+ getBroadcastAddress();
}
void ConfigurationFile::readConfigurationFile(char *pathName)