Real Time Open Sound Control librtosc
Loading...
Searching...
No Matches
Functions
ports-runtime.h File Reference

Functions to retrieve runtime values from ports. More...

#include <cstddef>
#include <rtosc/rtosc.h>

Go to the source code of this file.

Functions

const char * rtosc::helpers::get_value_from_runtime (void *runtime, const struct Ports &ports, size_t loc_size, char *loc, char *buffer_with_port, std::size_t buffersize, int cols_used)
 Returns a port's value pretty-printed from a runtime object.
 
size_t rtosc::helpers::get_value_from_runtime (void *runtime, const struct Port &port, size_t loc_size, char *loc, const char *portname_from_base, char *buffer_with_port, std::size_t buffersize, std::size_t max_args, rtosc_arg_val_t *arg_vals)
 Returns a port's current value(s)
 

Detailed Description

Functions to retrieve runtime values from ports.

Function Documentation

◆ get_value_from_runtime() [1/2]

size_t rtosc::helpers::get_value_from_runtime ( void * runtime,
const struct Port & port,
size_t loc_size,
char * loc,
const char * portname_from_base,
char * buffer_with_port,
std::size_t buffersize,
std::size_t max_args,
rtosc_arg_val_t * arg_vals )

Returns a port's current value(s)

This function returns the value(s) of a known port object and stores them as rtosc_arg_val_t.

Parameters
runtimeThe runtime object
portthe port where loc is relative to
locA buffer where dispatch can write down the currently dispatched path
loc_sizeSize of loc
portname_from_baseThe name of the port, relative to its base
buffer_with_portA buffer which already contains the port. This buffer will be modified and must at least have space for 8 more bytes.
buffersizeSize of buffer_with_port
max_argsMaximum capacity of arg_vals
arg_valsArgument buffer for returned argument values
Returns
The number of argument values stored in arg_vals

◆ get_value_from_runtime() [2/2]

const char * rtosc::helpers::get_value_from_runtime ( void * runtime,
const struct Ports & ports,
size_t loc_size,
char * loc,
char * buffer_with_port,
std::size_t buffersize,
int cols_used )

Returns a port's value pretty-printed from a runtime object.

The port object must not be known.

For the parameters, see the overloaded function

Returns
The argument values, pretty-printed