niimaqdx: only query attributes that are actually readable
This commit is contained in:
parent
e9755b0b00
commit
b7e1085885
@ -963,6 +963,7 @@ listAttributes (IMAQdxSession session)
|
||||
IMAQdxAttributeInformation *info = attributeInfoArray + i;
|
||||
g_assert (info);
|
||||
|
||||
if (info->Readable) {
|
||||
rval =
|
||||
IMAQdxGetAttribute (session, info->Name, IMAQdxValueTypeString,
|
||||
attributeString);
|
||||
@ -970,6 +971,9 @@ listAttributes (IMAQdxSession session)
|
||||
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" : "-",
|
||||
info->Writable ? "W" : "-", attributeTypeStrings[info->Type],
|
||||
attributeString);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user