From b0928014217785aaaf8b8e2b88588c40924a9322 Mon Sep 17 00:00:00 2001 From: mapedraza <40356341+mapedraza@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:48:02 +0100 Subject: [PATCH 1/5] Add Special measures and attributes names --- doc/api.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api.md b/doc/api.md index 48cf4c640..c2a76359c 100644 --- a/doc/api.md +++ b/doc/api.md @@ -149,6 +149,15 @@ This behavior allows that autoprovisioned parameters can freely established modi creation using the provisioning API. However, note that if a device (autoprovisioned or not) doesn't have these parameters defined at device level in database, the parameters are inherit from config group parameters. +## Special measures and attributes names + +In case of arriving measures with name `id` or `type`, they are automatically transformed to `measure_id` and +`measure_type`. The reason behind this is to avoid to collide with the original entity id and type, as mechanism +that enable store measure values from parameters called with the same name. It only applies to autoprovisioned +attributes and is also available at JEXL context with the same name (`measure_id`or `measure_type`). + +In case of provisioning attributes using `id` or `type` as names, they are ignored. + ## Entity attributes In the config group/device model there are four list of attributes with different purpose to configure how the From e4efa9625fe172f5140cc20fb55c885081dcba25 Mon Sep 17 00:00:00 2001 From: mapedraza <40356341+mapedraza@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:56:26 +0100 Subject: [PATCH 2/5] Add TOC entry --- doc/api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api.md b/doc/api.md index c2a76359c..22ad59db4 100644 --- a/doc/api.md +++ b/doc/api.md @@ -8,6 +8,7 @@ - [IoT Agent information model](#iot-agent-information-model) - [Config groups](#config-groups) - [Devices](#devices) + - [Special measures and attributes names](#special-measures-and-attributes-names) - [Entity attributes](#entity-attributes) - [Multientity support)](#multientity-support) - [Metadata support](#metadata-support) From f9aa83dba9e9d9c63bb2ec9674be1a01105a8d09 Mon Sep 17 00:00:00 2001 From: mapedraza <40356341+mapedraza@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:47:47 +0100 Subject: [PATCH 3/5] Update doc/api.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fermín Galán Márquez --- doc/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api.md b/doc/api.md index 22ad59db4..73646fba4 100644 --- a/doc/api.md +++ b/doc/api.md @@ -153,7 +153,7 @@ parameters defined at device level in database, the parameters are inherit from ## Special measures and attributes names In case of arriving measures with name `id` or `type`, they are automatically transformed to `measure_id` and -`measure_type`. The reason behind this is to avoid to collide with the original entity id and type, as mechanism +`measure_type` attributes at Context Broker update. The reason behind this is to avoid to collide with the original entity id and type, as mechanism that enable store measure values from parameters called with the same name. It only applies to autoprovisioned attributes and is also available at JEXL context with the same name (`measure_id`or `measure_type`). From 742e9d1ca7ac47b0cb2a44a0eefde49d357c1738 Mon Sep 17 00:00:00 2001 From: mapedraza <40356341+mapedraza@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:35:03 +0100 Subject: [PATCH 4/5] Update doc/api.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fermín Galán Márquez --- doc/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api.md b/doc/api.md index 73646fba4..d21e1c3c3 100644 --- a/doc/api.md +++ b/doc/api.md @@ -157,7 +157,7 @@ In case of arriving measures with name `id` or `type`, they are automatically tr that enable store measure values from parameters called with the same name. It only applies to autoprovisioned attributes and is also available at JEXL context with the same name (`measure_id`or `measure_type`). -In case of provisioning attributes using `id` or `type` as names, they are ignored. +In case of provisioning attributes using `id` or `type` as names (please don't do that ;), they are ignored. ## Entity attributes From 52aeb3dd43544bf4cc921035b12f703ea7103bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Fri, 2 Feb 2024 10:46:04 +0100 Subject: [PATCH 5/5] Update doc/api.md --- doc/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api.md b/doc/api.md index d21e1c3c3..8b9a7f4a2 100644 --- a/doc/api.md +++ b/doc/api.md @@ -153,7 +153,7 @@ parameters defined at device level in database, the parameters are inherit from ## Special measures and attributes names In case of arriving measures with name `id` or `type`, they are automatically transformed to `measure_id` and -`measure_type` attributes at Context Broker update. The reason behind this is to avoid to collide with the original entity id and type, as mechanism +`measure_type` attributes at Context Broker update. The reason behind this is to avoid to collide with the original entity ID and type, as mechanism that enable store measure values from parameters called with the same name. It only applies to autoprovisioned attributes and is also available at JEXL context with the same name (`measure_id`or `measure_type`).