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:
- 4:c8f6d3677937
- Parent:
- 3:7177e463ac52
- Child:
- 6:d5c26e813715
--- a/ConfigurationFile.cpp Wed Apr 06 20:20:25 2016 +0000
+++ b/ConfigurationFile.cpp Wed Apr 06 20:29:02 2016 +0000
@@ -1,13 +1,15 @@
#include "ConfigurationFile.h"
-ConfigurationFile::ConfigurationFile(char *pathName)
+ConfigurationFile::ConfigurationFile()
{
- readConfigurationFile(pathName);
+ readConfigurationFile("/local/unit.cfg");
readUnitConfiguration();
}
void ConfigurationFile::readConfigurationFile(char *pathName)
{
+ LocalFileSystem local("local");
+
if (!cfg.read(pathName))
{
error("Failure to read a configuration file.\n");
@@ -130,9 +132,9 @@
void ConfigurationFile::getUnitConfiguration()
{
- printf("IP : %s,\n",getIP());
- printf("Mask : %s,\n",getMask());
- printf("Gateway : %s,\n",getGateway());
- printf("URL : %s,\n",getURL());
+ printf("IP : %s\n",getIP());
+ printf("Mask : %s\n",getMask());
+ printf("Gateway : %s\n",getGateway());
+ printf("URL : %s\n",getURL());
printf("BroadcastPort : %i,\n",getBroadcastPort());
}
\ No newline at end of file