![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
OSC meeseage tranceiver(Sender/Receiver) for Sparkfun CC3000 WiFi Shield. Supports the following boards: FRDM-KL25Z,ST Nucleo F401RE,ST Nucleo F030R8,LPCXpresso1549,Seeduino-Arch-Pro.
Dependencies: cc3000_hostdriver_mbedsocket mbed
Diff: OSCmsgCodec.h
- Revision:
- 0:eadd1c588343
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OSCmsgCodec.h Sun Aug 31 15:10:45 2014 +0000 @@ -0,0 +1,30 @@ +// OSC message Codec Header +// 2013/10/28 +#ifndef _OSCMSGCODEC_H +#define _OSCMSGCODEC_H + +#include <string.h> + +int encOSCmsg(char *packet , union OSCarg *msg); +// makes packet from OSC message and returns packet size + +void decOSCmsg(char *packet , union OSCarg *msg); +// makes OSC message from packet + +union OSCarg { + // char*, int and float are assumed four bytes + char *address; + char *typeTag; + long int i; // int32 for Arduino(16bits) + float f; + char *s; + struct { + long int len; // is "int i" + char *p; + } + blob; + char m[4]; // for MIDI + char _b[4]; // endian conversion temp variable +}; + +#endif // _OSCMSGCODEC_H