Creating a Model¶
A model is an abstraction of product features, which defines what the product is, what it can do, and what services it provides. This section describes how to create a model.
Task description¶
Configure the relevant features in EnOS Edge according to the defined object model.
Attribute
Measurement point
Service
Event
Step 1: creating a model¶
Select Model in EnOS Management Console.
Click New Model at the top right of the page and configure the fields in the pop-up page. Among the fields,
Category: you can fill in product information such as manufacturer, device model, etc.
Create from: you can choose No, Clone or Inherit.
Click OK.
Step 2: defining features for model¶
Click on corresponding to the model to define features.
Select Feature Definition tab, click Edit, and then click Add > Create Custom Feature.
Creating Custom Features¶
After clicking Create Custom Feature, you can add custom feature definitions through the pop-up page.
Adding Attributes¶
On the Add Feature page, select Attribute in Feature Type, and configure the fields accordingly:
Data Type: data type of the attribute
Date: the format of date is yyyy-MM-dd HH:mm:ss
File: file type, value is the file path in URI format
Click OK.
Repeat the steps above to create more attributes.
Note
You can define maximum 200 attributes for a model
Adding Measurement Points¶
The configuration in the measurement point page is as follows:
On the Add Feature page, select measurement point in Feature Type, and configure the fields accordingly.
Point Type: mandatory field. The point type is used to distinguish the different characteristics of measurement point data. When storing data, different types of measurement point data can be classified and stored. When reading data, different processing capabilities are provided for different types of data. The description of point type is as follows:
AI: AI type measurement point data is generally numerical data, and the data can be aggregated when reading data
DI: DI type measurement point data is generally equipment status data, and the data can be queried when reading data
PI: PI type measurement point data is generally power calculation data, which can be aggregated when reading data
General: other types except the above, it is generally used to load non-numerical data
Note
If the measurement point data has been stored in TSDB, the point type cannot be modified. The change of point type will cause the stored historical data to be unable to query.
Quality Indicator: whether the measurement point value represents the data quality. If set to Yes, the configuration is as follows:
Quality indicator: the system uses a predefined array of data quality indicators, which cannot be changed. You can click View to get the predefined quality indicators and descriptions.
Value: data type of the measurement point. Only int, float and double are allowed.
Click OK to create the measurement point.
(Optional) Repeat the above steps to create more measurement points.
..note:: After creating a new measurement point, you need to configure the storage policy for the measurement point data.
Adding Services¶
On Add Feature page, select Service in Feature Type, and configure the fields accordingly.
Click OK.
(Optional) Repeat the above steps to create more services.
Note
You can create maximum 50 services for a model.
Adding Events¶
On Add Feature page, select Event in Feature Type, and configure the fields accordingly.
Severity
Message: notification sent by the device, such as the notification of task completion.
Warning: the events reported by a running device that may affect the normal operation of the device. These events have high priority. You can take actions or perform further data analysis based on the warning level.
Error: emergency or abnormality reported by a running device that causes the device to fail to operate normally. These events have the highest priority. You need to take actions or perform further data analysis based on the error level.
Click OK.
Note
You can create maximum 50 events for a model.
Publishing Feature Definitions¶
After adding all the feature definitions, click Publish to publish.
Step 3: (optional) adding a tag¶
A tag describes the common information shared by models of the same category. It is used to distinguish the model object in terms of domain, type, scope and so on. For example, you can add a domain:solar tag to indicate that the model belongs to solar domain.
Find the target model from the model list and click .
Click Edit in the Tags section under Basic Information.
In the pop-up window, click New Tag and enter the key-value pair (key:value) for the new tag.
Click OK to save the tag.
Result¶
After completing model feature definition, the system will automatically generate the model of the product in JSON format.