Recognized USM Messages

Epina ImageLab recognizes and interprets a small set of messages received from the user supplied module. The messages are multi-line strings of which the first line always contains the command followed by one or several parameters:

Message Parameters Explanation & Details
DoneExit 2. line: error number (see below) The USM signals that it has successfully finished its task and has closed itself. Epina ImageLab takes over control again and deletes the semaphore of the killed USM (both files).
Help 2. line contains help topic The USM asks Epina ImageLab to open the help file and show the topic specified in the second line of the message.
Status 2. line contains progress status (integer percent done)
3. line may contain optional status message
The USM indicates that it is working on its task. Epina ImageLab uses the STATUS message to display the current processing status on its status bar.
PushMat 2. line: the filename of the data matrix to be pushed on the matrix stack This messages allows to store any kind of two-dimensional matrices (TDouble2DArray) in the matrix stack (global variable MatStack). When Epina ImageLab receives this message it tries to read the specified data matrix and pushes it on the MatStack stack. You can access the stack after the USM has finished operation and further process the output from the USM. Please take care to set the size of the stack by setting the MaxSize property before calling the USM (by default the maximum stack size is 20).
AddToRepos 2. line: the filename of the data matrix to be loaded as repository image This messages allows to load a data matrix (TDouble2DArray) into the image repository.

The DONEEXIT message uses the following predefined error numbers:

Symbol Value Explanation
ERR_NONE 0 No error occurred, the process finished successfully
ERR_KILLED 1 The process has been aborted by the KILL command.
ERR_NODATA 2 The USM cannot access the data file (as specified in the file USMNAME_basicinfo.xml)
ERR_CALC 3 A general computational error (e.g. math) occurred. Details are specified in the clear text error description. Epina ImageLab displays an error message together with the clear text description and aborts the script.
ERR_USERABORT 4 The USM process has been aborted by the user (e.g. by clicking an "abort" button in the user interface of the USM).
(ERR_RESERVED) 5...99 Reserved error numbers for future extensions
(ERR_USER) 100 and greater User defined error numbers which are specific to a particular USM. User defined errors are processed by Epina ImageLab the same way as an ERR_CALC error.