A test program for ConfigFile library.

Dependencies:   mbed ConfigFile

Revision:
1:d125bda3cf74
Parent:
0:78215cbf31b4
Child:
2:1b88311b9f10
--- a/main.cpp	Sun Sep 12 07:40:20 2010 +0000
+++ b/main.cpp	Sun Sep 12 07:53:39 2010 +0000
@@ -26,7 +26,7 @@
  * Message2  = This is a test message no.2
  *
  * ==================================================
- * Output (output.cfg)
+ * Output (output1.cfg)
  * ==================================================
  * MyKey1=This is a value for key1.
  * MyKey2=Value 2
@@ -34,6 +34,13 @@
  * Message2  = This is a test message no.2
  *
  * ==================================================
+ * Output (output2.txt)
+ * ==================================================
+ * # This is a configuration file for my application.
+ * ABC=123
+ * DEF=456
+ *
+ * ==================================================
  * Output (console)
  * ==================================================
  * 'MyKey1'='This is a value for key1.'
@@ -61,7 +68,23 @@
     /*
      * Write a configuration file to a mbed.
      */
-    cfg.write("/local/output.cfg");
+    cfg.write("/local/output1.cfg");
+
+    /*
+     * Remove all configurations.
+     */
+    cfg.removeAll();
+    
+    /*
+     * Write a configuration value.
+     */
+    cfg.setValue("ABC", "123");
+    cfg.setValue("DEF", "456");
+
+    /*
+     * Write a configuration file to a mbed.
+     */
+    cfg.write("/local/output2.cfg", "# This is a configuration file for my application.");
 
     while (1) {
     }