|
32 | 32 | - [Measurement transformation order](#measurement-transformation-order) |
33 | 33 | - [Multientity measurement transformation support (`object_id`)](#multientity-measurement-transformation-support-object_id) |
34 | 34 | - [Timestamp Processing](#timestamp-processing) |
| 35 | + - [Multimeasure support](#multimeasure-support) |
35 | 36 | - [Overriding global Context Broker host](#overriding-global-context-broker-host) |
36 | 37 | - [Multitenancy, FIWARE Service and FIWARE ServicePath](#multitenancy-fiware-service-and-fiware-servicepath) |
37 | 38 | - [Secured access to the Context Broker](#secured-access-to-the-context-broker) |
@@ -1051,6 +1052,127 @@ Some additional considerations to take into account: |
1051 | 1052 | measure of after a mapping, as described in the previous bullet) then it is refused (so a failover to server |
1052 | 1053 | timestamp will take place). |
1053 | 1054 |
|
| 1055 | +## Multimeasure support |
| 1056 | + |
| 1057 | +A device could receive several measures at the same time. |
| 1058 | + |
| 1059 | +For example: |
| 1060 | + |
| 1061 | +```json |
| 1062 | +[ |
| 1063 | + { |
| 1064 | + "vol": 0 |
| 1065 | + }, |
| 1066 | + { |
| 1067 | + "vol": 1 |
| 1068 | + }, |
| 1069 | + { |
| 1070 | + "vol": 2 |
| 1071 | + } |
| 1072 | +] |
| 1073 | +``` |
| 1074 | + |
| 1075 | +In this case a batch update (`POST /v2/op/update`) to CB will be generated with the following NGSI v2 payload: |
| 1076 | + |
| 1077 | +```json |
| 1078 | +{ |
| 1079 | + "actionType": "append", |
| 1080 | + "entities": [ |
| 1081 | + { |
| 1082 | + "id": "ws", |
| 1083 | + "type": "WeatherStation", |
| 1084 | + "vol": { |
| 1085 | + "type": "Number", |
| 1086 | + "value": 0 |
| 1087 | + } |
| 1088 | + }, |
| 1089 | + { |
| 1090 | + "id": "ws", |
| 1091 | + "type": "WeatherStation", |
| 1092 | + "vol": { |
| 1093 | + "type": "Number", |
| 1094 | + "value": 1 |
| 1095 | + } |
| 1096 | + }, |
| 1097 | + { |
| 1098 | + "id": "ws", |
| 1099 | + "type": "WeatherStation", |
| 1100 | + "vol": { |
| 1101 | + "type": "Number", |
| 1102 | + "value": 1 |
| 1103 | + } |
| 1104 | + } |
| 1105 | + ] |
| 1106 | +} |
| 1107 | +``` |
| 1108 | + |
| 1109 | +Moreover if a multimeasure contains TimeInstant attribute, then CB update is sorted by attribute TimeInstant: |
| 1110 | + |
| 1111 | +For example: |
| 1112 | + |
| 1113 | +```json |
| 1114 | +[ |
| 1115 | + { |
| 1116 | + "vol": 0, |
| 1117 | + "TimeInstant": "2024-04-10T10:15:00Z" |
| 1118 | + }, |
| 1119 | + { |
| 1120 | + "vol": 1, |
| 1121 | + "TimeInstant": "2024-04-10T10:10:00Z" |
| 1122 | + }, |
| 1123 | + { |
| 1124 | + "vol": 2, |
| 1125 | + "TimeInstant": "2024-04-10T10:05:00Z" |
| 1126 | + } |
| 1127 | +] |
| 1128 | +``` |
| 1129 | + |
| 1130 | +In this case a batch update (`POST /v2/op/update`) to CB will be generated with the following NGSI v2 payload: |
| 1131 | + |
| 1132 | +```json |
| 1133 | +{ |
| 1134 | + "actionType": "append", |
| 1135 | + "entities": [ |
| 1136 | + { |
| 1137 | + "id": "ws", |
| 1138 | + "type": "WeatherStation", |
| 1139 | + "vol": { |
| 1140 | + "type": "Number", |
| 1141 | + "value": 2 |
| 1142 | + }, |
| 1143 | + "TimeInstant": { |
| 1144 | + "type": "DateTime", |
| 1145 | + "value": "2024-04-10T10:05:00Z" |
| 1146 | + } |
| 1147 | + }, |
| 1148 | + { |
| 1149 | + "id": "ws", |
| 1150 | + "type": "WeatherStation", |
| 1151 | + "vol": { |
| 1152 | + "type": "Number", |
| 1153 | + "value": 1 |
| 1154 | + }, |
| 1155 | + "TimeInstant": { |
| 1156 | + "type": "DateTime", |
| 1157 | + "value": "2024-04-10T10:10:00Z" |
| 1158 | + } |
| 1159 | + }, |
| 1160 | + { |
| 1161 | + "id": "ws", |
| 1162 | + "type": "WeatherStation", |
| 1163 | + "vol": { |
| 1164 | + "type": "Number", |
| 1165 | + "value": 0 |
| 1166 | + }, |
| 1167 | + "TimeInstant": { |
| 1168 | + "type": "DateTime", |
| 1169 | + "value": "2024-04-10T10:15:00Z" |
| 1170 | + } |
| 1171 | + } |
| 1172 | + ] |
| 1173 | +} |
| 1174 | +``` |
| 1175 | + |
1054 | 1176 | ## Overriding global Context Broker host |
1055 | 1177 |
|
1056 | 1178 | **cbHost**: Context Broker host URL. This option can be used to override the global CB configuration for specific types |
|
0 commit comments