【发布时间】:2015-11-12 10:28:54
【问题描述】:
Orion 是否支持订阅限制?前任。我只想在温度 > 30 时接收上下文更新
【问题讨论】:
-
到目前为止你有没有尝试过?
-
我在三月份尝试过旧版本的 Orion。不知道这个功能有没有实现(在API里面)。
标签: fiware fiware-orion
Orion 是否支持订阅限制?前任。我只想在温度 > 30 时接收上下文更新
【问题讨论】:
标签: fiware fiware-orion
该功能未在 NGSIv1 中实现,但计划在 NGSIv2 中实现(请参阅 the NGSIv2 draft specification“订阅”中的 conditions 字段)。但是,在撰写本文时(0.25.0),它尚未在 Orion 的最新版本中实现。
编辑:这个功能终于在 Orion 0.27.0 中实现了,例如:
POST /v2/subscriptions
...
{
"subject": {
"entities": [
{
"idPattern": ".*",
"type": "device"
}
],
"condition": {
"attributes": [ "temperature" ],
"expression": {
"q": "temperature>30"
}
}
},
"notification": {
"callback": "http://foo.bar:5050/notify",
"attributes": [ ]
},
"expires": "2050-04-05T14:00:00.00Z"
}
【讨论】: