An Open Sound Control library for the mbed, created to be compatible with Recotana's OSCClass library (http://recotana.com) for the Arduino with Ethernet shield. It also uses parts of the OSC Transceiver(Sender/Receiver) code by xshige written by: Alvaro Cassinelli, October 2011 tweaked by: Toby Harris / *spark audio-visual, March 2012

Dependencies:   NetServices mbed

Revision:
8:06a5e78d6821
Parent:
7:090b23c0a504
Child:
9:b37b68fdd9a4
--- a/mbedOSC.h	Sun Apr 15 13:06:07 2012 +0000
+++ b/mbedOSC.h	Sun Apr 15 13:13:39 2012 +0000
@@ -83,7 +83,7 @@
     
 /** Gets the address string of the OSC message
  *
- * @param[in] _index is the index of the address string (byte)
+ * @param[in] _index The index of the address string (byte)
  * @return pointer of the address string (char *)
  * @note ex. "/ard/test"<br>
  * getAddress(0) = "/ard"<br>
@@ -95,13 +95,6 @@
         char        *getAddress(uint8_t _index);    //retturn address
         
 /** Gets the TopAddress string of the OSC message (this is just the address with index 0)
- 
-@param[in] None
- @return pointer of the TopAddress string (char *), i.e. address[0]
- Example: In the case "/ard/test", getTopAddress() = "/ard" (WITH the slash "/") 
- *//*
- Gets the TopAddress string of the OSC message (this is just the address with index 0)
-@param[in] None
  @return pointer of the TopAddress string (char *), i.e. address[0]
  Example: In the case "/ard/test", getTopAddress() = "/ard" (WITH the slash "/") 
  */        
@@ -109,7 +102,6 @@
 
 /**
  Gets the "SubAddress" string of the OSC message (this is just the address with index 1)
-@param[in] None
  @return pointer of the SubAddress string (char *), i.e. address[1]
  Example: in the case "/ard/test", getSubAddress() = "/test" (WITH the slash "/") 
  */
@@ -117,7 +109,6 @@
 
 /**
  Gets the number of the OSC message address
-@param[in] None
  @return number of the OSC message address (byte)
  Examples: "/ard"      --> the number of the addresses is 1
            "/ard/test" --> the number of the addresses is 2
@@ -127,7 +118,7 @@
     
 /**
  Gets the TypeTag string (with index) of the OSC message
-@param[in] _index is the index of the TypeTag string (byte)
+ @param[in] _index The index of the TypeTag string (byte)
  @return: TypeTag char (char)
  Example: in the case of a total typetag string equal to "if", getTypeTag(0) = 'i' and getTypeTag(1) = 'f'
  Attention: MAX_ARG is maximum number of the args, if the index argument is larger, it will be constrained to this max. 
@@ -137,7 +128,6 @@
 
 /**
  Gets the number of the OSC message args
-@param[in] None
  @return number of the args (byte)
  Example: "i" 123 --> number of the OSC message args is 1
           "if" 123 54.24 --> number of the OSC message args is 2
@@ -147,7 +137,7 @@
     
 /**
  Get the args of the OSC message with an integer value
-@param[in] _index is (an int, or uint8_t), corresponding to the index of the args (byte)
+ @param[in] _index An int or uint8_t corresponding to the index of the args (byte)
  @return: integer value (long, or int32_t)
  Example: in the case "if" 123 54.24, getArgInt(0) = 123
  Noe: "i" is integer, but the return type is "long"
@@ -157,7 +147,7 @@
 
 /**
  Get the args of the OSC message with a float value
-@param[in] _index is the index of the args
+ @param[in] _index The index of the args
  @return: float value (double)
  note: In this case "if" 123 54.24, getArgFloat(1) = 54.24
  attention: arg declared as float, but return value cast as "double"
@@ -168,16 +158,14 @@
     
 /**
  Set TopAddress string of OSC Message 
-@param[in] _address is a string pointer for the TopAddress String (char *). NOTE: is this a good idea? why not pass as const, and do allocation here?
- @return: None
+ @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]
 
 /**
  Set SubAddress string of the OSC Message
-@param[in] _address is a string pointer for the SubAddress String (char *)
- @return: None
+ @param[in] _address A string pointer for the SubAddress String (char *)
  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...
  */
@@ -185,8 +173,7 @@
 
 /**
  Set the complete Address string of the OSC Message (top and sub addresses)
-@param[in] _topAddress and _subAddress are the string pointers to top and sub addresses (char *)
- @return: None
+ @param[in] _topAddress, _subAddress The string pointers to top and sub addresses (char *)
  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 MAX_ADDRESS=2
  */
@@ -203,7 +190,7 @@
 
 /**
  Set IP Address of the OSC Message (for SENDING messages - for receiving this will be done when receiving something ) 
-@param[in] _ip pointer of IP Address array (byte *)
+ @param[in] _ip Pointer of IP Address array (byte *)
  Example: IP=192.168.0.99, then we have to do: ip[]={192,168,0,1}, then setIp(ip)
  */    
         void setIp( uint8_t *_ip );    //set ip
@@ -228,7 +215,6 @@
  Set TypeTag and args to the OSC Message container
  @param[in] types TypeTag string "i"(integer) or"f"(float) (char *)
  @param[in] ... Pointer of the Args(variable argument) ..
- @return None
  @Example: 
  (1) integer 123: (NOTE: integers are LONG)
  long v1=123; sendMes.setArgs("i",&v1)
@@ -273,7 +259,7 @@
     
 /**
  This sets "binds" the received message to the receiver container of the communication object
- @param[in]<--_mes is a pointer to the "receiveing" OSC message (OSCMessage *)
+ @param[in] _mes A pointer to the "receiveing" OSC message (OSCMessage *)
  */
     OSCClass(OSCMessage *_mes); // set the receiver message container
 
@@ -283,16 +269,13 @@
     void onUDPSocketEvent(UDPSocketEvent e);
         
 /**
- This initializes the OSC communication object with default receiving port (DEFAULT_REC_PORT)
-@param[in]: None
- @return: None
+ This initializes the OSC communication object with default receiving port (DEFAULT_REC_PORT) 
  */
     void begin();
 
 /**
  Initialize an OSC object with arbitrary listening port
-@param[in] _recievePort, is the listening ("receiving") Port No (unsigned int)
- @return: None
+ @param[in] _recievePort The listening ("receiving") Port No (unsigned int)
  */
     void begin(uint16_t _recievePort);
 
@@ -306,8 +289,7 @@
 
 /**
  Set a OSC receive message container
-@param[in] _mes Pointer to the OSC receive message container (OSCMessage *)
- @return None
+ @param[in] _mes Pointer to the OSC receive message container (OSCMessage *)
  */
     void setReceiveMessage( OSCMessage *_mes ); //set receive OSCmessage container (note: the message has a "host" object from which we get the upd packets)
 
@@ -323,8 +305,7 @@
     
 /**
  Send an OSC Message (message contain the host ip and port where the message data has to be sent)
-@param[in] _mes Pointer to the OSC message container (OSCMessage *)
- @return None
+ @param[in] _mes Pointer to the OSC message container (OSCMessage *)
  */
     void sendOsc( OSCMessage *_mes ); //set&send OSCmessage (note: it will be sent to the host defined in the message container)