node.h
Go to the documentation of this file.
/*
liblightify -- library to control OSRAM's LIGHTIFY
Copyright (c) 2015, Tobias Frost <tobi@coldtobi.de>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* node.h
*
* Created on: 13.08.2015
* Author: tobi
*/
#ifndef SRC_NODE_H_
#define SRC_NODE_H_
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdint.h>
struct lightify_node;
// IMPORTANT NOTE //
// THIS API WILL ONLY MODIFY THE CACHED DATA -- They do NOT query the actual hardware.
int lightify_node_new(struct lightify_ctx *ctx, struct lightify_node** newnode);
int lightify_node_remove(struct lightify_node* node);
struct lightify_node* lightify_node_get_nextnode(struct lightify_node *node);
struct lightify_node* lightify_node_get_prevnode(struct lightify_node *node);
int lightify_node_set_name(struct lightify_node* node, char *name);
int lightify_node_set_nodeadr(struct lightify_node* node, uint64_t adr);
int lightify_node_set_zoneadr(struct lightify_node* node, uint16_t adr);
int lightify_node_set_grpadr(struct lightify_node* node, uint16_t adr);
int lightify_node_set_lamptype(struct lightify_node* node, enum lightify_node_type);
int lightify_node_set_red(struct lightify_node* node, int red);
int lightify_node_set_green(struct lightify_node* node, int green);
int lightify_node_set_blue(struct lightify_node* node, int blue);
int lightify_node_set_white(struct lightify_node* node, int white);
int lightify_node_set_cct(struct lightify_node* node, int cct);
int lightify_node_set_brightness(struct lightify_node* node, int brightness);
int lightify_node_set_onoff(struct lightify_node* node, uint8_t on);
int lightify_node_set_online_status(struct lightify_node* node, uint8_t state);
int lightify_node_set_stale(struct lightify_node *node, int stale);
#endif /* SRC_NODE_H_ */
lightify_node::name
char * name
Definition: node.c:61
lightify_node_set_lamptype
int lightify_node_set_lamptype(struct lightify_node *node, enum lightify_node_type)
Definition: node.c:202
lightify_node_set_zoneadr
int lightify_node_set_zoneadr(struct lightify_node *node, uint16_t adr)
Definition: node.c:180
lightify_node_set_cct
int lightify_node_set_cct(struct lightify_node *node, int cct)
Definition: node.c:257
lightify_node::white
int white
Definition: node.c:66
lightify_node_set_onoff
int lightify_node_set_onoff(struct lightify_node *node, uint8_t on)
Definition: node.c:280
lightify_ctx
Definition: context.h:68
lightify_node_set_blue
int lightify_node_set_blue(struct lightify_node *node, int blue)
Definition: node.c:224
lightify_node_set_green
int lightify_node_set_green(struct lightify_node *node, int green)
Definition: node.c:235
lightify_node_set_red
int lightify_node_set_red(struct lightify_node *node, int red)
Definition: node.c:213
lightify_node_set_grpadr
int lightify_node_set_grpadr(struct lightify_node *node, uint16_t adr)
Definition: node.c:191
lightify_node_set_stale
int lightify_node_set_stale(struct lightify_node *node, int stale)
Definition: node.c:307
lightify_node_set_brightness
int lightify_node_set_brightness(struct lightify_node *node, int brightness)
Definition: node.c:268
lightify_node::blue
int blue
Definition: node.c:65
lightify_node_get_prevnode
struct lightify_node * lightify_node_get_prevnode(struct lightify_node *node)
Definition: node.c:145
lightify_node_set_online_status
int lightify_node_set_online_status(struct lightify_node *node, uint8_t state)
Definition: node.c:291
lightify_node_set_name
int lightify_node_set_name(struct lightify_node *node, char *name)
Definition: node.c:151
lightify_node::red
int red
Definition: node.c:63
lightify_node_get_nextnode
struct lightify_node * lightify_node_get_nextnode(struct lightify_node *node)
Definition: node.c:140
lightify_node_remove
int lightify_node_remove(struct lightify_node *node)
Definition: node.c:117
lightify_node_type
lightify_node_type
Definition: liblightify.h:105
lightify_node_set_white
int lightify_node_set_white(struct lightify_node *node, int white)
Definition: node.c:246
lightify_node_set_nodeadr
int lightify_node_set_nodeadr(struct lightify_node *node, uint64_t adr)
Definition: node.c:169
lightify_node
Definition: node.c:43
lightify_node::green
int green
Definition: node.c:64
lightify_node_new
int lightify_node_new(struct lightify_ctx *ctx, struct lightify_node **newnode)
Definition: node.c:80
lightify_node::brightness
int brightness
Definition: node.c:69
lightify_node::ctx
struct lightify_ctx * ctx
Definition: node.c:46
lightify_node::cct
int cct
Definition: node.c:67