云端会校验设备上报数据中的所有字段,仅流转校验通过的数据。

校验通过的数据展示在设备平台控制台对应设备的设备详情页物模型数据页签。校验不通过的数据则不展示。

事件/行为若未设置任何输入/输出参数,则仅留存数据,不会进行校验。

校验字段

{
    "schema": "物模型结构定义的访问URL。",
    "profile": {
        "productId": "当前产品的productId",
          "version": "产品物模型版本"
    },
    "properties": [
        {
            "identifier": "属性唯一标识符(物模型模块下唯一)。", // 校验
            "name": "属性名称",
            "desc": "事件描述。",
            "nid": "数字标识符(物模型模块下唯一)",
        "accessMode": "属性读写类型:读(r)、写(w)、上报(rp)。",
            "dataType": {
                "type": "属性类型: int32、float、bool、enum、string、timestamp、array、struct(下面使用"specs":[{}]描述包含的对象)", // 强校验
                "specs": {
                    "min": "参数最小值(int32、float类型特有)。", // 校验
                    "max": "参数最大值(int32、float类型特有)。", // 校验
                    "unit": "属性单位(int32、float类型特有)。",
                    "init": "初始化值(int32、float类型特有)。",
                    "step": "步长(int32、float类型特有)。",
                    "size": "数组元素的个数,最大512(array类型特有)。", // 校验
                    "maxLength": "数据长度(text类型特有)。", // 校验
                    "0": "0的值(bool类型特有)。", // 校验
                    "1": "1的值(bool类型特有)。", // 校验
                    "item": {
                        "type": "数组元素的类型(array类型特有)。" // 校验
                    }
            }
            }
        }
    ],
    "events": [
        {
            "identifier": "事件唯一标识符(物模型模块下唯一)。", // 校验
            "name": "事件名称。",
            "desc": "事件描述。",
            "type": "事件类型(info、alert、error)。", // 校验
            "outputData": [
                {
                    "identifier": "参数唯一标识符。", // 校验
                    "name": "参数名称。",
                    "dataType": {
                        "type": "属性类型: int32、float、bool、enum、string、timestamp、array、struct(下面使用"specs":[{}]描述包含的对象)", // 强校验
                        "specs": {
                            "min": "参数最小值(int32、float类型特有)。", // 校验
                            "max": "参数最大值(int32、float类型特有)。", // 校验
                            "unit": "属性单位(int32、float类型特有)。",
                            "init": "初始化值(int32、float类型特有)。",
                            "step": "步长(int32、float类型特有)。",
                             "size": "数组元素的个数,最大512(array类型特有)。",  // 校验
                             "maxLength": "数据长度(text类型特有)。",  // 校验
                            "0": "0的值(bool类型特有)。", // 校验
                            "1": "1的值(bool类型特有)。", // 校验
                           "item": {
                                "type": "数组元素的类型(array类型特有)。" // 校验
                            }
                         }
                    }
                }
            ]
        }
    ],
    "actions": [
        {
            "identifier": "行为唯一标识符(物模型模块下唯一)。", // 校验
            "name": "行为名称。",
            "desc": "行为描述。",
            "inputData": [
                {
                    "identifier": "入参唯一标识符。",  // 校验
                    "name": "入参名称。",
                    "dataType": {
                        "type": "属性类型: int32、float、bool、enum、string、timestamp、array、struct(下面使用"specs":[{}]描述包含的对象)", // 强校验
                        "specs": {
                            "min": "参数最小值(int32、float类型特有)。", // 校验
                            "max": "参数最大值(int32、float类型特有)。", // 校验
                            "unit": "属性单位(int32、float类型特有)。",
                            "init": "初始化值(int32、float类型特有)。",
                            "step": "步长(int32、float类型特有)。",
                            "size": "数组元素的个数,最大512(array类型特有)。", // 校验
                            "maxLength": "数据长度(text类型特有)。", // 校验
                            "0": "0的值(bool类型特有)。", // 校验
                            "1": "1的值(bool类型特有)。", // 校验
                            "item": {
                                "type": "数组元素的类型(array类型特有)。" // 校验
                            }
                          }
                        }
                    }
            ],
            "outputData": [
                {
                    "identifier": "出参唯一标识符。", // 校验
                    "name": "出参名称。",
                    "dataType": {
                        "type": "属性类型: int32、float、bool、enum、string、timestamp、array、struct(下面使用"specs":[{}]描述包含的对象)", // 强校验
                        "specs": {
                            "min": "参数最小值(int32、float类型特有)。", // 校验
                            "max": "参数最大值(int32、float类型特有)。", // 校验
                            "unit": "属性单位(int32、float类型特有)。",
                            "init": "初始化值(int32、float类型特有)。",
                            "step": "步长(int32、float类型特有)。",
                            "size": "数组元素的个数,最大512(array类型特有)。",  // 校验
                             "maxLength": "数据长度(text类型特有)。", // 校验
                            "0": "0的值(bool类型特有)。", // 校验
                            "1": "1的值(bool类型特有)。", // 校验
                            "item": {
                                "type": "数组元素的类型(array类型特有)。" // 校验
                            }
                         }
                    }
                }
            ]
        }
    ]
}
 创建时间:2023-05-11 20:25
最后编辑:陈勇琦  更新时间:2024-10-18 10:58