libose
Loading...
Searching...
No Matches
Macros
ose_test_ctosc.h File Reference

provides a compile-time OSC implementation. More...

Go to the source code of this file.

Macros

#define A(n, a)
 Instantiate a message address.
 
#define T(n, s)
 Instantiate a message type string.
 
#define Di(i)
 Instantiate a 32-bit integer message item.
 
#define Df(ff)
 Instantiate a float message item.
 
#define Dl(ll)
 Instantiate a 64-bit integer message item.
 
#define Dd(dd)
 Instantiate a double message item.
 
#define Dt(sec, fsec)
 Instantiate a timetag message item.
 
#define Ds(n, s)
 Instantiate a string message item.
 
#define Db(n, b)
 Instantiate a blob message item.
 
#define BE_M(...)
 Instantiate a bundle element message.
 
#define BE_B(...)
 Instantiate a bundle element bundle with one or more bundle elements.
 
#define BE_B0()
 Instantiate an empty bundle element bundle.
 
#define M(...)
 Instantiate a top-level OSC message.
 
#define B(...)
 Instantiate a top-level OSC bundle.
 

Detailed Description

provides a compile-time OSC implementation.

Macro Definition Documentation

◆ A

#define A (   n,
  a 
)

Instantiate a message address.

Parameters
nthe length of the address in bytes, not including any NULL padding
athe address – a char array of n bytes

◆ B

#define B (   ...)

Instantiate a top-level OSC bundle.

Parameters
...one or more bundle elements
B(BE_M( // 1 bundle element -- a message
A(4, "/xyz"), // address -- 4 chars
T(3, "fff"), // 3 typtags -- all floats
Df(0.5), // float arg 1
Df(0.2), // float arg 2
Df(1.0)) // float arg 3
#define BE_M(...)
Instantiate a bundle element message.
Definition ose_test_ctosc.h:272
#define Df(ff)
Instantiate a float message item.
Definition ose_test_ctosc.h:144
#define T(n, s)
Instantiate a message type string.
Definition ose_test_ctosc.h:113
#define B(...)
Instantiate a top-level OSC bundle.
Definition ose_test_ctosc.h:339
#define A(n, a)
Instantiate a message address.
Definition ose_test_ctosc.h:102

◆ BE_B

#define BE_B (   ...)

Instantiate a bundle element bundle with one or more bundle elements.

Parameters
...one or more bundle elements

◆ BE_M

#define BE_M (   ...)

Instantiate a bundle element message.

Parameters
...the message items. See BE_M().

◆ Db

#define Db (   n,
  b 
)

Instantiate a blob message item.

Parameters
nthe number of bytes in the blob, not including any NULL padding or the blob size
bthe blob – a char array of n bytes

◆ Dd

#define Dd (   dd)

Instantiate a double message item.

Parameters
ddthe floating-point value

◆ Df

#define Df (   ff)

Instantiate a float message item.

Parameters
ffthe floating-point value

◆ Di

#define Di (   i)

Instantiate a 32-bit integer message item.

Parameters
ithe integer value

◆ Dl

#define Dl (   ll)

Instantiate a 64-bit integer message item.

Covers h and H, which libose stores as eight bytes, most significant first, the same as i but twice as wide.

Parameters
llthe value

◆ Ds

#define Ds (   n,
  s 
)

Instantiate a string message item.

Parameters
nthe number of bytes in the string, not including any NULL padding
sthe string – a char array of n bytes

◆ Dt

#define Dt (   sec,
  fsec 
)

Instantiate a timetag message item.

Two 32-bit halves, seconds then fraction, each most significant byte first – not one 64-bit quantity, which is why this is not Dl().

Parameters
secseconds
fsecfractional seconds

◆ M

#define M (   ...)

Instantiate a top-level OSC message.

Parameters
...the message items: A(), T(), followed by any mixture of Di(), Df(), Ds(), and Db() that corresponds to the contents of the types given in T()
M(A(4, "/xyz"), // address -- 4 chars
T(3, "fff"), // 3 typtags -- all floats
Df(0.5), // float arg 1
Df(0.2), // float arg 2
Df(1.0)) // float arg 3
#define M(...)
Instantiate a top-level OSC message.
Definition ose_test_ctosc.h:321

◆ T

#define T (   n,
  s 
)

Instantiate a message type string.

Parameters
nthe length of the typetag string in bytes, not including any NULL padding
sthe typetag string – a char array of n bytes