ban4jp - / SNICInterface_PullReq

Dependents:   SNIC-httpclient-example SNIC-ntpclient-example

Fork of SNICInterface by muRata

Revision:
0:61c402886fbb
Child:
2:0ba43344c814
diff -r 000000000000 -r 61c402886fbb YDwifiInterface.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/YDwifiInterface.h	Thu Mar 06 11:13:00 2014 +0000
@@ -0,0 +1,67 @@
+#ifndef _YD_WIFIINTERFACE_H_
+#define _YD_WIFIINTERFACE_H_
+
+#include "YDwifi.h"
+
+class C_YDwifiInterface: public C_YDwifi {
+public:
+
+    /**
+    * Constructor
+    *
+    * \param tx mbed pin to use for tx line of Serial interface
+    * \param rx mbed pin to use for rx line of Serial interface
+    * \param cts mbed pin to use for cts line of Serial interface
+    * \param rts mbed pin to use for rts line of Serial interface
+    * \param reset reset pin of the wifi module
+    * \param alarm alarm pin of the wifi module (default: NC)
+    * \param baud baud rate of Serial interface (default: 9600)
+    */
+  C_YDwifiInterface(PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm = NC, int baud = 9600);
+
+  /** Initialize the interface with DHCP.
+  * Initialize the interface and configure it to use DHCP (no connection at this point).
+  * \return 0 on success, a negative number on failure
+  */
+  int init();
+
+#if 0
+  /** Connect
+  * Bring the interface up, start DHCP if needed.
+  * \param sec the Wi-Fi security type
+  * \param ssid the Wi-Fi SSID
+  * \param phrase the Wi-Fi passphrase or security key
+  * \param mode the Wi-Fi mode
+  * \return 0 on success, a negative number on failure
+  */
+  int connect(Security sec, const char* ssid, const char* phrase, WiFiMode mode = WM_INFRASTRUCTURE);
+  
+  /** Disconnect
+  * Bring the interface down
+  * \return 0 on success, a negative number on failure
+  */
+  int disconnect();
+  
+  /** Get the MAC address of your Ethernet interface
+   * \return a pointer to a string containing the MAC address
+   */
+  char* getMACAddress();
+  
+  /** Get the IP address of your Ethernet interface
+   * \return a pointer to a string containing the IP address
+   */
+  char* getIPAddress();
+
+  /** Get the Gateway address of your Ethernet interface
+   * \return a pointer to a string containing the Gateway address
+   */
+  char* getGateway();
+ 
+  /** Get the Network mask of your Ethernet interface
+   * \return a pointer to a string containing the Network mask
+   */
+  char* getNetworkMask();
+#endif
+};
+
+#endif  /* _YD_WIFIINTERFACE_H_ */
\ No newline at end of file