liblo
0.27
|
Data Structures | |
struct | lo_timetag |
A structure to store OSC TimeTag values. More... | |
union | lo_arg |
Union used to read values from incoming messages. More... | |
Macros | |
#define | LO_TT_IMMEDIATE ((lo_timetag){0U,1U}) |
A timetag constant representing "now". More... | |
Enumerations | |
enum | lo_element_type { LO_ELEMENT_MESSAGE = 1, LO_ELEMENT_BUNDLE = 2 } |
An enumeration of bundle element types liblo can handle. More... | |
enum | lo_type { LO_INT32 = 'i', LO_FLOAT = 'f', LO_STRING = 's', LO_BLOB = 'b', LO_INT64 = 'h', LO_TIMETAG = 't', LO_DOUBLE = 'd', LO_SYMBOL = 'S', LO_CHAR = 'c', LO_MIDI = 'm', LO_TRUE = 'T', LO_FALSE = 'F', LO_NIL = 'N', LO_INFINITUM = 'I' } |
An enumeration of the OSC types liblo can send and receive. More... | |
Functions | |
lo_address | lo_address_new (const char *host, const char *port) |
Declare an OSC destination, given IP address and port number. Same as lo_address_new_with_proto(), but using UDP. More... | |
lo_address | lo_address_new_with_proto (int proto, const char *host, const char *port) |
Declare an OSC destination, given IP address and port number, specifying protocol. More... | |
lo_address | lo_address_new_from_url (const char *url) |
Create a lo_address object from an OSC URL. More... | |
void | lo_address_free (lo_address t) |
Free the memory used by the lo_address object. More... | |
void | lo_address_set_ttl (lo_address t, int ttl) |
Set the Time-to-Live value for a given target address. More... | |
int | lo_address_get_ttl (lo_address t) |
Get the Time-to-Live value for a given target address. More... | |
int | lo_send (lo_address targ, const char *path, const char *type,...) |
Send a OSC formatted message to the address specified. More... | |
int | lo_send_from (lo_address targ, lo_server from, lo_timetag ts, const char *path, const char *type,...) |
Send a OSC formatted message to the address specified, from the same socket as the specificied server. More... | |
int | lo_send_timestamped (lo_address targ, lo_timetag ts, const char *path, const char *type,...) |
Send a OSC formatted message to the address specified, scheduled to be dispatch at some time in the future. More... | |
int | lo_address_errno (lo_address a) |
Return the error number from the last failed lo_send() or lo_address_new() call. More... | |
const char * | lo_address_errstr (lo_address a) |
Return the error string from the last failed lo_send() or lo_address_new() call. More... | |
lo_blob | lo_blob_new (int32_t size, const void *data) |
Create a new OSC blob type. More... | |
void | lo_blob_free (lo_blob b) |
Free the memory taken by a blob. More... | |
uint32_t | lo_blob_datasize (lo_blob b) |
Return the amount of valid data in a lo_blob object. More... | |
void * | lo_blob_dataptr (lo_blob b) |
Return a pointer to the start of the blob data to allow contents to be changed. More... | |
Defines the high-level API functions necessary to implement OSC support. Should be adequate for most applications, but if you require lower level control you can use the functions defined in lo_lowlevel.h
#define LO_TT_IMMEDIATE ((lo_timetag){0U,1U}) |
A timetag constant representing "now".
enum lo_element_type |
enum lo_type |
An enumeration of the OSC types liblo can send and receive.
The value of the enumeration is the typechar used to tag messages and to specify arguments with lo_send().
Enumerator | |
---|---|
LO_INT32 |
32 bit signed integer. |
LO_FLOAT |
32 bit IEEE-754 float. |
LO_STRING |
Standard C, NULL terminated string. |
LO_BLOB |
OSC binary blob type. Accessed using the lo_blob_*() functions. |
LO_INT64 |
64 bit signed integer. |
LO_TIMETAG |
OSC TimeTag type, represented by the lo_timetag structure. |
LO_DOUBLE |
64 bit IEEE-754 double. |
LO_SYMBOL |
Standard C, NULL terminated, string. Used in systems which distinguish strings and symbols. |
LO_CHAR |
Standard C, 8 bit, char variable. |
LO_MIDI |
A 4 byte MIDI packet. |
LO_TRUE |
Sybol representing the value True. |
LO_FALSE |
Sybol representing the value False. |
LO_NIL |
Sybol representing the value Nil. |
LO_INFINITUM |
Sybol representing the value Infinitum. |
int lo_address_errno | ( | lo_address | a | ) |
Return the error number from the last failed lo_send() or lo_address_new() call.
const char* lo_address_errstr | ( | lo_address | a | ) |
Return the error string from the last failed lo_send() or lo_address_new() call.
void lo_address_free | ( | lo_address | t | ) |
Free the memory used by the lo_address object.
int lo_address_get_ttl | ( | lo_address | t | ) |
Get the Time-to-Live value for a given target address.
t | An OSC address. |
lo_address lo_address_new | ( | const char * | host, |
const char * | port | ||
) |
Declare an OSC destination, given IP address and port number. Same as lo_address_new_with_proto(), but using UDP.
host | An IP address or number, or NULL for the local machine. |
port | a decimal port number or service name. |
The lo_address object may be used as the target of OSC messages.
Note: if you wish to receive replies from the target of this address, you must first create a lo_server_thread or lo_server object which will receive the replies. The last lo_server(_thread) object creted will be the receiver.
lo_address lo_address_new_from_url | ( | const char * | url | ) |
Create a lo_address object from an OSC URL.
example: "osc.udp://localhost:4444/my/path/"
lo_address lo_address_new_with_proto | ( | int | proto, |
const char * | host, | ||
const char * | port | ||
) |
Declare an OSC destination, given IP address and port number, specifying protocol.
proto | The protocol to use, must be one of LO_UDP, LO_TCP or LO_UNIX. |
host | An IP address or number, or NULL for the local machine. |
port | a decimal port number or service name. |
The lo_address object may be used as the target of OSC messages.
Note: if you wish to receive replies from the target of this address, you must first create a lo_server_thread or lo_server object which will receive the replies. The last lo_server(_thread) object creted will be the receiver.
void lo_address_set_ttl | ( | lo_address | t, |
int | ttl | ||
) |
Set the Time-to-Live value for a given target address.
This is required for sending multicast UDP messages. A value of 1 (the usual case) keeps the message within the subnet, while 255 means a global, unrestricted scope.
t | An OSC address. |
ttl | An integer specifying the scope of a multicast UDP message. |
void* lo_blob_dataptr | ( | lo_blob | b | ) |
Return a pointer to the start of the blob data to allow contents to be changed.
uint32_t lo_blob_datasize | ( | lo_blob | b | ) |
Return the amount of valid data in a lo_blob object.
If you want to know the storage size, use lo_arg_size().
void lo_blob_free | ( | lo_blob | b | ) |
Free the memory taken by a blob.
lo_blob lo_blob_new | ( | int32_t | size, |
const void * | data | ||
) |
Create a new OSC blob type.
size | The amount of space to allocate in the blob structure. |
data | The data that will be used to initialise the blob, should be size bytes long. |
int lo_send | ( | lo_address | targ, |
const char * | path, | ||
const char * | type, | ||
... | |||
) |
Send a OSC formatted message to the address specified.
targ | The target OSC address |
path | The OSC path the message will be delivered to |
type | The types of the data items in the message, types are defined in lo_osc_types.h |
... | The data values to be transmitted. The types of the arguments passed here must agree with the types specified in the type parameter. |
example:
int lo_send_from | ( | lo_address | targ, |
lo_server | from, | ||
lo_timetag | ts, | ||
const char * | path, | ||
const char * | type, | ||
... | |||
) |
Send a OSC formatted message to the address specified, from the same socket as the specificied server.
targ | The target OSC address |
from | The server to send message from (can be NULL to use new socket) |
ts | The OSC timetag timestamp at which the message will be processed (can be LO_TT_IMMEDIATE if you don't want to attach a timetag) |
path | The OSC path the message will be delivered to |
type | The types of the data items in the message, types are defined in lo_osc_types.h |
... | The data values to be transmitted. The types of the arguments passed here must agree with the types specified in the type parameter. |
example:
int lo_send_timestamped | ( | lo_address | targ, |
lo_timetag | ts, | ||
const char * | path, | ||
const char * | type, | ||
... | |||
) |
Send a OSC formatted message to the address specified, scheduled to be dispatch at some time in the future.
targ | The target OSC address |
ts | The OSC timetag timestamp at which the message will be processed |
path | The OSC path the message will be delivered to |
type | The types of the data items in the message, types are defined in lo_osc_types.h |
... | The data values to be transmitted. The types of the arguments passed here must agree with the types specified in the type parameter. |
example: