Nyx Node
Loading...
Searching...
No Matches
Nyx Switch messages
Collaboration diagram for Nyx Switch messages:

Functions

nyx_dict_tnyx_switch_prop_new (STR_t name, __NYX_NULLABLE__ STR_t label, nyx_onoff_t value)
 Allocates a new INDI / Nyx switch property.
 
bool nyx_switch_prop_set (nyx_dict_t *prop, nyx_onoff_t value)
 Sets the new value of the provided property object.
 
nyx_onoff_t nyx_switch_prop_get (const nyx_dict_t *prop)
 Gets the current value of the provided property object.
 
nyx_dict_tnyx_switch_vector_new (STR_t device, STR_t name, nyx_state_t state, nyx_perm_t perm, nyx_rule_t rule, nyx_dict_t *props[], __NYX_NULLABLE__ const nyx_opts_t *opts)
 Allocates a new INDI / Nyx switch vector.
 

Detailed Description

Nyx Switch messages

Function Documentation

◆ nyx_switch_prop_new()

nyx_dict_t * nyx_switch_prop_new ( STR_t  name,
__NYX_NULLABLE__ STR_t  label,
nyx_onoff_t  value 
)

Allocates a new INDI / Nyx switch property.

Parameters
nameProperty name.
labelProperty label.
valueInitial value.
Returns
The new property object.

◆ nyx_switch_prop_set()

bool nyx_switch_prop_set ( nyx_dict_t prop,
nyx_onoff_t  value 
)

Sets the new value of the provided property object.

Parameters
propProperty object.
valueNew value.
Returns
true if the value was modified, false otherwise.

Definition at line 43 of file indi_switch.c.

◆ nyx_switch_prop_get()

nyx_onoff_t nyx_switch_prop_get ( const nyx_dict_t prop)

Gets the current value of the provided property object.

Parameters
propProperty object.
Returns
The current value.

Definition at line 50 of file indi_switch.c.

◆ nyx_switch_vector_new()

nyx_dict_t * nyx_switch_vector_new ( STR_t  device,
STR_t  name,
nyx_state_t  state,
nyx_perm_t  perm,
nyx_rule_t  rule,
nyx_dict_t props[],
__NYX_NULLABLE__ const nyx_opts_t opts 
)

Allocates a new INDI / Nyx switch vector.

Parameters
deviceDevice name.
nameVector name.
stateVector state.
permVector permissions.
ruleVector rules.
propsArray of properties with NULL sentinel.
optsOptions (group, label, hints, timeout, message).
Returns
The new vector object.