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
Diff: mbedOSC.h
- Revision:
- 2:acfd0090c8e7
- Parent:
- 1:ab7dc9550de6
- Child:
- 3:2b56849146d8
--- a/mbedOSC.h Sun Apr 15 12:06:01 2012 +0000 +++ b/mbedOSC.h Sun Apr 15 12:14:45 2012 +0000 @@ -1,5 +1,5 @@ -/* mbedOSC.h - This is an OSC library for the mbed, created to be compatible with Recotana's OSCClass library (http://recotana.com) for the +/* mbed OSC Library + This is 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. I have also used parts of the OSC Transceiver(Sender/Receiver) code by xshige written by: Alvaro Cassinelli, 7.10.2011 tweaked by: Toby Harris / *spark audio-visual, 13.4.2012 @@ -54,9 +54,9 @@ #define TYPE_FLOAT 2 -/* -Container class for OSC messages (receiving or sending) -*/ +/** + * Container class for OSC messages (receiving or sending) + */ class OSCMessage{ private: @@ -83,21 +83,21 @@ /** Return the port */ const int& getPort(); -/* - Gets the address string of the OSC message - param [in] <-- _index is the index of the address string (byte) - return pointer of the address string (char *) - @note ex. "/ard/test"<br> - getAddress(0) = "/ard"<br> - getAddress(1) = "/test" - @attention It is maximum number of the addresses is 2<br> - In this case "/ard/test1/test2"<br> - ignore it after "/test2" +/** Gets the address string of the OSC message + * + * @param [in] <-- _index is the index of the address string (byte) + * return pointer of the address string (char *) + * @note ex. "/ard/test"<br> + * getAddress(0) = "/ard"<br> + * getAddress(1) = "/test" + * @attention It is maximum number of the addresses is 2<br> + * In this case "/ard/test1/test2"<br> + * ignore it after "/test2" */ char *getAddress(uint8_t _index); //retturn address -/* - Gets the TopAddress string of the OSC message (this is just the address with index 0) +/** 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 +109,7 @@ */ char *getTopAddress(); //return address[0] :"/ard" -/* +/** 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] @@ -117,7 +117,7 @@ */ char *getSubAddress(); //return address[1] :"/test" -/* +/** Gets the number of the OSC message address param[in] None return number of the OSC message address (byte) @@ -127,7 +127,7 @@ */ uint8_t getAddressNum(); //return 2 -/* +/** Gets the TypeTag string (with index) of the OSC message param[in] <--_index is the index of the TypeTag string (byte) return: TypeTag char (char) @@ -137,7 +137,7 @@ char getTypeTag(uint8_t _index); //_index=0 ->'i' //_index=1 ->'f' -/* +/** Gets the number of the OSC message args param[in] None return number of the args (byte) @@ -147,7 +147,7 @@ */ uint8_t getArgNum(); //return 2 -/* +/** 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) return: integer value (long, or int32_t) @@ -157,7 +157,7 @@ */ int32_t getArgInt(uint8_t _index); //_index=0 -> 123 -/* +/** Get the args of the OSC message with a float value param[in] <--_index is the index of the args return: float value (double) @@ -168,7 +168,7 @@ double getArgFloat(uint8_t _index); //_index=1 -> 54.21 -/* +/** 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 @@ -176,7 +176,7 @@ */ 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 @@ -185,7 +185,7 @@ */ void setSubAddress(char *_address); //set address[1] -/* +/** 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 @@ -195,7 +195,7 @@ 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) */ @@ -203,7 +203,7 @@ char *_address); //set 1,address[1] -/* +/** 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 *) Example: IP=192.168.0.99, then we have to do: ip[]={192,168,0,1}, then setIp(ip)