iotagent-json icon indicating copy to clipboard operation
iotagent-json copied to clipboard

send update for multiple measures

Open AlvaroVega opened this issue 9 months ago • 7 comments

fix for https://github.com/telefonicaid/iotagent-json/issues/825 and needs https://github.com/telefonicaid/iotagent-node-lib/pull/1607

  • [x] Mock tests about multiple measures should be updated (now instead of several /v2/op/update just one is sent)

AlvaroVega avatar May 06 '24 09:05 AlvaroVega

Functional tests (which I think "live" in the iotagent-node-lib repository) should be expanded to take into account the new functionality? @mapedraza what do you think?

fgalan avatar May 06 '24 11:05 fgalan

Functional tests (which I think "live" in the iotagent-node-lib repository) should be expanded to take into account the new functionality? @mapedraza what do you think?

It seems it has been taken into account (see https://github.com/telefonicaid/iotagent-node-lib/pull/1607#issue-2280269441)

fgalan avatar May 06 '24 11:05 fgalan

Functional tests (which I think "live" in the iotagent-node-lib repository) should be expanded to take into account the new functionality? @mapedraza what do you think?

It seems it has been taken into account (see telefonicaid/iotagent-node-lib#1607 (comment))

The test was added in https://github.com/telefonicaid/iotagent-node-lib/pull/1607/commits/ad5f514fd72e7bca15d0cba008da1a32031b181b but is not enabled due to lack of support for multiplemeasures tests as @fgalan described in https://github.com/telefonicaid/iotagent-json/pull/826#issuecomment-2095769123

AlvaroVega avatar May 06 '24 13:05 AlvaroVega

Similar PR for iotagent-ul should be implemented?

AlvaroVega avatar May 10 '24 09:05 AlvaroVega

Similar PR for iotagent-ul should be implemented?

I think so, so the IOTAs keep synced in functionality.

fgalan avatar May 10 '24 11:05 fgalan

Similar PR for iotagent-ul should be implemented?

I think so, so the IOTAs keep synced in functionality.

Not sure if iotagent-ul is able to receive multiple measures at the same time, due to UL protocol format https://github.com/telefonicaid/iotagent-ul/blob/master/docs/usermanual.md#ultralight-20-protocol

AlvaroVega avatar May 13 '24 10:05 AlvaroVega

Similar PR for iotagent-ul should be implemented?

I think so, so the IOTAs keep synced in functionality.

Not sure if iotagent-ul is able to receive multiple measures at the same time, due to UL protocol format https://github.com/telefonicaid/iotagent-ul/blob/master/docs/usermanual.md#ultralight-20-protocol

Documentation at https://github.com/telefonicaid/iotagent-ul/blob/master/docs/usermanual.md#measure-payload-syntax describes multimeasure support:

Multiple groups of measures can be combined into a single request, using the # character. In that case, a different NGSI request will be generated for each group of measures. E.g.:

gps|1.2/3.4#t|10

This will generate two NGSI requests for the same entity, one for each one of the values. Each one of those requests can contain any number of attributes.

(The last part of the documentation should be adjusted after the implementation of the new functionality to something like this: "This will generate two elements in the NGSI batch update request (POST /v2/op/update) for the same entity, one for each one of the measures. Each one of those elements can contain any number of attributes.")

fgalan avatar May 13 '24 13:05 fgalan

Similar PR for iotagent-ul should be implemented?

I think so, so the IOTAs keep synced in functionality.

Not sure if iotagent-ul is able to receive multiple measures at the same time, due to UL protocol format https://github.com/telefonicaid/iotagent-ul/blob/master/docs/usermanual.md#ultralight-20-protocol

Documentation at https://github.com/telefonicaid/iotagent-ul/blob/master/docs/usermanual.md#measure-payload-syntax describes multimeasure support:

Multiple groups of measures can be combined into a single request, using the # character. In that case, a different NGSI request will be generated for each group of measures. E.g.:

gps|1.2/3.4#t|10

This will generate two NGSI requests for the same entity, one for each one of the values. Each one of those requests can contain any number of attributes.

(The last part of the documentation should be adjusted after the implementation of the new functionality to something like this: "This will generate two elements in the NGSI batch update request (POST /v2/op/update) for the same entity, one for each one of the measures. Each one of those elements can contain any number of attributes.")

Done twin PR in https://github.com/telefonicaid/iotagent-ul/pull/677

AlvaroVega avatar May 22 '24 08:05 AlvaroVega