Jun Furutani / libMiMic

Fork of libMiMic by Ryo Iizuka

Revision:
13:a71705c5e6fd
Parent:
11:c82a7b2899b0
Child:
14:4618692ec239
--- a/cpp/NetConfig.h	Sat Apr 20 05:03:57 2013 +0000
+++ b/cpp/NetConfig.h	Sun Apr 21 01:21:41 2013 +0000
@@ -45,5 +45,30 @@
          * Set ethernet mac address to instance.
          */
         void setEmac(unsigned char ip6,unsigned char ip5,unsigned char ip4,unsigned char ip3,unsigned char ip2,unsigned char ip1);
-    };
-   }
\ No newline at end of file
+        /**
+         * Load configulation from text file.
+         * <p>File format example
+         * <pre>
+         * macaddr=00:00:00:00:00:00
+         * ipaddr=192.168.0.1
+         * netmask=255.255.255.0
+         * gateway=192.168.0.254
+         * </pre>
+         * <p>Keys
+         * <ul>
+         * <li>macaddr=[:macaddr:] - 48bit ethernet mac address that are separated by ':'</li>
+         * <li>ipaddr=[:ip:] - 32 bit IP address</li>
+         * <li>netmask=[:ip:]- 32 bit network mask value.</li>
+         * <li>gateway=[:ip:] - 32 bit default gateway address.</li>
+         * </ul>
+         * </p>
+         * Maximum line length is 31.
+         * Specified values are override on-chip setting value.
+         * If the same value appeared, then the last one is enabled.
+         * </p>
+         * @return
+         * true if file read. false is not read.
+         */
+         bool NetConfig::loadFromFile(const char* i_file);
+   };
+}
\ No newline at end of file