OSC meeseage 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

OSCmsgCodec.h

Committer:
xshige
Date:
2014-08-31
Revision:
0:1c9ac526d377

File content as of revision 0:1c9ac526d377:

// 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