Configuring Model Definition


Model elements define what a product is, what it can do, and the services it can provide externally. This file explains how to create or reference attributes, measurement points, commands, and other model elements, as well as components, in an already created model. Below are the model elements used in EnOS to define model functionalities:


Model Element

Description

Example

Property: Attribute

Describes the static attributes of a device. Users can customize the attribute name and identifier, where the name serves as a description and allows Chinese input.

Name, model, location, design parameters, longitude, etc.

Property: Measurement Point

Describes the device’s state during operation. Measurement Point allows users to customize the measurement point name and identifier, where the name serves as a description and allows Chinese input.

Temperature, pressure, current, voltage, various states, etc.

Command

Refers to capabilities or methods that can be invoked externally. Input and output parameters can be configured. Compared to attributes, commands can execute more complex business logic through a single instruction.

Issued instructions, executed jobs, etc.

Prerequisites


Creating Model Elements


Create entirely new model elements to define model properties and commands from scratch.

  1. Go to Models > Models Created in This OUs, then select the corresponding model’s Edit icon edit.

    Note

    When editing model elements of a shared model, you need to click the custom Custom Configuration button in the top-left corner to switch to the custom configuration interface before making changes. The effective configuration of a shared model = custom configuration + unchanged parts of the original configuration.

  2. On the Model Definition page, click Create, then choose to create Property or Command based on your needs.

Creating Attributes


  1. On the Create Property page, select Attribute under Type and configure the following information based on the interface instructions:

    • Name: The name of the attribute.

    • ID: The unique identifier for the attribute.

    • Data Type: The data type of the attribute. For more information, refer to Data Types of Models.

    • Description: A description of the attribute.

  2. Click Save to complete the creation of the attribute.

  3. Repeat the above steps to create additional attributes.

Creating Measurement Points


  1. On the Create Property page, select Measurement Point under Type and configure the following information based on the interface instructions:

    • Name: The name of the measurement point.

    • ID: The unique identifier for the measurement point.

    • Point Type: A required field Measurement Point Type is used to differentiate characteristics of measurement point data. During data storage, different types of measurement point data can be categorized. During data retrieval, different processing capabilities can be applied to various types of data. The descriptions of each measurement point type are as follows:

      • AI: Measurement point data of the AI type is generally numerical data and can be aggregated during data retrieval.

      • DI: Measurement point data of the DI type is typically device status data and supports change query during retrieval.

      • PI: Measurement point data of the PI type is usually power calculation data and can be aggregated during retrieval.

      • General: For measurement point data of other types besides the above, it is generally used for uploading non-numeric data.

      Note

      If measurement point data has already been uploaded, the measurement point type cannot be modified. Changing the measurement point type will make the previously stored historical data inaccessible.


    • Data Type: The available data types vary depending on the selected measurement point type.

      • AI: The available data types are enum, integer, float, and double.

      • DI: The available data types are enum and integer.

      • PI: Only the double data type is available.

      • General: The available data types include date, dateTime, integer, float, double, enum, string, array, map, and object.

      For more information, refer to Data Types of Models.


    • Quality Indicator: Specifies whether the measurement point value represents data quality. If set to Yes, configure as follows:

      • Quality Indicator: The system uses a predefined array-based data quality indicator that cannot be modified. You can click View to see predefined quality bit parameters and descriptions.

      • Value: Specifies the data type for the measurement point. The supported types are integer, float, and double.


    • Description: A description of the measurement point.


2. Click Save to create the measurement point.

3. Repeat the above steps to create additional measurement points.

Creating Commands


  1. On the Create Command page, select Command under Type and configure the relevant information as follows:

    • Name: The name of the service.

    • ID: The unique identifier for the service.

    • Input Parameter: Specifies input parameters for the service, including whether the parameter requires a value during invocation, its maximum/minimum value, and a default value if the parameter is required but not provided.

    • Output Parameter: Defines the return results after the command execution, specifying whether a value is required for the parameter, the value type, range, and default value.

    • Description: A description of the service.


  2. Click Save to create the command.

  3. Repeat the above steps to create additional commands.

Referencing Model Elements


Reference existing models and model elements, such as properties, commands, and components, to avoid redundant work. Before starting, ensure that the required model elements are already configured in the model element library.

  1. Go to Models > Models Created in This OU or Shared Models, then select the corresponding model’s Edit icon edit.

    Note

    When editing model elements of a shared model, you need to click the custom Custom Configuration button in the top-left corner to switch to the custom configuration interface before making changes. The effective configuration of a shared model = custom configuration + unchanged parts of the original configuration.

  2. On the Model Definition page, click next to Create and choose to reference Property, Command, or Component as needed.

  3. On the reference configuration page, select the required Property, Command, or Component and click Next or Confirm.


Once a model is published as a Component, it can be referenced when configuring other models. The model elements within the component will be brought into the custom model. For detailed steps, see Opening Model as Component.

Editing Model Elements


On the model details page, select the Model Definition tab to edit model elements:

  • Click … > Customize Basic Information to modify basic model information.

  • Click delete to delete model elements.

  • Click edit to edit model elements.

  • To edit additional model elements in a shared model, switch to Custom Configuration in the top-left corner custom, then select Edit > Property or Command, check the elements to be modified, configure their attributes, and click Confirm.

Next


Configuring Property Rules