aravis
aravis copied to clipboard
Chunk feature access
chunkparser: allow to set string and integer features
On some devices, chunk access requires a change of a local feature value. For example:
<Enumeration NameSpace="Standard" Name="ChunkComponentSelector">
<Visibility>Expert</Visibility>
<EnumEntry NameSpace="Standard" Name="Range">
<Value>0</Value>
</EnumEntry>
<EnumEntry NameSpace="Standard" Name="Normal">
<Value>1</Value>
</EnumEntry>
<EnumEntry NameSpace="Standard" Name="Texture">
<Value>2</Value>
</EnumEntry>
<Value>0</Value>
</Enumeration>
<Float NameSpace="Standard" Name="ChunkScan3dCoordinateOffset">
<Visibility>Expert</Visibility>
<ImposedAccessMode>RO</ImposedAccessMode>
<pValue>ChunkScan3dCoordinateOffsetRegister</pValue>
<Min>-3.40282e+38</Min>
<Max>3.40282e+38</Max>
<Inc>1e-6</Inc>
<DisplayPrecision>6</DisplayPrecision>
</Float>
<FloatReg NameSpace="Custom" Name="ChunkScan3dCoordinateOffsetRegister">
<Visibility>Expert</Visibility>
<Address>0x8</Address>
<pIndex Offset="16">ChunkComponentSelector</pIndex>
<Length>8</Length>
<AccessMode>RW</AccessMode>
<pPort>Chunk</pPort>
<pInvalidator>ChunkScan3dCoordinateSelector</pInvalidator>
<pInvalidator>ChunkComponentSelector</pInvalidator>
<Endianess>LittleEndian</Endianess>
</FloatReg>
As the Genicam tree is owned by the parser and not shared with the device, in order to access to chunk data without a device instance, we need to provide an API to set the selector feature.
arv_chunk_parser_set_string_feature_value (parser,
"ChunkComponentSelector",
"Normal", &error);
normal_offset = arv_chunk_parser_get_float_value (parser,
"ChunkScan3dCoordinateOffset",
&error);