Subject: [core] draft-li-core-conditional-observe-01 - Another type of conditional (for out of range)

From: Antonio Jara <[email-masked]>
Date: Thu, 29 Mar 2012 13:33:17 +0200

Dear all,

Just to comment  that recently we have required an additional kind of
conditional for our implementation. Therefore, I suggest the following
changes after our experience with this draft.

TYPES
We suggest that in addition to the current ones (for single values):
1- minimum response time
2- maximum response time
3- step
4- range
5- periodic

We should add the types for multiples values:
6- Inside of range
7- out of range

METHOD - M field
This indicates the method being used. This field is represented by a
2-bit integer, indicating the method used in the condition as shown in
the next table.
0- Equal to (=)	
1- More than (>)	
2- Less than (<)

We should add the method multiple:
3- MULTIPLE

Note that if multiple conditions with the same condition type are
present in the same request, the priority is the same for all of them,
and the relationship is “AND”.

One example could be check if a value is inside the range in order to
launch an alarm implementation, where the client adds two different
range Condition options, one set to 3/2/10, and the other set to
3/1/1, meaning that the server will only notify when the temperature
value monitored is below 10 ºC (3/2/10), or above 1 ºC (3/1/1), i.e. 1
< value < 10.

However, it could be more interesting to receive notifications just
when an out of range alarm occurs, instead of sending successive
confirmations for a normal operation of the system when the
temperature is varying inside the range defined. In this case, and due
to the definition of the Condition options, the only way for inquire
this type of notifications is using two Condition options, instead of
just one in order to define a out of range alarm notification. The
next figure describes this possibility where the range of interest is
the same as described above but notifications are only sent when the
temperature values are above 10 ºC (3/1/10) or below 1ºC (3/2/1).

This requires two messages, see picture:
http://imageshack.us/photo/my-images/706/outofrangecurrent.png/

Therefore, a new definition for TYPE out of range and METHOD multiple,
where it can be defined two VALUES instead of one.

Since the VAL field has three different sizes, it could be considered
to add also a 2 bits field in order to indicate the size. Thereby, it
is reached a 1 bytes initial option without the value.

TYPE - 4 bits
METHOD - 2 bits
SIZE - 2 bits

Then, SIZE value (S)
0- 1 byte
1- 2 bytes
2- 2 values of 1 byte
3- 2 values of 2 bytes

Thereby, it is more deterministic that a so "flexible" 1 to 3 bytes
option which could bring problems in the processing.

In addition, with the capability to define 2 values instead of only
one, it will simpler to build the methods MULTIPLE, and for the
special TYPES of range more complex than < or > to inside or outside
the range, which is highly value for alarms.

In conclusion, with these changes we can made more deterministic the
size of the conditional option, and reduce the number of messages for
ranges conditions (from 2 to 1 for usual cases such as ranges for
alarms).

Best regards and thanks,
Antonio J. Jara

---

From: Li Shitao <[email-masked]>
Date: Thu, 29 Mar 2012 13:26:47 +0000

Hi antonia 

I think the requirement is reasonable, we can discuss the detail in the future version of this draft

regards
shitao
________________________________________
发件人: Antonio Jara [[email-masked]]
发送时间: 2012年3月29日 19:33
到: [email-masked]
Cc: Li Shitao; Jeroen Hoebeke
主题: draft-li-core-conditional-observe-01 - Another type of conditional (for out of range)

Dear all,

TYPES

METHOD - M field

TYPE - 4 bits
METHOD - 2 bits
SIZE - 2 bits

Then, SIZE value (S)
0- 1 byte
1- 2 bytes
2- 2 values of 1 byte
3- 2 values of 2 bytes

Best regards and thanks,
Antonio J. Jara