Configure 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

Feature: 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.

Feature: 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


  • The required functionalities of the model have already been designed. For details on designing model functionalities, refer to Model Design.

  • You must have permissions to create models and access the corresponding group. For more information, refer to Model Management Permission Allocation.

Create Model Elements


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

  1. Go to Models > Custom 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 Create, then choose to create Feature or Command based on your needs.

Create Attributes


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

    • Name: The name of the attribute.

    • Identifier: The unique identifier for the attribute.

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

    • 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.

Create Measurement Points


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

    • Name: The name of the measurement point.

    • Identifier: The unique identifier for the measurement point.

    • Measurement 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.


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

      • Quality Bit: 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.

Create Commands


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

    • Name: The name of the service.

    • Identifier: The unique identifier for the service.

    • Input Parameters: 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 Parameters: 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.

Reference Model Elements


Reference existing models and model elements, such as features, 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 > Custom Models 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 Feature, Command, or Component as needed.

  3. On the reference configuration page, select the required Feature, 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 Open Model as Component.

Edit Model Elements


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

  • Click … > Edit 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 > Feature or Command, check the elements to be modified, configure their attributes, and click Confirm.

Next


Configure Property Rules