support OSC-string

Dependents:   OSCtoCVConverter

Fork of OSC by Toby Harris

Revision:
7:498455cded21
Parent:
6:a47004fb44f5
Child:
8:73bce95a6853
--- a/mbedOSC.h	Thu Feb 18 13:25:30 2016 +0000
+++ b/mbedOSC.h	Thu Feb 25 11:21:27 2016 +0000
@@ -59,14 +59,13 @@
         uint8_t     addressNum; // current number of addresses in the message (ex: "/ard/test" --> the number of the addresses is 2)
     
         char        typeTag[MAX_ARG];
-        void        *arg[MAX_ARG];
         
         typedef union
         {
-            char * s;
-            int    i;
-            float  f;
-            double d;
+            char *  s;
+            int     i;
+            float   f;
+            double  d;
            
         } OSCArg;
         
@@ -200,7 +199,7 @@
  @param[in] address A string pointer for the TopAddress String (char *). NOTE: is this a good idea? why not pass as const, and do allocation here?
  Example: if the complete address string is "/ard/test", we set the topaddress as follows: char top[]="/ard" (allocation done here!), then setTopAddress(top)
  */
-        void setTopAddress(char *address);        //set address[0]
+        void setTopAddress(char * topAddress);        //set address[0]
  
 /**
  Set SubAddress string of the OSC Message
@@ -208,7 +207,7 @@
  Example:  if the complete address string is "/ard/test", we set the subaddress as follows: char sub[]="/test" (allocation done here!), then setSubAddress(sub)
  Attention: we should call first setTopAddress, and then setSubAddress. The order is important. This does not seems like a good idea...
  */
-        void setSubAddress(char *address);        //set address[1]
+        void setSubAddress(char * subAddress);        //set address[1]
  
 /**
  Set the complete Address string of the OSC Message (top and sub addresses)
@@ -216,15 +215,15 @@
  Example: in the case "/ard/test", we need to do: char top[]="/ard", char sub[]="/test", and then setAddress(top,sub)
  Reminder: in this implementation, the maximum number of addresses is MAXaddress=2
  */
-        void setAddress(char *topAddress,     
-                        char *subAddress);
+        void setAddress(char * topAddress,     
+                        char * subAddress);
  
 /**
  Set address string using index (here 0 or 1)
  Example: "/ard/test", char adr[]="/ard", setAddress(0,adr), char adr2[]="/test", setAddress(1,adr)
  */
         void setAddress(uint8_t index,        //set 0,address[0]
-                        char *address);       //set 1,address[1]
+                        char * oscAddress);       //set 1,address[1]
     
 /**
  Set TypeTag and args to the OSC Message container
@@ -238,7 +237,7 @@
  Attention: in this implementation, the maximum number of the args is 2
  (if setArgs("iff", v1, v2, v3), data is ignored after v3)
  */
-       void setArgs(char *types , ...);    //set ("if", v1, v2)
+       void setArgs(char * types, ...);    //set ("if", v1, v2)
         
 
         friend class OSCClass;
@@ -257,6 +256,7 @@
 private:
     
     UDPSocket udpRec, udpSend;
+    Host auxhost;
     char   rcvBuff[MAX_RECEIVEBUFF_SIZE]; // raw buffer for UDP packets (udpRec.recvfrom( buf, 256, &host ) ))
     int   buflength;