liblightify
|
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <string.h>
#include <liblightify/liblightify.h>
#include <unistd.h>
#include <fcntl.h>
#include <getopt.h>
#include <time.h>
#include <errno.h>
Go to the source code of this file.
Functions | |
void | usage (char *argv[]) |
struct lightify_node * | find_node_per_name (struct lightify_ctx *ctx, const char *name) |
struct lightify_group * | find_grp_per_name (struct lightify_ctx *ctx, const char *name) |
void | command_set_0_1 (struct lightify_ctx *ctx, int command_on) |
void | command_set_cct (struct lightify_ctx *ctx) |
void | command_set_rgbw (struct lightify_ctx *ctx) |
void | command_set_lvl (struct lightify_ctx *ctx) |
void | command_update_node (struct lightify_ctx *ctx) |
void | setup_connection (struct lightify_ctx *ctx) |
const char * | decode_online_state (int state) |
const char * | decode_lamptype (int type) |
const char * | decode_onoff_sate (int state) |
void | dump_nodes_state (struct lightify_ctx *ctx) |
void | dump_groups (struct lightify_ctx *ctx) |
int | main (int argc, char *argv[]) |
Variables | |
int | command_cct = 0 |
int | command_cct_data = 0 |
int | command_r = 0 |
int | command_r_r = 0 |
int | command_r_g = 0 |
int | command_r_b = 0 |
int | command_r_w = 0 |
int | command_l = 0 |
int | command_l_data = 0 |
char * | name_data = NULL |
char * | group_data = NULL |
char * | host_data = NULL |
int | port = 4000 |
int | fadetime |
int | gonnected = 0 |
int | sockfd |
void command_set_0_1 | ( | struct lightify_ctx * | ctx, |
int | command_on | ||
) |
Definition at line 150 of file lightify-util.c.
void command_set_cct | ( | struct lightify_ctx * | ctx | ) |
Definition at line 174 of file lightify-util.c.
void command_set_lvl | ( | struct lightify_ctx * | ctx | ) |
Definition at line 217 of file lightify-util.c.
void command_set_rgbw | ( | struct lightify_ctx * | ctx | ) |
Definition at line 194 of file lightify-util.c.
void command_update_node | ( | struct lightify_ctx * | ctx | ) |
Definition at line 237 of file lightify-util.c.
const char* decode_lamptype | ( | int | type | ) |
Definition at line 311 of file lightify-util.c.
const char* decode_online_state | ( | int | state | ) |
Definition at line 300 of file lightify-util.c.
const char* decode_onoff_sate | ( | int | state | ) |
Definition at line 330 of file lightify-util.c.
void dump_groups | ( | struct lightify_ctx * | ctx | ) |
Definition at line 374 of file lightify-util.c.
void dump_nodes_state | ( | struct lightify_ctx * | ctx | ) |
Definition at line 342 of file lightify-util.c.
struct lightify_group* find_grp_per_name | ( | struct lightify_ctx * | ctx, |
const char * | name | ||
) |
Definition at line 138 of file lightify-util.c.
struct lightify_node* find_node_per_name | ( | struct lightify_ctx * | ctx, |
const char * | name | ||
) |
Definition at line 126 of file lightify-util.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 391 of file lightify-util.c.
void setup_connection | ( | struct lightify_ctx * | ctx | ) |
Definition at line 246 of file lightify-util.c.
void usage | ( | char * | argv[] | ) |
Definition at line 105 of file lightify-util.c.
int command_cct = 0 |
Definition at line 77 of file lightify-util.c.
int command_cct_data = 0 |
Definition at line 78 of file lightify-util.c.
int command_l = 0 |
Definition at line 86 of file lightify-util.c.
int command_l_data = 0 |
Definition at line 87 of file lightify-util.c.
int command_r = 0 |
Definition at line 80 of file lightify-util.c.
int command_r_b = 0 |
Definition at line 83 of file lightify-util.c.
int command_r_g = 0 |
Definition at line 82 of file lightify-util.c.
int command_r_r = 0 |
Definition at line 81 of file lightify-util.c.
int command_r_w = 0 |
Definition at line 84 of file lightify-util.c.
int fadetime |
Definition at line 99 of file lightify-util.c.
int gonnected = 0 |
Definition at line 101 of file lightify-util.c.
char* group_data = NULL |
Definition at line 93 of file lightify-util.c.
char* host_data = NULL |
Definition at line 95 of file lightify-util.c.
char* name_data = NULL |
Definition at line 91 of file lightify-util.c.
int port = 4000 |
Definition at line 97 of file lightify-util.c.
int sockfd |
Definition at line 103 of file lightify-util.c.