10#include "../nyx_node_internal.h"
18 if(label == NULL || label[0] ==
'\0')
27 nyx_dict_set(result,
"<>", nyx_string_from_dup(
"defLight"));
29 nyx_dict_set(result,
"@name", nyx_string_from_dup(name));
30 nyx_dict_set(result,
"@label", nyx_string_from_dup(label));
32 nyx_dict_set(result,
"$", nyx_string_from_dup(nyx_state_to_str(value)));
45 return nyx_dict_set(prop,
"$", nyx_string_from_dup(nyx_state_to_str(value)));
52 return nyx_str_to_state(nyx_string_get((
nyx_string_t *) nyx_dict_get(prop,
"$")));
74 nyx_dict_set(result,
"<>", nyx_string_from_dup(
"defLightVector"));
76 nyx_dict_set(result,
"children", children);
80 nyx_dict_set(result,
"@client", nyx_string_from_dup(
"unknown"));
81 nyx_dict_set(result,
"@device", nyx_string_from_dup(device));
82 nyx_dict_set(result,
"@name", nyx_string_from_dup(name));
84 nyx_dict_set(result,
"@state", nyx_string_from_dup(nyx_state_to_str(state)));
88 internal_set_opts(result, opts);
92 for(; *props != NULL; props++) nyx_list_push(children, *props);
105 return internal_prop_to_set_vector(vector,
"setLightVector",
"oneLight");
#define STR_t
Alias for const char *.
bool nyx_light_prop_set(nyx_dict_t *prop, nyx_state_t value)
Sets the new value of the provided property object.
nyx_state_t nyx_light_prop_get(const nyx_dict_t *prop)
Gets the current value of the provided property object.
nyx_state_t
Vector state hint.
Struct describing a JSON dict object.
Struct describing a JSON list object.
Struct describing the options for INDI / Nyx vectors.
Struct describing a JSON string object.