liblightify
Lightify_Node Class Reference

Enable the use of exception within this wrapper. More...

#include <liblightify++.hpp>

Public Member Functions

const char * GetName (void) const
 
unsigned long long GetMAC (void) const
 
unsigned int GetZoneAdr (void) const
 
unsigned int GetGroup (void) const
 
lightify_node_type GetLampType (void) const
 
int GetRed (void) const
 
int GetBlue (void) const
 
int GetGreen (void) const
 
int GetWhite (void) const
 
int GetCCT (void) const
 
int GetBrightness (void) const
 
int IsOn (void) const
 
int GetOnlineState (void) const
 
int IsStale (void) const
 
int TurnOnOff (bool onoff)
 
int SetCCT (int cct, int time)
 
int SetRGBW (int red, int green, int blue, int white, int time)
 
int SetBrightness (int level, int time)
 
int UpdateNodeInfo (void)
 

Protected Member Functions

 Lightify_Node (struct lightify_ctx *ctx, struct lightify_node *node)
 

Friends

class Lightify
 

Detailed Description

Enable the use of exception within this wrapper.

Definition at line 60 of file liblightify++.hpp.

Constructor & Destructor Documentation

Lightify_Node ( struct lightify_ctx ctx,
struct lightify_node node 
)
inlineprotected

Definition at line 63 of file liblightify++.hpp.

Member Function Documentation

int GetBlue ( void  ) const
inline

Get the current color value: blue

Definition at line 105 of file liblightify++.hpp.

int GetBrightness ( void  ) const
inline

Get the brightness

Definition at line 125 of file liblightify++.hpp.

int GetCCT ( void  ) const
inline

Get the CCT

Definition at line 120 of file liblightify++.hpp.

int GetGreen ( void  ) const
inline

Get the current color value: green

Definition at line 110 of file liblightify++.hpp.

unsigned int GetGroup ( void  ) const
inline

Get the node's group

Definition at line 90 of file liblightify++.hpp.

lightify_node_type GetLampType ( void  ) const
inline

Get the lamp type

Definition at line 95 of file liblightify++.hpp.

unsigned long long GetMAC ( void  ) const
inline

Get the node's MAC

Definition at line 80 of file liblightify++.hpp.

const char* GetName ( void  ) const
inline

Get the node's name.

Definition at line 75 of file liblightify++.hpp.

int GetOnlineState ( void  ) const
inline

Get the online status?

Definition at line 135 of file liblightify++.hpp.

int GetRed ( void  ) const
inline

Get the current color value: red

Definition at line 100 of file liblightify++.hpp.

int GetWhite ( void  ) const
inline

Get the current color value: white

Definition at line 115 of file liblightify++.hpp.

unsigned int GetZoneAdr ( void  ) const
inline

Get the node's zone address

Definition at line 85 of file liblightify++.hpp.

int IsOn ( void  ) const
inline

Is the lamp on?

Definition at line 130 of file liblightify++.hpp.

int IsStale ( void  ) const
inline

Is the lamp info stale? (that is: a previous request failed, we do not know the status.)

Definition at line 142 of file liblightify++.hpp.

int SetBrightness ( int  level,
int  time 
)
inline

Set brightness

Parameters
level0..100
timetime in 1/10s
Returns
negative on error

Definition at line 193 of file liblightify++.hpp.

int SetCCT ( int  cct,
int  time 
)
inline

Set color temperature

Parameters
cctto be set
timefadetime for transition in 1/10 secs
Returns
negative on error

Definition at line 164 of file liblightify++.hpp.

int SetRGBW ( int  red,
int  green,
int  blue,
int  white,
int  time 
)
inline

Set color components

Note
observed, that white can only be set when the other colors are 0.

Color values are good from 0-255

Parameters
redto be set
greento be set
blueto be set
whiteto be set
timefadetime for transition in 1/10 secs
Returns
negative on error

Definition at line 182 of file liblightify++.hpp.

int TurnOnOff ( bool  onoff)
inline

Turn on / off

Definition at line 153 of file liblightify++.hpp.

int UpdateNodeInfo ( void  )
inline

Query updated node information from the gateway

Will ask the gateway to refresh node's information.

Returns
negative on error, 0 on success
See also
lightify_request_update_node()

Definition at line 205 of file liblightify++.hpp.

Friends And Related Function Documentation

friend class Lightify
friend

Definition at line 61 of file liblightify++.hpp.


The documentation for this class was generated from the following file: