Settings, Modules and Restart
Everything that is not about one module is under hdvisionsystems/<app>/system/. The apps come in two
families that handle their modules differently. The code readers have only system/meta/subscription-schema there (see Streams).
Cam Driver, AI Object Matching, Calibration: settings files
Their modules are the module files that the application settings file lists.
| Node | Kind | What it does |
|---|---|---|
|
string, read and write |
All loaded settings as one JSON document: the application file, with each listed module file
inlined (passwords shown as |
|
bool, read-only |
|
|
method |
stops the app and starts it again. The app’s nodes disappear until it is up: wait until
|
|
method, inputs |
writes |
|
method, input |
adds the file to, or removes it from, the application file’s list. The file stays. Needs a restart |
|
read-only |
the modules served; why none are |
The Cam Driver adds camera discovery: system/found-camera-modules, found-camera-serials,
found-camera-mac-addresses, found-camera-ip-addresses, and the system/force-ip/ handshake. AI
Object Matching serves one module at most: activate-module refuses a second.
Example - add the camera module camera2 to the Cam Driver:
-
Write the module’s JSON to
hdvisionsystems/lumiscan-cam-driver/system/control/create-module/input/contentandcamera2tocontrol/create-module/input/module-id, then callcontrol/create-module/execute. -
Write
camera2tocontrol/activate-module/input/module-id, then callcontrol/activate-module/execute. -
Call
hdvisionsystems/lumiscan-cam-driver/system/control/restart/execute.
A module file can also be changed on disk. AI Object Matching and Calibration read their module file
again on reset; otherwise a change applies at the next start.
Template Finder, Object Finder, Area Detector, Text Reader: modules at run time
Their modules are made and removed while the app runs.
| Node | Kind | What it does |
|---|---|---|
|
string[], read-only |
the modules now |
|
method, input |
a new module with default inputs, at once. Gone after a restart unless saved |
|
method, input |
removes the module |
|
method |
writes the module list into the application file, and deletes the input files of modules no longer in it |
|
method, input |
writes the module’s inputs to |
Each finder adds its own functions, for example Template Finder system/create-template and
system/set-template-dir, Text Reader system/set-tessdata-dir and system/refresh-languages. See
the app’s manual.
Note that create-module means two different things: in the settings-file apps a file applied at
the next restart, in the finders a live module lost at the next restart unless saved.
What is kept across a restart
| What | Kept |
|---|---|
A finder module’s inputs |
when saved with |
A finder app’s module list |
when saved with |
Settings of the Cam Driver, AI Object Matching and Calibration written to |
yes, applied at the next start |
Folders chosen at run time (template, object and tessdata folders) |
yes, saved automatically in the application file |
A consumer’s stream |
yes, see Streams |
The Cam Driver’s stream and the camera connection |
no: start them again after every start |
Values written to |
no: write them again |
There is no load method: nothing reads a saved file again without a restart, except the reset of
AI Object Matching and Calibration.