Shigeki KOMATSU / Mbed 2 deprecated Sparkfun_CC3000_WiFi_OSCreceiver

Dependencies:   cc3000_hostdriver_mbedsocket mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers OSCmsgCodec.h Source File

OSCmsgCodec.h

00001 // OSC message Codec Header
00002 // 2013/10/28
00003 #ifndef _OSCMSGCODEC_H
00004 #define _OSCMSGCODEC_H
00005 
00006 #include <string.h>
00007 
00008 int encOSCmsg(char *packet , union OSCarg *msg);
00009 // makes packet from OSC message and returns packet size
00010 
00011 void decOSCmsg(char *packet , union OSCarg *msg); 
00012 // makes OSC message from packet
00013 
00014 union OSCarg {
00015   // char*, int and float are assumed four bytes
00016   char *address;
00017   char *typeTag;
00018   long int i; // int32 for Arduino(16bits)
00019   float f;
00020   char *s;
00021   struct {
00022     long int len; // is "int i"
00023     char *p;
00024   } 
00025   blob;
00026   char m[4];  // for MIDI
00027   char _b[4]; // endian conversion temp variable
00028 };
00029 
00030 #endif // _OSCMSGCODEC_H