Scanner - a module that analyzes a bus and connected device. Connected devices are formed in a list. A module for a selected device is downloaded from the store and becomes available in i3 lite.
The structure of scanner work:
- A scanner is downloaded from the store;
- A user enters scanner parameters (IP, Port, etc.) these parameters are sent to the scanner script;
- After processing the input parameters, a scanner send requests to the bus to find devices ;
- The found devices are formed in a list;
- When a device in the list is selected, a scanner sends the parameters fo the selected device to a module.
Consider the following when developing a scanner:
- Scanner parameters when addign from the store;
- Scanner logics;
- Sending parameters of the selected device to the module;
- Module logics with reference to the parameters received from the scanner.
Scanner development is identical to developing a module. A graphic part and a script with logics have to be created for a scanner.
The main difference is that a scanner can work only on a control panel, it is never launched on a server. That's why there is no need to separate driver script from interface script.
When a scanner is developed, new logics of work appears. First, create a module to control a device. Then upload the module to the store of modules. When a module is uploaded, you see the unique ID of the module.
When you develop a scanner, write a script with the following logics:
- Creating a driver
- Searching equipment
- If equipment is not found, determine what equipment it is
- With the help of ModuleSetupFinish command (module ID, js object with setup settings of this module)
After this, the app downloads a module from the store and installs it.
