17 "description" :
"How to manage signal polarity.",
36 const char *valueAsString =
"";
37 if (json_object_get_type(js) == json_type_string)
38 valueAsString = json_object_get_string(js);
42 if (strcmp(valueAsString,
"bipolar") == 0)
43 value = VuoDiode_Bipolar;
44 else if (strcmp(valueAsString,
"absolute") == 0)
45 value = VuoDiode_Absolute;
55 char *valueAsString =
"unipolar";
57 if (value == VuoDiode_Bipolar)
58 valueAsString =
"bipolar";
59 else if (value == VuoDiode_Absolute)
60 valueAsString =
"absolute";
62 return json_object_new_string(valueAsString);
82 const char *valueAsString =
"Unipolar";
84 if (value == VuoDiode_Bipolar)
85 valueAsString =
"Bipolar";
86 else if (value == VuoDiode_Absolute)
87 valueAsString =
"Absolute";
89 return strdup(valueAsString);
97 return valueA == valueB;
105 return valueA < valueB;