Definition of Specification Configuration Files

Configuration Files

DEVM in the OM SDK models device management based on the module and device architectures. An edge product contains multiple modules, and a module can manage multiple devices. For example, as an edge product, Atlas 500 A2 edge stationA500 A2 edge station contains multiple modules such as the CPU, NPU, and mainboard.

Developers can define the product and module information in the configuration file for the adaptation of the module drivers. A group of configuration files consists of a product specification configuration file and several module specification configuration files.

Key Parameters

The following tables describe the key parameters in a product specification configuration file and module specification configuration file.

Table 1 Product parameters

Parameter

Mandatory/Optional

Description

name

Mandatory

Product name.

modules

Mandatory

Product module dictionary.

module_name

Mandatory

Module name, which must be unique.

devices

Mandatory

Device list. The device name must contain 1 to 127 characters, including letters, digits, spaces, hyphens (-), and underscores (_).

Table 2 Module parameters

Parameter

Mandatory/Optional

Description

name

Mandatory

Module name, which must be unique.

id

Mandatory

Module ID, which must be unique.

category

Mandatory

Module type. The options are as follows:
  • internal: built-in module
  • addition: extended module

Modules obtained through secondary development are classified as extended modules (addition).

driver

Mandatory

Path of the module driver (DLL). The default installation path of a driver is /usr/local/lib. If the driver file name of a custom module is libxxx.so, set the path to /usr/local/lib/libxxx.xo.

dynamic

Mandatory

Device's support for dynamic insertion and removal. true for support, and false for no support.

attributes

Mandatory

A key-value structured table of attributes supported by a module. A key represents an attribute name, while the value is another table containing key attribute information. For details, see Table 3.

Table 3 Module attribute parameters

Parameter

Mandatory/Optional

Description

id

Mandatory

Attribute ID, which is a positive integer and different from other attribute IDs at the same level.

type

Mandatory

Data type. The options are as follows:
  • string
  • int
  • long long
  • float
  • bool
  • json

accessMode

Mandatory

Access mode.
  • Read: read-only
  • ReadWrite: read and write
  • Write: write-only
  • ReadHide: read-only. The attribute value is not displayed in plaintext on the web page.
  • WriteHide: write-only. The attribute value cannot be modified in plaintext on the web page.
  • ReadWriteHide: read and write. The attribute value cannot be displayed or modified in plaintext on the web page.
NOTE:
  • You are advised to use a "Hide" access mode for attributes involving sensitive data.
  • For the attribute of the bool type, "Hide" access modes are not allowed.

description

Optional

Attribute description.