Azure是否支持设备层次结构? [英] Is Azure support Hierarchy for Devices?

查看:52
本文介绍了Azure是否支持设备层次结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道Azure是否支持设备层次结构。


建立A


     └第5层


            └507室


                      ├温度传感器1


                      └温度传感器2


如果我们的系统管理建筑物,如果MS Azure支持层次结构,我可以计算温度传感器的平均值,然后向其他服务器请求http以获取该值。


W 母鸡的平均温度超过临界值,我向我的短信服务器请求,然后发送短信空调管理员。


但计算平均值应在ROOM内,因此层次结构应该是支持。


是否可以支持此方案?



提前致谢。

解决方案


一个逻辑应用程序完全支持Json消息,它可以是分层的。在您的情况下,json消息可以像这样的结构



{

  "建筑物":{

    "姓名":"A Tower",

    "房间":[

      {

        "姓名":"507",

        "传感器":[

          {

            "姓名":"传感器1",

            "价值":"35"&b
          },b $ b          {

            "姓名":"传感器2",

            "价值":"36"&b
          }¥b $ b        ]¥b $ b      },b $ b      {

        "姓名":"508",

        "传感器":[

          {

            "姓名":"传感器1",

            "价值":"35"&b
          },b $ b          {

            "姓名":"传感器2",

            "价值":"36"&b
          }¥b $ b        ]¥b $ b      }¥b $ b    ]¥b $ b  } b $ b}


然后你可以创建一个azure函数/逻辑应用程序,它接受一个房间json字符串作为输入并返回平均温度。你的主逻辑应用程序会将每个房间json传递到这个azure函数/逻辑应用程序,然后决定如何处理返回的
值。希望这是有道理的,或者你是在追求任何其他答案? 





Hi, I wonder if Azure support Device Hierarchy.

Building A

     └ Floor 5

            └ Room 507

                      ├ Temperature Sensor 1

                      └ Temperature Sensor 2

If our System manage a building, if MS Azure support hierarchy, i can calculate average value for temperature sensors, and then request http to other server for this value.

When the average temperature over the critical value, i request to my SMS server, then send a sms message to the Air Conditioning Administrator.

But the calculating average should be within a ROOM, so hierarchy should be support.

Is this scenario can be supported?

Thanks in advance.

解决方案

Hi,

A Logic app fully supports Json message which can be hierarchical anway. In your case the json message can be like this structure

{
  "Building": {
    "Name": "A Tower",
    "Rooms": [
      {
        "Name": "507",
        "Sensors": [
          {
            "Name": "Sensor1",
            "Value": "35"
          },
          {
            "Name": "Sensor2",
            "Value": "36"
          }
        ]
      },
      {
        "Name": "508",
        "Sensors": [
          {
            "Name": "Sensor1",
            "Value": "35"
          },
          {
            "Name": "Sensor2",
            "Value": "36"
          }
        ]
      }
    ]
  }
}

Then you can create an azure function/ logic app which accepts a room json string as an input and returns the average temperature. Your main logic app will pass each room json into this azure function/logic app and then decide what to do with the returned value. Hope this makes sense or you are after any other answer? 


这篇关于Azure是否支持设备层次结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆