niimaqdx: only query attributes that are actually readable
This commit is contained in:
parent
e9755b0b00
commit
b7e1085885
@ -963,13 +963,17 @@ listAttributes (IMAQdxSession session)
|
|||||||
IMAQdxAttributeInformation *info = attributeInfoArray + i;
|
IMAQdxAttributeInformation *info = attributeInfoArray + i;
|
||||||
g_assert (info);
|
g_assert (info);
|
||||||
|
|
||||||
rval =
|
if (info->Readable) {
|
||||||
IMAQdxGetAttribute (session, info->Name, IMAQdxValueTypeString,
|
rval =
|
||||||
attributeString);
|
IMAQdxGetAttribute (session, info->Name, IMAQdxValueTypeString,
|
||||||
if (rval != IMAQdxErrorSuccess) {
|
attributeString);
|
||||||
GST_WARNING ("Failed to read value of attribute %s", info->Name);
|
if (rval != IMAQdxErrorSuccess) {
|
||||||
continue;
|
GST_WARNING ("Failed to read value of attribute %s", info->Name);
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
attributeString[0] = 0;
|
||||||
|
|
||||||
printf ("%s, %s/%s, %s, %s\n", info->Name, info->Readable ? "R" : "-",
|
printf ("%s, %s/%s, %s, %s\n", info->Name, info->Readable ? "R" : "-",
|
||||||
info->Writable ? "W" : "-", attributeTypeStrings[info->Type],
|
info->Writable ? "W" : "-", attributeTypeStrings[info->Type],
|
||||||
attributeString);
|
attributeString);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user