NGSI Source
このカスタム・ノードは、NGSIv2 エンティティを取得できるノードです。

プロパティ

name: ノード・インスタンスの名前Context Broker: Context Broker のエンドポイントServicePath: FIWARE Service PathRepresentation:normalizedまたはkeyValuesEntity type: 読み取り対象となるエンティティ・タイプID pattern: 読み取り対象となるエンティティの id パターンAttrs: 読み取り対象となるエンティティの属性のリストQuery: Simple Query Language を使用したクエリ条件Buffering: 取得したすべてのエンティティを一度に出力するかどうかDecode forbidden chars:offまたはon
入力
payload JSON Object
msg.payload には、NGSIv2 エンティティを取得するためのクエリ条件が含まれている必要があります。
{
"idPattern": ".*",
"type": "T",
"attrs": [
"humidity"
],
"q": "temperature>29",
"keyValues": true
}
出力
payload JSON Array
msg.payload には NGSIv2 エンティティが含まれます。
statusCode Number
A msg.statusCode contains a status code.
200
例
入力 1
{
"idPattern": ".*"
}
出力 1
[
{
"id": "E1",
"type": "T",
"humidity": {
"type": "Number",
"value": 51,
"metadata": {}
},
"temperature": {
"type": "Number",
"value": 25,
"metadata": {}
}
},
{
"id": "E2",
"type": "T",
"humidity": {
"type": "Number",
"value": 50,
"metadata": {}
},
"temperature": {
"type": "Number",
"value": 30,
"metadata": {}
}
}
]
入力 2
{
"type": "T",
"attrs": [
"humidity"
]
}
出力 2
[
{
"id": "E1",
"type": "T",
"humidity": {
"type": "Number",
"value": 51,
"metadata": {}
}
},
{
"id": "E2",
"type": "T",
"humidity": {
"type": "Number",
"value": 50,
"metadata": {}
}
}
]
入力 3
{
"type": "T",
"q": "temperature>29"
}
出力 3
[
{
"id": "E2",
"type": "T",
"humidity": {
"type": "Number",
"value": 50,
"metadata": {}
},
"temperature": {
"type": "Number",
"value": 30,
"metadata": {}
}
}
]
入力 4
{
"type": "T",
"q": "temperature>29",
"keyValues": true
}
出力 4
[
{
"id": "E2",
"type": "T",
"humidity": 50,
"temperature": 30
}
]