Functionalities
Each module configuration file listed in the application settings is one module. Its nodes are
at hdvisionsystems/lumiscan-calibration/<module name>/, where the module name is the name of the
module configuration file without .json, in lower case. A module offers two functions:
-
transformconverts 2D image coordinates into 3D coordinates with the module’s lookup table. -
resetreads the module configuration file and its lookup table again.
Each function can be started in two ways, and both lead to the same result:
-
the ready/request handshake, see General Concept of Handshake;
-
a single write to its
executemethod, see Execute methods.
A module can also transform a stream of points as they arrive, see Transforming a Stream (Experimental).
Data Layer
LumiScan Calibration offers its functions on the Data Layer under hdvisionsystems/lumiscan-calibration.
On ctrlX OS (ctrlX CORE or ctrlX IPC), LumiScan Calibration uses the ctrlX Data Layer.
On a PC with Windows 11 or Ubuntu 24.04, LumiScan Calibration uses LumiScan Keryx.
The node addresses, types and call patterns are the same on both. LumiScan Calibration offers:
-
a stream subscription to one source (experimental)
How addresses are built, how to call functions, the status codes and the tools are described in LumiScan Keryx.
Addresses
All addresses below start with hdvisionsystems/lumiscan-calibration/<module name>/.
| Function | Address | Permission | Meaning |
|---|---|---|---|
transform |
|
Read-Only |
|
|
Writable |
Requests a transform, see the handshake. |
|
|
Method |
Runs one transform and returns when it has finished. |
|
reset |
|
Read-Only |
|
|
Writable |
Requests a reset, see the handshake. |
|
|
Method |
Runs one reset and returns when it has finished. |
|
status |
|
Read-Only |
The status of the last function, see Status Code Values. |
|
Read-Only |
The same status as text. |
|
input |
|
Writable |
The |
|
Writable |
The |
|
|
Writable |
The |
|
|
Writable |
The |
|
output |
|
Read-Only |
The 3D coordinates of the point on |
|
Read-Only |
The |
|
|
Read-Only |
The |
|
|
Read-Only |
The |
|
|
Read-Only |
When the last transform finished, in whole seconds, by the clock of the device. |
|
|
Read-Only |
The milliseconds of that time, 0 to 999. |
|
|
Read-Only |
The microseconds of that time, 0 to 999. |
|
|
Read-Only |
Counts the transforms that finished, starting from |
|
|
Read-Only |
The module name. |
|
stream |
|
On every module; without a |
The application itself reports at hdvisionsystems/lumiscan-calibration/system/:
-
found-modules: the names of the modules it serves. -
status-text:"Initialized"once it serves its modules, or why it serves none. -
meta/subscription-schema: what the node a module’s stream subscribes to may hold, as a JSON Schema. See What a source may hold.
Transforming points
One transform converts the point on input/x-coordinate and input/y-coordinate and every
point of input/x-coordinate-array and input/y-coordinate-array. Leave the arrays empty to
convert one point only.
-
Write the inputs.
-
Start the transform with the handshake or with
control/transform/execute. -
When it has finished, read the outputs.
output/package-identifierhas grown by one.
Good to know:
-
control/transform/readyisfalsewhile the module has no lookup table. Correct the module configuration file or the TIFF file, then reset the module. -
If the two input arrays differ in length, the status is
-10001(inputXYSizeNotEqual). The single point is converted, but the output arrays, the timestamp andoutput/package-identifierare not written. -
A point outside the lookup table is not reported as an error: the result is a value from the edge of the table. Keep the points within the image the table was made for.
Reloading the settings
A reset reads the module configuration file and the TIFF file it names again, and the next
transform uses them. No restart of the application is needed. The reset also reads the stream
section again, its source and stream mode included, and sets control/subscribe/input/… to it.
-
If the reset succeeds, the status is
0andcontrol/transform/readyistrue. -
If it fails, for example because the TIFF file is missing, the status is
-2(invalidSetting) and the module has no lookup table:control/transform/readystaysfalseuntil a reset succeeds. The log says why. The module does not keep transforming with the old table, so that a corrected file is never mixed with an outdated one. -
A changed
streamsection is applied with the reset, see Configuring a stream. -
Loading the example table took about 30 ms on a PC. A larger table, or a ctrlX CORE, can take longer.
Execute methods
control/transform/execute and control/reset/execute run their function once and return when it
has finished. Write any value to them. The function uses the same inputs and writes the same outputs
and status as the handshake.
Whether the function could be started at all is reported by the write itself. A rejected write is never queued. The results are named below as on the ctrlX Data Layer; LumiScan Keryx reports the same results under its own names, see Results of a method call:
| Result | Meaning | What to do |
|---|---|---|
OK |
The function ran. Its outcome is on |
Read the status and the outputs. |
|
Another transform or reset of this module is running, through the handshake or another |
Retry. The same write succeeds once the running function finishes. |
|
|
Do not retry in a loop. Correct the cause first: for a missing table, correct the files and reset. |
|
The application is stopping. |
Wait for the application to start again. |
A running stream never makes an execute busy.
Status Code Values
control/status/code and control/status/text report the outcome of the last function. An error
status stays until the next request: a module that waits for its next request does not overwrite
it with 0. Codes 0 to -5 are the module status codes shared by the LumiScan applications,
see Status Codes and Results; -10001 is
LumiScan Calibration’s own.
| Status Code | String | Meaning |
|---|---|---|
0 |
|
The last function completed successfully, and the module is ready for the next one. |
1 |
|
The module is being initialized. |
2 |
|
A function is running. |
3 |
|
The module waits for the client to set |
-1 |
|
An unspecified error occurred. |
-2 |
|
The module configuration file or its TIFF file could not be loaded, so the module has no lookup table. Correct them, then reset the module. |
-3 |
|
One or more input values are invalid. |
-4 |
|
The required licence is not available. |
-5 |
|
The settings files were changed on the Data Layer: restart the application. See Settings on the Data Layer. |
-10001 |
|
|