brlapi_parameterManagement(3) | Library Functions Manual | brlapi_parameterManagement(3) |
brlapi_parameterManagement - Parameter management
- How to manage BrlAPI parameters.
#define BRLAPI_PARAMF_LOCAL 0X00
#define BRLAPI_PARAMF_GLOBAL 0X01
#define BRLAPI_PARAMF_SELF 0X02
typedef uint32_t brlapi_param_flags_t
typedef void(* brlapi_paramCallback_t) (brlapi_param_t
parameter, brlapi_param_subparam_t subparam,
brlapi_param_flags_t flags, void *priv, const void *data, size_t len)
typedef void * brlapi_paramCallbackDescriptor_t
ssize_t BRLAPI_STDCALL brlapi_getParameter
(brlapi_param_t parameter, brlapi_param_subparam_t subparam,
brlapi_param_flags_t flags, void *data, size_t len)
ssize_t BRLAPI_STDCALL brlapi__getParameter
(brlapi_handle_t *handle, brlapi_param_t parameter,
brlapi_param_subparam_t subparam, brlapi_param_flags_t flags,
void *data, size_t len)
void *BRLAPI_STDCALL brlapi_getParameterAlloc
(brlapi_param_t parameter, brlapi_param_subparam_t subparam,
brlapi_param_flags_t flags, size_t *len)
void *BRLAPI_STDCALL brlapi__getParameterAlloc
(brlapi_handle_t *handle, brlapi_param_t parameter,
brlapi_param_subparam_t subparam, brlapi_param_flags_t flags,
size_t *len)
int BRLAPI_STDCALL brlapi_setParameter (brlapi_param_t
parameter, brlapi_param_subparam_t subparam,
brlapi_param_flags_t flags, const void *data, size_t len)
int BRLAPI_STDCALL brlapi__setParameter (brlapi_handle_t
*handle, brlapi_param_t parameter, brlapi_param_subparam_t
subparam, brlapi_param_flags_t flags, const void *data, size_t len)
brlapi_paramCallbackDescriptor_t BRLAPI_STDCALL
brlapi_watchParameter (brlapi_param_t parameter,
brlapi_param_subparam_t subparam, brlapi_param_flags_t flags,
brlapi_paramCallback_t func, void *priv, void *data, size_t len)
brlapi_paramCallbackDescriptor_t BRLAPI_STDCALL
brlapi__watchParameter (brlapi_handle_t *handle,
brlapi_param_t parameter, brlapi_param_subparam_t subparam,
brlapi_param_flags_t flags, brlapi_paramCallback_t func, void
*priv, void *data, size_t len)
int BRLAPI_STDCALL brlapi_unwatchParameter
(brlapi_paramCallbackDescriptor_t descriptor)
int BRLAPI_STDCALL brlapi__unwatchParameter
(brlapi_handle_t *handle, brlapi_paramCallbackDescriptor_t
descriptor)
There are several kinds of parameters:
Some of them are subdivided in subparameters. Others have only subparameter 0.
Some of them are read-only, others are read/write.
A client can either request the immediate content of a parameter by using brlapi_getParameter(); set the content of a parameter by using brlapi_setParameter(); or register a callback that may be called immediately and on each change of a given parameter, by using brlapi_watchParameter().
Refer to the global value instead of the value local to the connection
Refer to the value local to the connection instead of the global value
Specify whether to receive notifications of value self-changes
Flags for parameter requests
Callback for parameter changes
When a parameter gets changed, application-defined callbacks set by the brlapi_watchParameter() function are called.
Parameters
This callback only gets called when the application calls some brlapi_ function (i.e. BrlAPI gets direct control of the execution).
Type for callback descriptors This is returned by brlapi_watchParameter, to be passed to brlapi_unwatchParameter.
Enumerator
Get the content of a parameter
brlapi_getParameter gets the current content of a parameter
Parameters
Returns
Return the content of a parameter
brlapi_getParameterAlloc gets the current content of a parameter, by returning it as a newly-allocated buffer. The buffer is allocated to one byte more than the parameter value. This byte is set to zero. This allows, for string parameters, to be able to immediately use it as a C string.
Parameters
Returns
Set the content of a parameter
brlapi_setParameter sets the content of a parameter
Parameters
Returns
Clear a parameter change callback
brlapi_unwatchParameter unregisters a parameter change callback: the callback function previously registered with brlapi_watchParameter will not be called any longer.
Parameters
Returns
Set a parameter change callback
brlapi_watchParameter registers a parameter change callback: whenever the given parameter changes, the given function is called.
Parameters
Returns
Note
If data is NULL, the callback will be called immediately by brlapi_watchParameter, for providing the initial value
Generated automatically by Doxygen for BrlAPI from the source code.
Version 0.8 | BrlAPI |