set_image_source_paramT_set_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param (Operator)
set_image_source_paramT_set_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param
— Set a parameter of an image source.
Signature
void SetImageSourceParam(const HTuple& ImageSourceHandle, const HTuple& Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value)
void HImageSource::SetImageSourceParam(const HString& Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value) const
void HImageSource::SetImageSourceParam(const char* Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value) const
void HImageSource::SetImageSourceParam(const wchar_t* Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value) const
(
Windows only)
Description
The operator set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param
sets the parameter
values for an image source handle ImageSourceHandleImageSourceHandleImageSourceHandleimageSourceHandleimage_source_handle
to
ValueValueValuevaluevalue
.
For further information about the image source concept see
Image Source.
The parameter needs to be specified using ParamParamParamparamparam
.
The parameter group can be specified using the generic parameters.
You have the following options for GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
:
- 'group'"group""group""group""group"
-
Specify the parameter group the parameter is found
in with GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
by setting one of these options:
-
'image_source'"image_source""image_source""image_source""image_source",
-
'plugin'"plugin""plugin""plugin""plugin",
-
'interface'"interface""interface""interface""interface",
-
'local_device'"local_device""local_device""local_device""local_device",
-
'device'"device""device""device""device",
-
'stream'"stream""stream""stream""stream".
When setting no generic parameters, GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
= 'group'"group""group""group""group"
and GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
= 'device'"device""device""device""device" are assumed by default.
- 'command_wait'"command_wait""command_wait""command_wait""command_wait"
-
Wait for the end of the command execution
(blocking operation).
List of values:
'false'"false""false""false""false", 'true'"true""true""true""true"
Default:
'true'"true""true""true""true"
Restriction:
Only valid for a ParamParamParamparamparam
of type
'command'"command""command""command""command".
- 'command_wait_interval'"command_wait_interval""command_wait_interval""command_wait_interval""command_wait_interval"
-
Polling interval in [ms] to check if
the command execution finished.
Default:
100
Restriction:
Only valid for a ParamParamParamparamparam
of type
'command'"command""command""command""command".
- 'command_wait_timeout'"command_wait_timeout""command_wait_timeout""command_wait_timeout""command_wait_timeout"
-
Time in [ms] to wait for end of the
command execution.
Default:
5000
Restriction:
Only valid for a ParamParamParamparamparam
of type
'command'"command""command""command""command".
It depends on the image source and its state, which parameters ParamParamParamparamparam
can be set. While some parameters are specific to the
hardware or software manufacturer and some depend on whether the image source
is in a connected state or not, the parameters of the 'image_source'"image_source""image_source""image_source""image_source"
group are always available.
The following list gives an overview, which of those parameters can be set
using set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param
. A description of the parameters can be
found in get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param
.
- 'device_access_flags'"device_access_flags""device_access_flags""device_access_flags""device_access_flags"
-
- 'device_id'"device_id""device_id""device_id""device_id"
-
- 'device_query_timeout'"device_query_timeout""device_query_timeout""device_query_timeout""device_query_timeout"
-
- 'device_user_name'"device_user_name""device_user_name""device_user_name""device_user_name"
-
- 'device_serial_number'"device_serial_number""device_serial_number""device_serial_number""device_serial_number"
-
- 'fetch_timeout'"fetch_timeout""fetch_timeout""fetch_timeout""fetch_timeout"
-
- 'interface_id'"interface_id""interface_id""interface_id""interface_id"
-
- 'interface_query_timeout'"interface_query_timeout""interface_query_timeout""interface_query_timeout""interface_query_timeout"
-
- 'num_buffers'"num_buffers""num_buffers""num_buffers""num_buffers"
-
- 'plugin_name'"plugin_name""plugin_name""plugin_name""plugin_name"
-
- 'plugin_path'"plugin_path""plugin_path""plugin_path""plugin_path"
-
- 'stream_id'"stream_id""stream_id""stream_id""stream_id"
-
ParamParamParamparamparam
is used to determine the desired parameter.
The value, the parameter should be set to is passed in ValueValueValuevaluevalue
.
Parameters of type 'command'"command""command""command""command" can be executed by
setting ValueValueValuevaluevalue
to 'execute'"execute""execute""execute""execute".
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
ImageSourceHandleImageSourceHandleImageSourceHandleimageSourceHandleimage_source_handle
(input_control) image_source →
HImageSource, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Image source handle.
ParamParamParamparamparam
(input_control) string →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Parameter whose value is to be set.
GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
(input_control) attribute.name-array →
HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Generic parameter name.
Default:
[]
Suggested values:
'group'"group""group""group""group", 'command_wait'"command_wait""command_wait""command_wait""command_wait", 'command_wait_timeout'"command_wait_timeout""command_wait_timeout""command_wait_timeout""command_wait_timeout", 'command_wait_interval'"command_wait_interval""command_wait_interval""command_wait_interval""command_wait_interval"
GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
(input_control) attribute.value-array →
HTupleSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Generic parameter value.
Default:
[]
Suggested values:
'image_source'"image_source""image_source""image_source""image_source", 'plugin'"plugin""plugin""plugin""plugin", 'interface'"interface""interface""interface""interface", 'local_device'"local_device""local_device""local_device""local_device", 'device'"device""device""device""device", 'stream'"stream""stream""stream""stream", 1, 5000, 100
ValueValueValuevaluevalue
(input_control) string-array →
HTupleSequence[Union[str, float, int]]HTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)
Value to be set.
Example (HDevelop)
* Configure or change the 'device_id' of the ImageSource (before the connect).
set_image_source_param (ImageSourceHandle,'device_id', 'group', 'image_source', '<desired_device_id>')
* Configure the ExposureTime of the connected camera (notice per default 'group'='device').
set_image_source_param (ImageSourceHandle, 'ExposureTime', [], [], 50000)
* Execute a software trigger (notice per default 'group'='device') without waiting for the end of the execution.
set_image_source_param (ImageSourceHandle, 'TriggerSoftware', 'command_wait', 0,'execute')
* Configure the handling of image buffers in the stream module.
set_image_source_param (ImageSourceHandle, 'StreamBufferHandlingMode', 'group', 'stream', 'NewestOnly')
Result
If the parameter values are correct, set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param
returns the value 2 (
H_MSG_TRUE)
. Otherwise an exception is raised.
Possible Predecessors
query_image_sourcesquery_image_sourcesQueryImageSourcesQueryImageSourcesquery_image_sources
,
create_image_sourcecreate_image_sourceCreateImageSourceCreateImageSourcecreate_image_source
,
connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source
Possible Successors
get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param
,
disconnect_image_sourcedisconnect_image_sourceDisconnectImageSourceDisconnectImageSourcedisconnect_image_source
See also
get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param
Module
Foundation