Pehr Hovey / Mbed 2 deprecated mbed_osc

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mbed_osc.h Source File

mbed_osc.h

00001 /*
00002  * mbed_osc.h
00003  *
00004  *  Created on: Mar 8, 2010
00005  *      Author: pehr
00006  *     The functions to control the mBed using OSC
00007  *     This includes setting up the UDP and  OSC subsystem
00008  *     And registering handlers to control mBed I/O
00009  */
00010 /*********************************************************************************
00011 
00012  Copyright 2006-2009 MakingThings
00013 
00014  Licensed under the Apache License,
00015  Version 2.0 (the "License"); you may not use this file except in compliance
00016  with the License. You may obtain a copy of the License at
00017 
00018  http://www.apache.org/licenses/LICENSE-2.0
00019 
00020  Unless required by applicable law or agreed to in writing, software distributed
00021  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
00022  CONDITIONS OF ANY KIND, either express or implied. See the License for
00023  the specific language governing permissions and limitations under the License.
00024 
00025 *********************************************************************************/
00026 #ifndef MBED_OSC_H_
00027 #define MBED_OSC_H_
00028 
00029 #define UDP_RECV_PORT 4444
00030 #define UDP_BROADCAST_PORT 5555
00031 
00032 #include "mbed.h"
00033 #include "osc_sys.h"
00034 
00035 #include "lwip/udp.h"
00036 
00037 #include "NetServer.h"
00038 
00039 #include "ipv4/lwip/ip_addr.h"
00040 
00041 
00042 NetServer * getNetServer(); //get the netserver to do things like get hostname
00043 char * getScratch();
00044 struct udp_pcb * getUdpPcb();
00045 
00046 
00047 void osc_sendIPBroadcast();
00048 int osc_init();
00049 void osc_poll();
00050 
00051 void udp_recv_callback(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port);
00052 
00053 
00054 
00055 
00056 
00057 #endif /* MBED_OSC_H_ */