We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e701006 commit bd8001bCopy full SHA for bd8001b
aravisApp/src/arvFeature.cpp
@@ -31,6 +31,17 @@ bool arvFeature::isImplemented() {
31
}
32
33
bool arvFeature::isAvailable() {
34
+ // Other SDKs return isAvailable=false for enum features with no available enum values, and ADGenICam relies on this.
35
+ // Return false if numEnums is 0.
36
+ if (ARV_IS_GC_ENUMERATION(mNode)) {
37
+ guint numEnums;
38
+ ArvGcEnumeration *enumeration = (ARV_GC_ENUMERATION (mNode));
39
+ arv_gc_enumeration_dup_available_int_values(enumeration, &numEnums, NULL);
40
+ if (numEnums == 0) {
41
+ printf("arvFeature::isAvailable() returning false for %s because numEnums=0\n", mFeatureName.c_str());
42
+ return false;
43
+ }
44
45
return arv_gc_feature_node_is_available(ARV_GC_FEATURE_NODE(mNode), NULL);
46
47
0 commit comments