set_spyset_spySetSpySetSpyset_spy (算子)
名称
set_spyset_spySetSpySetSpyset_spy — HALCON 调试工具的控制。
签名
Herror set_spy(const char* Class, const char* Value)
Herror T_set_spy(const Htuple Class, const Htuple Value)
描述
算子 set_spyset_spySetSpySetSpySetSpyset_spy is the HALCON debugging tool.
This tool allows the flexible control of the input and output data
of HALCON-operators - in graphical as well as in textual form.
The data control is activated by using
set_spy(::'mode','on':)set_spy("mode","on")SetSpy("mode","on")SetSpy("mode","on")SetSpy("mode","on")set_spy("mode","on"),
and deactivated by using
set_spy(::'mode','off':)set_spy("mode","off")SetSpy("mode","off")SetSpy("mode","off")SetSpy("mode","off")set_spy("mode","off").
The debugging tool can further be activated with the help of the
environment variable HALCONSPY. The definition of this variable
corresponds to calling up 'mode'"mode""mode""mode""mode""mode" and 'on'"on""on""on""on""on".
The following control modes (ClassClassClassClassclassValclass) can be tuned using
ValueValueValueValuevaluevalue:
ClassClassClassClassclassValclass = 'operator'"operator""operator""operator""operator""operator"
-
When a routine is called, its name and the
names of its parameters will be given
(in TRIAS notation).
ValueValueValueValuevaluevalue: 'on'"on""on""on""on""on" or 'off'"off""off""off""off""off".
Default: 'off'"off""off""off""off""off".
ClassClassClassClassclassValclass = 'input_control'"input_control""input_control""input_control""input_control""input_control"
-
When a routine is called, the names and values of the
input control parameters will be given.
ValueValueValueValuevaluevalue: 'on'"on""on""on""on""on" or 'off'"off""off""off""off""off".
Default: 'off'"off""off""off""off""off".
ClassClassClassClassclassValclass = 'output_control'"output_control""output_control""output_control""output_control""output_control"
-
When a routine is called, the names and values of the
output control parameters are given.
ValueValueValueValuevaluevalue: 'on'"on""on""on""on""on" or 'off'"off""off""off""off""off".
Default: 'off'"off""off""off""off""off".
ClassClassClassClassclassValclass = 'parameter_values'"parameter_values""parameter_values""parameter_values""parameter_values""parameter_values"
-
Additional information on 'input_control'"input_control""input_control""input_control""input_control""input_control" and
'output_control'"output_control""output_control""output_control""output_control""output_control":indicates how many values per parameter shall be
displayed at most (maximum tuple length of the output).
ValueValueValueValuevaluevalue: tuple length (integer)
Default: 4
ClassClassClassClassclassValclass = 'db'"db""db""db""db""db"
-
Information concerning the 4 relations in the
HALCON-database. This is especially valuable
in looking for forgotten clear_objclear_objClearObjClearObjClearObjclear_obj。
ValueValueValueValuevaluevalue: 'on'"on""on""on""on""on" or 'off'"off""off""off""off""off".
Default: 'off'"off""off""off""off""off".
ClassClassClassClassclassValclass = 'time'"time""time""time""time""time"
-
Processing time of the operator
ValueValueValueValuevaluevalue: 'on'"on""on""on""on""on" or 'off'"off""off""off""off""off".
Default: 'off'"off""off""off""off""off".
ClassClassClassClassclassValclass = 'log_file'"log_file""log_file""log_file""log_file""log_file"
-
Spy can hereby divert the text output into a file having
been opened with open_file.
ValueValueValueValuevaluevalue: a file handle (see open_fileopen_fileOpenFileOpenFileOpenFileopen_file)
ClassClassClassClassclassValclass = 'error'"error""error""error""error""error"
-
If 'error'"error""error""error""error""error" is activated and an internal error
occurs, spy will show the internal procedures (file/line)
concerned.
ValueValueValueValuevaluevalue: 'on'"on""on""on""on""on" or 'off'"off""off""off""off""off".
Default: 'off'"off""off""off""off""off".
ClassClassClassClassclassValclass = 'internal'"internal""internal""internal""internal""internal"
-
If 'internal'"internal""internal""internal""internal""internal" is activated, spy will display the
internal procedures and their parameters (file/line)
while an HALCON-operator
is processed.
ValueValueValueValuevaluevalue: 'on'"on""on""on""on""on" or 'off'"off""off""off""off""off".
Default: 'off'"off""off""off""off""off".
Each output starts with the thread handle, followed by a global counter
that marks the order of the outputs. In multi-threaded applications, this
information can be used to assign the output to individual user threads
and to reconstruct the chronological sequence.
注意
Note that under Windows the output on stdout works only in combination with a
console application.
执行信息
- 多线程类型:独占(仅与独立算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ClassClassClassClassclassValclass (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Control mode
默认值:
'mode'
"mode"
"mode"
"mode"
"mode"
"mode"
值列表:
'db'"db""db""db""db""db", 'error'"error""error""error""error""error", 'input_control'"input_control""input_control""input_control""input_control""input_control", 'internal'"internal""internal""internal""internal""internal", 'log_file'"log_file""log_file""log_file""log_file""log_file", 'mode'"mode""mode""mode""mode""mode", 'operator'"operator""operator""operator""operator""operator", 'output_control'"output_control""output_control""output_control""output_control""output_control", 'parameter_values'"parameter_values""parameter_values""parameter_values""parameter_values""parameter_values", 'time'"time""time""time""time""time"
ValueValueValueValuevaluevalue (输入控制) string → HTupleUnion[str, int, float]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)
State of the control mode to be set.
默认值:
'on'
"on"
"on"
"on"
"on"
"on"
建议值:
'on'"on""on""on""on""on", 'off'"off""off""off""off""off", 1, 2, 3, 4, 5, 10, 50, 0.0, 1.0, 2.0, 5.0, 10.0
示例(C)
/* init spy: Setting of the wished control modi */
set_spy("mode","on");
set_spy("operator","on");
set_spy("input_control","on");
set_spy("output_control","on");
/* calling of program section, that will be examined */
set_spy("mode","off");
结果
算子 set_spyset_spySetSpySetSpySetSpyset_spy 在参数正确时返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
可能的前趋
reset_obj_dbreset_obj_dbResetObjDbResetObjDbResetObjDbreset_obj_db
另见
get_spyget_spyGetSpyGetSpyGetSpyget_spy,
query_spyquery_spyQuerySpyQuerySpyQuerySpyquery_spy
模块
基础