API Documentation for liblightify

# C API Documentation

## Library Sections

The library API contains those main sections:

- Library context and I/O setup: Library Context
- Library support routines, e.g. logging Support Functions
- Library callbacks (e.g I/O) Call-backs
- Nodes (Lamp) related: Node manipulation and state
- Group relatedNode manipulation and state: Group manipulation and state

ll_CAPI_NodeCache Node Information Cache

Nodes (Lamps) are queried from the gateway using lightify_nodes_scan(). The library will then cache the retrieved information in memory, and when using the API to retrieve the properties the cached information is returned.

That means, if the node is manipulated externally, the cache will still read the old value as it needs an explicit request to update the node's cache.

Updating the cache can be done via an repeated scan for the nodes via lightify_nodes_scan() or via an update request lightify_nodes_update().

Note that a new scan will invalidate all library node objects – all node pointers will become invalid and replaced by a new copy.

The functions to obtain cached node information are documented here: Functions for cached node information

# C++ API Documentation

The C++ API is a wrapper for the C-Library. See the classes Lightify and Lightify_Node.