liblo
0.29
lo
lo_osc_types.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2014 Steve Harris et al. (see AUTHORS)
3
*
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public License
6
* as published by the Free Software Foundation; either version 2.1
7
* of the License, or (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU Lesser General Public License for more details.
13
*
14
* $Id$
15
*/
16
17
#ifndef LO_OSC_TYPES_H
18
#define LO_OSC_TYPES_H
19
25
#ifdef _MSC_VER
26
#ifndef UINTSDEFINED
27
#define UINTSDEFINED
28
#define int32_t __int32
29
#define int64_t __int64
30
#define uint32_t unsigned __int32
31
#define uint64_t unsigned __int64
32
#define uint8_t unsigned __int8
33
#endif
34
#else
35
#include <stdint.h>
36
#endif
37
46
typedef
struct
{
48
uint32_t
sec
;
51
uint32_t
frac
;
52
}
lo_timetag
;
53
59
typedef
enum
{
61
LO_ELEMENT_MESSAGE
= 1,
63
LO_ELEMENT_BUNDLE
= 2
64
}
lo_element_type
;
65
72
typedef
enum
{
73
/* basic OSC types */
75
LO_INT32
=
'i'
,
77
LO_FLOAT
=
'f'
,
79
LO_STRING
=
's'
,
81
LO_BLOB
=
'b'
,
82
83
/* extended OSC types */
85
LO_INT64
=
'h'
,
87
LO_TIMETAG
=
't'
,
89
LO_DOUBLE
=
'd'
,
92
LO_SYMBOL
=
'S'
,
94
LO_CHAR
=
'c'
,
96
LO_MIDI
=
'm'
,
98
LO_TRUE
=
'T'
,
100
LO_FALSE
=
'F'
,
102
LO_NIL
=
'N'
,
104
LO_INFINITUM
=
'I'
105
}
lo_type
;
106
107
115
typedef
union
{
117
int32_t
i
;
119
int32_t
i32
;
121
int64_t
h
;
123
int64_t
i64
;
125
float
f
;
127
float
f32
;
129
double
d
;
131
double
f64
;
133
char
s
;
136
char
S
;
138
unsigned
char
c
;
140
uint8_t m[4];
142
lo_timetag
t
;
144
struct
{
145
int32_t size;
146
char
data;
147
} blob;
148
}
lo_arg
;
149
150
/* Note: No struct literals in MSVC */
151
#ifdef _MSC_VER
152
#ifndef USE_ANSI_C
153
#define USE_ANSI_C
154
#endif
155
#endif
156
158
#if defined(USE_ANSI_C) || defined(DLL_EXPORT)
159
lo_timetag
lo_get_tt_immediate();
160
#define LO_TT_IMMEDIATE lo_get_tt_immediate()
161
#else // !USE_ANSI_C
162
#define LO_TT_IMMEDIATE ((lo_timetag){0U,1U})
163
#endif // USE_ANSI_C
164
167
#endif
lo_arg::i32
int32_t i32
Definition:
lo_osc_types.h:119
lo_arg::i64
int64_t i64
Definition:
lo_osc_types.h:123
lo_timetag::sec
uint32_t sec
Definition:
lo_osc_types.h:48
LO_ELEMENT_BUNDLE
@ LO_ELEMENT_BUNDLE
Definition:
lo_osc_types.h:63
lo_arg::h
int64_t h
Definition:
lo_osc_types.h:121
lo_arg::t
lo_timetag t
Definition:
lo_osc_types.h:142
lo_arg::f32
float f32
Definition:
lo_osc_types.h:127
LO_NIL
@ LO_NIL
Definition:
lo_osc_types.h:102
lo_timetag
A structure to store OSC TimeTag values.
Definition:
lo_osc_types.h:46
LO_ELEMENT_MESSAGE
@ LO_ELEMENT_MESSAGE
Definition:
lo_osc_types.h:61
lo_arg::c
unsigned char c
Definition:
lo_osc_types.h:138
LO_CHAR
@ LO_CHAR
Definition:
lo_osc_types.h:94
lo_arg::i
int32_t i
Definition:
lo_osc_types.h:117
LO_TRUE
@ LO_TRUE
Definition:
lo_osc_types.h:98
LO_SYMBOL
@ LO_SYMBOL
Definition:
lo_osc_types.h:92
LO_INT64
@ LO_INT64
Definition:
lo_osc_types.h:85
lo_arg::f64
double f64
Definition:
lo_osc_types.h:131
LO_TIMETAG
@ LO_TIMETAG
Definition:
lo_osc_types.h:87
lo_arg::S
char S
Definition:
lo_osc_types.h:136
LO_FALSE
@ LO_FALSE
Definition:
lo_osc_types.h:100
LO_BLOB
@ LO_BLOB
Definition:
lo_osc_types.h:81
lo_arg::d
double d
Definition:
lo_osc_types.h:129
LO_DOUBLE
@ LO_DOUBLE
Definition:
lo_osc_types.h:89
LO_FLOAT
@ LO_FLOAT
Definition:
lo_osc_types.h:77
LO_INFINITUM
@ LO_INFINITUM
Definition:
lo_osc_types.h:104
lo_arg
Union used to read values from incoming messages.
Definition:
lo_osc_types.h:115
lo_type
lo_type
An enumeration of the OSC types liblo can send and receive.
Definition:
lo_osc_types.h:72
LO_STRING
@ LO_STRING
Definition:
lo_osc_types.h:79
lo_element_type
lo_element_type
An enumeration of bundle element types liblo can handle.
Definition:
lo_osc_types.h:59
LO_INT32
@ LO_INT32
Definition:
lo_osc_types.h:75
lo_arg::s
char s
Definition:
lo_osc_types.h:133
lo_arg::f
float f
Definition:
lo_osc_types.h:125
LO_MIDI
@ LO_MIDI
Definition:
lo_osc_types.h:96
lo_timetag::frac
uint32_t frac
Definition:
lo_osc_types.h:51
Generated by
1.8.17