我是靠谱客的博主 无心导师,最近开发中收集的这篇文章主要介绍阿里云物联网(IoT)物模型数据规格定义,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

"specs": { 
  "min": "参数最小值(int、float、double类型特有)", 
  "max": "参数最大值(int、float、double类型特有)", 
  "unit": "属性单位(int、float、double类型特有,非必填)", 
  "unitName": "单位名称(int、float、double类型特有,非必填)", 
  "size": "数组元素的个数,最大512(array类型特有)。", 
  "step": "步长(text、enum类型无此参数,int、float、double类型特有)", 
  "length": "数据长度,最大10240(text类型特有)。",
  "0": "0的值(bool类型特有)", 
  "1": "1的值(bool类型特有)", 
  "item": { 
    "dataType": "数组元素的类型(array类型特有)"
    } 
  
}
"dataType": {
			"type": "array",
			"specs": {
				"size": "1000",
				"item": {
					"dataType": {
						"type": "text",
						"specs": {
							"rule": "",
							"length": 32
						}
					}
				}
			}
		}
	}

示例:

"dataType":{ 
  "type": "array", 
  "specs": { 
    "size": "200", 
    "item": { 
      "dataType": { 
        "type": "struct", 
        "specs": [
          { 
            "identifier": "sn", 
            "ref": 1, "name": "设备序列号", 
            "description": "", 
            "dataType": { 
              "type": "text", 
              "specs": { 
                "rule": "", 
                "length": "64" 
              } 
            } 
          }, 
          { 
            "identifier": "desc", 
            "ref": 2, 
            "name": "设备描述", 
            "description": "", 
            "dataType": { 
              "type": "text", 
              "specs": { 
                "rule": "", 
                "length": "64"
              }
            }
          }, 
          { 
            "identifier": "version", 
            "ref": 3,
            "name": "设备版本", 
            "description": "", 
            "dataType": { 
              "type": "int", 
              "specs": { 
                "range": [1, 255], 
                "unit": "", 
                "unitName": "", 
                "step": "1"
              }
            }
          }
          ]
      }
    } 
  }
}
{
    "specs": [
        {
            "dataType": {
                "specs": {
                    "step": 1
                },
                "type": "date"
            }
        },
        {
            "dataType": {
                "specs": {
                    "length": 128,
                    "rule": ""
                },
                "type": "text"
            }
        },
        {
            "dataType": {
                "specs": [
                    {
                        "dataType": {
                            "specs": {
                                "unit": "min",
                                "range": [
                                    1,
                                    2
                                ],
                                "step": 1
                            },
                            "type": "int"
                        }
                    }
                ],
                "type": "struct"
            }
        }
    ],
    "type": "struct"
}

最后

以上就是无心导师为你收集整理的阿里云物联网(IoT)物模型数据规格定义的全部内容,希望文章能够帮你解决阿里云物联网(IoT)物模型数据规格定义所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(69)

评论列表共有 0 条评论

立即
投稿
返回
顶部