![]() |
SolarCapture C Bindings User Guide
SF-115721-CD
Draft 2A
|
Attribute object. More...
#include <attr.h>
Attribute object.
Attributes are used to specify optional behaviours and parameters, usually when allocating other SolarCapture objects. Each attribute object defines a complete set of the attributes that SolarCapture understands.
For example, the "affinity_core" attribute controls which CPU core an sc_thread runs on.
Functions to create and manage attributes are in the file attr.h.
The default values for attributes may be overridden by setting the environment variable SC_ATTR. For example:
SC_ATTR="log_level=3;snap=2"
Each function that takes an attribute argument will only be interested in a subset of the attributes specified by an sc_attr instance. Other attributes are ignored.
The set of attributes supported by SolarCapture may change between releases, so applications should where possible tolerate failures when setting attributes.
Attribute objects are not associated with sc_session objects, so the SolarCapture error status is not set when functions that operate on attributes report an error. Instead, functions that operate on attributes return 0 on success and a negative error code otherwise.