Skip to content

Commit

Permalink
update CNR and doc
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Sep 24, 2024
1 parent 72e77f0 commit 409cd33
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- ADD: response header about procesing time in measures request(iotagent-node-lib#1650)
2 changes: 0 additions & 2 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
- ADD: reponse header about processing time (iotagent-node-lib#1650)

3.6.0 (September 18th, 2024)

- Upgrade body-parser dep from 1.20.0 to 1.20.3
Expand Down
33 changes: 20 additions & 13 deletions docs/usermanual.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,39 +118,42 @@ It is possible to report as a measure a NGSI-v2 or NGSI-LD payload when related
`payloadType` `ngsiv2` or `ngsild`. In these cases payload is ingested as measure where entity attributes are measure
attributes.

Note that the entity ID and type in the measure are also include as attributes `measure_id` and `measure_type` as described
[here](https://github.dev/telefonicaid/iotagent-node-lib/doc/api.md#special-measures-and-attributes-names) (both using
attribute type `Text`). The ID and type of the entity updated at Context Broker is taken from device/group configuration or provision,
Note that the entity ID and type in the measure are also include as attributes `measure_id` and `measure_type` as
described [here](https://github.dev/telefonicaid/iotagent-node-lib/doc/api.md#special-measures-and-attributes-names)
(both using attribute type `Text`). The ID and type of the entity updated at Context Broker is taken from device/group
configuration or provision,

However, it is possible to use the same entity ID that the original one by using `entityNameExp`
at [device group provision](https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#config-group-datamodel), this way:
However, it is possible to use the same entity ID that the original one by using `entityNameExp` at
[device group provision](https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#config-group-datamodel),
this way:

```
"entityNameExp": "measure_id"
```

The `actionType` used in the update sent to Context Broker is taken from the measure in the case that measure corresponds to
a NGSI-v2 batch update. In other cases (i.e. NGSI-LD or NGSI-v2 non-batch update), the `actionType` is the default one (`append`).
The `actionType` used in the update sent to Context Broker is taken from the measure in the case that measure
corresponds to a NGSI-v2 batch update. In other cases (i.e. NGSI-LD or NGSI-v2 non-batch update), the `actionType` is
the default one (`append`).

For instance, given an incoming **measure** as the follwing one:

```json
{
"id": "MyEntityId1",
"type": "MyEntityType1",
"attr1": { "type": "Text", "value": "MyAttr1Value"}
"attr1": { "type": "Text", "value": "MyAttr1Value" }
}
```

It would persist an entity into the Context Broker like the following one:

```json
{
"id":"MyProvisionID",
"type":"MyProvisionType",
"attr1": { "type": "Text", "value": "MyAttr1Value"},
"measure_id": {"type": "Text","value": "MyEntityId1"},
"measure_type":{"type": "Text","value": "MyEntityType1"}
"id": "MyProvisionID",
"type": "MyProvisionType",
"attr1": { "type": "Text", "value": "MyAttr1Value" },
"measure_id": { "type": "Text", "value": "MyEntityId1" },
"measure_type": { "type": "Text", "value": "MyEntityType1" }
}
```

Expand Down Expand Up @@ -521,6 +524,10 @@ Content-type: application/json
}
```

#### Time processing

HTTP bindig is returning in a HTTP header named `X-Processing-Time` processing time expended by current request.

### MQTT binding

MQTT binding is based on the existence of a MQTT broker and the usage of different topics to separate the different
Expand Down

0 comments on commit 409cd33

Please sign in to comment.