Procedures for Testing and Debugging
MERLIC provides procedures that can be used for testing and debugging purposes in HDevelop. They are only meant to be used in an HDevelop program to test the functionality implemented in the procedure library of a custom tool. They may not be used in any of the HDevelop procedures that are part of the procedure library representing the custom tool, e.g., in the "_Info" procedure.
Procedures
ToolHandle
This procedure can be used to create a "ToolHandle", i.e., it declares a global variable "G_DEBUG" and initializes it with an empty tuple.
The "ToolHandle" of a custom tool represents the ID of the tool. It is required in two cases: if interface procedures are used in the implementation of your custom tool and if you want to debug your custom tool in HDevelop. Displaying debugging information directly in the graphics window of HDevelop is only possible if a "ToolHandle" is available. It also enables you to check which interface procedures are called and queries which parameters were used in each procedure call. In addition, the returned information lists the time when the procedures were called.
To enable that the debugging information is stored, you have to create a "ToolHandle".
MeTest_create_tool_handle ( : : : ToolHandle )
Parameters
The procedure contains the following output parameter:
|
Output parameter |
Description |
|---|---|
|
ToolHandle |
The ID of the tool. |
Execution Context
This procedure can be used to set the execution context of a tool to "Running". The procedure can be called in the HDevelop test program to simulate the execution of the custom tool within a running MERLIC Vision App. Thus, it enables you to check the behavior of the custom tool for the time period in which the MVApp is running. This might be useful if your custom tool is meant to perform a specific action when the MVApp is executed, e.g., if a result should be written to an external file.
This procedure only simulates the execution of the custom tool for the case that the execution of the MVApp was triggered explicitly, e.g., by clicking the respective buttons in the MERLIC Creator. All other types of executions, e.g., executions that are triggered automatically by changing the value of a tool parameter or by loading the tool in the MERLIC Creator, are not simulated. If you want to test the behavior of the custom tool for these type of executions, you can use the procedure MeTest_set_execution_context_to_unknown.
MeTest_set_execution_context_to_running ( : : ToolHandle : )
Parameters
The procedure contains the following input parameter:
|
Input parameter |
Description |
|---|---|
|
ToolHandle |
The ID of the tool. |
This procedure can be used to set the execution context of a tool to "Unknown". The procedure can be called in the HDevelop test program to simulate executions of the custom tool that were not triggered by starting the execution of the MVApp, e.g., executions that were triggered automatically by changing the value of a tool parameter in the MERLIC Creator. Thus, it enables you to check the behavior of the custom tool for all types of executions that are triggered automatically as side effect of some other processes. This might be useful if your custom tool is meant to perform a specific action only when the MVApp is executed explicitly, e.g., if a result should be written to an external file. You can then use the procedure MeTest_set_execution_context_to_running to check if the desired action is performed correctly for the case that the execution is triggered explicitly and you can use the procedure MeTest_set_execution_context_to_unknown to check if the respective action is not performed, as desired, when the execution is triggered automatically for all other cases.
MeTest_set_execution_context_to_running ( : : ToolHandle : )
Parameters
The procedure contains the following input parameter:
|
Input parameter |
Description |
|---|---|
|
ToolHandle |
The ID of the tool. |