Model of control object

Model of control object is a formalized representation of devices logic and hardware functions managing the object of control. The model has a tree-like structure containing subsystems, arguments, events and actions.

A fundamental assignment of model consists in increasing of an abstraction level from protocols and hardware realization to legible, human-transparent names of the object functions that makes the work of a programmer easier relieving from the necessity to explore the protocol. The data processed in this way take a shape of the RESTful API request in json format which is handy for mobile applications developers.

The device model figures in processes of data serialization and deserialization, data normalization, interface rendering, also in scenarios of automation designing.

There is no need to create the model for every one of the same type objects. Once created model may be used for both one and several objects if they keep a similar set of identified parameters and executed functions.

Parameters of device model

The process of control object model configuring consists in model parameters definition in the form of the next tree-like structure nodes:

Interconnection between the model and the basic protocol

In establishing new commands, parameters and events in the model, "inheritance" is always performed from the basic protocol. To create a new command, it is necessary to "inherit" from the basic command of the protocol on which the device operates, and enter the arguments with which the one or several commands will execute. In a similar way, it works for the events and the parameters. For example, if data is transmitted from the device to the platform and back via the MQTT protocol, it is necessary to specify the data source for the arguments. In case of MQTT this source is called a topic by which the data is transmitted.

For the convenience of subsequent use of the model parameters newly created, it is better to give them associative names. The identifier of the parameter is applied for normalization in json as an argument key. Eventually, the structure of data acquired as a result of the normalization will correspond with the model structure.

Due to the models, the hardware operating according to different protocols, but installed in the similar objects of control, may be used in one scenario of automation. Comparing identifiers of nodes with the models structures, the platform will normalize data in equivalent json objects.

Model configuring

The process of model configuring represents a creation of a tree-like structure consisting of parameters. At the same time, the parameters are set from basic functions of the protocol by which the device works.

Configuring of the model for specified protocols is considered in the section of examples.

ATTENTION! If a user does not have appropriate access rights to the device model which is assigned to the control object, the rendering of interfaces associated with the data viewing will not be performed.

The virtual model creation of a physical device includes the next steps:

  1. To enter the "Models" menu.
  2. To invoke the dialogue box of the control objects model creation.

scheme

Following that, it is necessary to fill the next fields:

The model of widely spread protocols, such as MQTT, offers a structure just for instance, in any case, the user will have to modify it for yourself. In event of a proprietary protocol, for example, Wialon IPS, the model already represents the structure ready for using.

After clicking the "Create" button, a new model will be created. Now the user can start to configure it.

By default the created model will looks like this:

scheme

The external software modules are added in the model by default. They represent the list of pre-established functions that describe a business process in a logic template. The external software modules include:

Parameters of model nodes

Any node of model may be deactivated by deselecting check box. After that, the system will stop to process the node.

It is possible to add new parameters by clicking on "+" icon. Notably, the new parameter will be a branch from the node from which building of this parameter occurred (i. e. the new node will be lower on one level then initial). Besides that, the parameter can be deleted or the analogous one can be created by coping. All nodes of the structure are free to rename.

scheme

Common parameters

Argument

The "On parse" and "Display" tabs open the additional fields.

scheme

Action