Материал из Module developer
Перейти к: навигация, поиск

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:

  1. A scanner is downloaded from the store;
  2. A user enters scanner parameters (IP, Port, etc.) these parameters are sent to the scanner script;
  3. After processing the input parameters, a scanner send requests to the bus to find devices ;
  4. The found devices are formed in a list;
  5. 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:

  1. Creating a driver
  2. Searching equipment
  3. If equipment is not found, determine what equipment it is
  4. 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.