SNIC UART Interface library for Murata Type-YD module

Dependents:   WebSocketServerTest

Fork of SNICInterface_mod by Toyomasa Watarai

Revision:
12:0254eaccfda2
Parent:
8:50d2509479cd
Child:
14:54378c96d285
diff -r c49007d49e52 -r 0254eaccfda2 Socket/Socket.h
--- a/Socket/Socket.h	Wed Mar 19 01:48:37 2014 +0000
+++ b/Socket/Socket.h	Tue Mar 25 01:42:25 2014 +0000
@@ -18,13 +18,16 @@
 #ifndef SOCKET_H_
 #define SOCKET_H_
 
-#include "SNICwifi.h"
+#include "SNIC_Core.h"
+#include "SNIC_UartMsgUtil.h"
 
 typedef unsigned long socklen_t;
 
 namespace murata_wifi
 {
 
+#define SNIC_UART_RECVBUF_SIZE  2048
+
 /** Socket file descriptor and select wrapper
   */
 class Socket {
@@ -34,21 +37,21 @@
     Socket();
     
     /** Set socket options
-    \param level     stack level (see: lwip/sockets.h)
-    \param optname   option ID
-    \param optval    option value
-    \param socklen_t length of the option value
-    \return 0 on success, -1 on failure
+        @param level     stack level (see: lwip/sockets.h)
+        @param optname   option ID
+        @param optval    option value
+        @param socklen_t length of the option value
+        @return 0 on success, -1 on failure
     */
     int set_option(int level, int optname, const void *optval, socklen_t optlen);
     
     /** Get socket options
-        \param level     stack level (see: lwip/sockets.h)
-        \param optname   option ID
+        @param level     stack level (see: lwip/sockets.h)
+        @param optname   option ID
         \param optval    buffer pointer where to write the option value
         \param socklen_t length of the option value
         \return 0 on success, -1 on failure
-        */
+     */
     int get_option(int level, int optname, void *optval, socklen_t *optlen);
     
     /** Close the socket
@@ -58,7 +61,12 @@
     
     ~Socket();
     
+    int createSocket( unsigned char bind = 0, unsigned int local_addr = 0, unsigned short port = 0 );
+
 protected:
+    int         mSocketID;
+    C_SNIC_Core *mSnicWifi_p;
+
 #if 0
     bool _blocking;
     int _timeout;
@@ -70,6 +78,7 @@
 #endif
     
 private:
+
 //    int select(struct timeval *timeout, bool read, bool write);
 };
 }