Skip to content

Commit

Permalink
allow ngsiv2 entity array as multiplemeasure
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Nov 6, 2023
1 parent d4cad75 commit 265d844
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/bindings/HTTPBinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,17 @@ function handleIncomingMeasure(req, res, next) {
config.getLogger().debug(context, 'Parsing payloadDataArr %j for device %j', payloadDataArr, device);
for (const i in payloadDataArr) {
values = commonBindings.extractAttributes(device, payloadDataArr[i], device.payloadType);
attributeArr.push(values);
if (values[0][0]) {
// Check multimeasure from a ngsiv2 entities array
attributeArr = attributeArr.concat(values);
} else {
attributeArr.push(values);
}
}
} else {
attributeArr = [];
}
}

if (attributeArr.length === 0) {
finishSouthBoundTransaction(next);
} else {
Expand Down

0 comments on commit 265d844

Please sign in to comment.