Fiware上下文代理:我们可以订阅所有上下文更新吗?

Fiware上下文代理:我们可以订阅所有上下文更新吗?,fiware,fiware-orion,fiware-cygnus,Fiware,Fiware Orion,Fiware Cygnus,我正在使用Fiware cygnus订阅orion上下文代理实体。 是否可以用一个脚本订阅所有上下文更新? 我不想一个接一个地做。 以下是订阅的一个示例: (curl 192.168.1.79:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Fiware-Service: test' --header 'Fi

我正在使用Fiware cygnus订阅orion上下文代理实体。 是否可以用一个脚本订阅所有上下文更新? 我不想一个接一个地做。 以下是订阅的一个示例:

(curl 192.168.1.79:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Fiware-Service: test' --header 'Fiware-ServicePath: /testPath' -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "room",
            "isPattern": "false",
            "id": "temperature"
        }
    ],
    "attributes": [
        "tmpValue"
    ],
    "reference": "http://192.168.1.40:5050/notify",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "tmpValue"
            ]
        }
    ],
    "throttling": "PT1S"
}
EOF

(curl 192.168.1.79:1026/v1/subscribeContext-s-s-header'Content Type:application/json'-header'Accept:application/json'-header'Fiware Service:test'-header'Fiware ServicePath:/testPath'-d@-| python-mjson.tool)您可以使用以下命令订阅任何实体中的更改:

{
    "entities": [
        {
            "type": "",
            "isPattern": "true",
            "id": ".*"
        }
    ],
    "attributes": [ ],
    "reference": "http://192.168.1.40:5050/notify",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "tmpValue"
            ]
        }
    ],
    "throttling": "PT1S"
}
这样,通知将包括实体的所有属性,并且每次
tmpValue
属性更改时都会生成通知。目前(Orion 0.23.0)您无法订阅任何属性的更改(您需要知道订阅时要监视的属性列表),但计划将其作为未来的功能


编辑:自Orion 0.27.0以来,您可以订阅任何属性的更改。为此,订阅是否省略了
condValues
字段(或使用空数组
[]
作为值)。

这样猎户座就不能自动与天鹅座通话了?示例:IoAgent和orion。所有设备和值更改都会自动从IoAgent发送到Orion。只要在IoAgent中配置上下文代理ip,Orion就可以使用NGSI10通知与Cygnus“对话”,只要启用此类通知的订阅已配置且与IoAgent使用的实体/属性一致。为了触发通知,您可以列举IoTAgent使用的属性列表。如何将事件从Orion订阅到CEP?我认为最好在单独的问题中提问,以免“混合”答案。请不要忘记在这个新问题中提到哪个CEP实现。谢谢此功能有任何更新(从天鹅座订阅所有猎户座实体)?是否有一个固定的版本可以实现它?谢谢