#include <stdarg.h>
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
|
size_t | rtosc_message (char *buffer, size_t len, const char *address, const char *arguments,...) |
|
size_t | rtosc_vmessage (char *buffer, size_t len, const char *address, const char *arguments, va_list va) |
|
size_t | rtosc_amessage (char *buffer, size_t len, const char *address, const char *arguments, const rtosc_arg_t *args) |
|
unsigned | rtosc_narguments (const char *msg) |
|
char | rtosc_type (const char *msg, unsigned i) |
|
rtosc_arg_t | rtosc_argument (const char *msg, unsigned i) |
|
size_t | rtosc_message_length (const char *msg, size_t len) |
|
size_t | rtosc_message_ring_length (ring_t *ring) |
|
const char * | rtosc_argument_string (const char *msg) |
|
size_t | rtosc_bundle (char *buffer, size_t len, uint64_t tt, int elms,...) |
|
size_t | rtosc_bundle_elements (const char *msg, size_t len) |
|
const char * | rtosc_bundle_fetch (const char *msg, unsigned i) |
|
int | rtosc_bundle_p (const char *msg) |
|
uint64_t | rtosc_bundle_timetag (const char *msg) |
|
size_t rtosc_amessage |
( |
char * |
buffer, |
|
|
size_t |
len, |
|
|
const char * |
address, |
|
|
const char * |
arguments, |
|
|
const rtosc_arg_t * |
args |
|
) |
| |
rtosc_arg_t rtosc_argument |
( |
const char * |
msg, |
|
|
unsigned |
i |
|
) |
| |
Gets an argument of a well formed message, with writable blob data member
- Parameters
-
msg | a well formed OSC message |
i | index of argument |
- Returns
- an argument by value via the rtosc_arg_t union
const char* rtosc_argument_string |
( |
const char * |
msg | ) |
|
Gets the argument string of a well formed message.
- Parameters
-
msg | a well formed OSC message |
- Returns
- the argument string of a given message
size_t rtosc_bundle |
( |
char * |
buffer, |
|
|
size_t |
len, |
|
|
uint64_t |
tt, |
|
|
int |
elms, |
|
|
|
... |
|
) |
| |
Generate a bundle from sub-messages
char a[128], b[128], c[128];
- Parameters
-
buffer | Destination buffer |
len | Length of buffer |
tt | OSC time tag |
elms | Number of sub messages |
... | Messages |
- Returns
- legnth of generated bundle or zero on failure
size_t rtosc_bundle_elements |
( |
const char * |
msg, |
|
|
size_t |
len |
|
) |
| |
Find the elements in a bundle
- Parameters
-
msg | OSC bundle |
len | Upper bound on the length of the bundle |
- Returns
- The number of messages contained within the bundle
const char* rtosc_bundle_fetch |
( |
const char * |
msg, |
|
|
unsigned |
i |
|
) |
| |
Fetch a message within the bundle
- Parameters
-
msg | OSC bundle |
i | index of sub message |
- Returns
- The ith message within the bundle
int rtosc_bundle_p |
( |
const char * |
msg | ) |
|
Test if the buffer contains a bundle
- Parameters
-
- Returns
- true if message is a bundle
uint64_t rtosc_bundle_timetag |
( |
const char * |
msg | ) |
|
- Parameters
-
msg | A well formed OSC bundle |
- Returns
- Time Tag for a bundle
size_t rtosc_message |
( |
char * |
buffer, |
|
|
size_t |
len, |
|
|
const char * |
address, |
|
|
const char * |
arguments, |
|
|
|
... |
|
) |
| |
Write OSC message to fixed length buffer
On error, buffer will be zeroed. When buffer is NULL, the function returns the size of the buffer required to store the message
char buffer[128];
const char blob[4] = {'a','b','c','d'};
- Parameters
-
buffer | Memory to write to |
len | Length of buffer |
address | OSC pattern to send message to |
arguments | String consisting of the types of the following arguments |
... | OSC arguments to pass forward |
- Returns
- length of resulting message or zero if bounds exceeded
size_t rtosc_message_length |
( |
const char * |
msg, |
|
|
size_t |
len |
|
) |
| |
- Parameters
-
msg | OSC message or null padded blob |
len | Message length upper bound |
- Returns
- the size of a message given a chunk of memory.
size_t rtosc_message_ring_length |
( |
ring_t * |
ring | ) |
|
Finds the length of the next message inside a ringbuffer structure.
- Deprecated:
- If the ring contains a bundle, it is not possible to identify its length while conforming to the seriaization strictly specified in the OSC 1.0 spec
- Parameters
-
ring | The addresses and lengths of the split buffer, in a compatible format to jack's ringbuffer |
- Returns
- size of message stored in ring datastructure
unsigned rtosc_narguments |
( |
const char * |
msg | ) |
|
Returns the number of arguments found in a given message.
- Parameters
-
msg | well formed OSC message |
- Returns
- number of arguments in message
char rtosc_type |
( |
const char * |
msg, |
|
|
unsigned |
i |
|
) |
| |
- Parameters
-
msg | well formed OSC message |
i | index of argument |
- Returns
- the type of the ith argument in msg
size_t rtosc_vmessage |
( |
char * |
buffer, |
|
|
size_t |
len, |
|
|
const char * |
address, |
|
|
const char * |
arguments, |
|
|
va_list |
va |
|
) |
| |