cueOS  2.4
cueOS - Universal Show Control OS for ARM
osc_server.h
1
8#ifndef OSC_SERVER_H_
9#define OSC_SERVER_H_
10
11#include <stdint.h>
12#include <stdlib.h>
13#include "lwip/api.h"
14
15#define OSC_PACKET_URI_PATH_DELIMITOR '/'
16#define OSC_PACKET_MESSAGE_DELIMITOR ','
17#define OSC_PACKET_DATA_TYPE_INTEGER 'i'
18#define OSC_PACKET_DATA_TYPE_FLOAT 'f'
19#define OSC_PACKET_DATA_TYPE_STTRING 's'
20#define OSC_PACKET_NULL_CHAR '\0'
21#define OSC_PACKET_URI_FORMAT "/%d/%d/%d"
22
23#define OSC_PACKET_PAYLOAD_LEN 8
24#define OSC_PACKET_URI_BASEPATH_LEN 4
25
31typedef enum{
36
42typedef enum{
46
47
52typedef struct{
53 char *data;
54 char *sp;
56
57
63typedef struct{
64 struct udp_pcb *_pcb;
65 struct pbuf *_p_tx;
68
69
70void osc_server_init(void);
71void osc_packet_send(osc_media_type_e media_type, osc_control_type_e ctrl_type, uint16_t ctrl_id, uint32_t ctrl_val);
72
73
78#endif
void osc_packet_send(osc_media_type_e media_type, osc_control_type_e ctrl_type, uint16_t ctrl_id, uint32_t ctrl_val)
Prepares and send an OSC packet over UDP.
Definition: osc_server.c:115
void osc_server_init(void)
Initialises the OSC server instance.
Definition: osc_server.c:101
osc_control_type_e
List of OSC control types (As implemented by ASLS)
Definition: osc_server.h:42
osc_media_type_e
List of OSC-controllable media types (As implemented by ASLS)
Definition: osc_server.h:31
@ OSC_CTRLTYPE_CUE
Definition: osc_server.h:43
@ OSC_CTRLTYPE_VAL
Definition: osc_server.h:44
@ OSC_MEDIATYPE_MEDIASERVER
Definition: osc_server.h:34
@ OSC_MEDIATYPE_PYROTECHNICS
Definition: osc_server.h:33
@ OSC_MEDIATYPE_LIGHTING
Definition: osc_server.h:32
DEfines en OSC packet instance. TODO: this is not a RAM-efficient implementation.....
Definition: osc_server.h:52
char * sp
Definition: osc_server.h:54
char * data
Definition: osc_server.h:53
Defines an OSC server instance. Open Sound Control (OSC) is a protocol for networking sound synthesiz...
Definition: osc_server.h:63
struct pbuf * _p_tx
Definition: osc_server.h:65
struct udp_pcb * _pcb
Definition: osc_server.h:64
uint8_t is_initialised
Definition: osc_server.h:66