17 "title" :
"Serial Device",
18 "description" :
"Information about a serial I/O device.",
34 if (strcmp(json_object_get_string(js),
"path") == 0)
35 return VuoSerialDevice_MatchPath;
37 return VuoSerialDevice_MatchName;
45 if (type == VuoSerialDevice_MatchPath)
79 json_object_object_add(js,
"matchType", matchTypeObject);
84 json_object_object_add(js,
"name", o);
90 json_object_object_add(js,
"path", o);
133 if (device.
matchType == VuoSerialDevice_MatchPath)
147 if (deviceCount == 0)
149 VUserLog(
"Warning: No serial devices found.");
156 nameToMatch = device.
name;
160 for (
unsigned long i = 1; i <= deviceCount; ++i)
163 if (strstr(d.
name, nameToMatch))
173 realizedDevice->
matchType = VuoSerialDevice_MatchPath;
180 VUserLog(
"Warning: Didn't find a serial device matching '%s'.", device.
name);
198 return strdup(
"Unknown device");