Re: [core] Binding attributes in draft-ietf-core-interfaces

Michael Koster <michaeljohnkoster@gmail.com> Thu, 04 February 2016 13:58 UTC

Return-Path: <michaeljohnkoster@gmail.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5E4F21B2F92 for <core@ietfa.amsl.com>; Thu, 4 Feb 2016 05:58:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fRpaK14SCLka for <core@ietfa.amsl.com>; Thu, 4 Feb 2016 05:58:19 -0800 (PST)
Received: from mail-pf0-x22f.google.com (mail-pf0-x22f.google.com [IPv6:2607:f8b0:400e:c00::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 07AF81B2EB9 for <core@ietf.org>; Thu, 4 Feb 2016 05:58:18 -0800 (PST)
Received: by mail-pf0-x22f.google.com with SMTP id n128so45639285pfn.3 for <core@ietf.org>; Thu, 04 Feb 2016 05:58:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=4lTmSeh6CIJz0u6h1QZgpyk1o3xNn0GPaBxPYur2etE=; b=zpMwtOjIf1LMoEgUUYv7zLki4GHXzAMbCvFpYG+bI/yLApxb+6JsKobXDsBw4/YZ7q FzE8t9qOc6p0kmgI4gnKM9aJxMSZxR3lDYn4V2L3Tw2kh0jjH0xYGCk9pCo/UvWOJLFy F/+Cq+rw9GJMcd6DPav4c55icDV1ezLBI+IWY5RSZXhZsYd4KnkZWGv27QYP4lY7GZ8b rO4EvzNtv2hmCe9bmyJ0IyGIOgPRJvZ83RNcv+OlbZ9lR2BrmGcpkDbQcFS3wTRz/DLH q4XTiyPPdj+ozlCE5h9ZsMjCsdMT8edBsRciEHn5oLYpwM2g/ZtnuD7GQMiwFK8X1BX0 VkHA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=4lTmSeh6CIJz0u6h1QZgpyk1o3xNn0GPaBxPYur2etE=; b=GIpjwoF4CZ7TeaXEFn9CUqPmwl9bIuKz741Rj4LkE2Jk3NM3UE/ugeKaw+y6bx9w1M Ns2dnRz4Qi2YqiaY+lFIj69Z6zxPRz01oIlOXX4Es5OBF0ZgJsxQlWRNvywbgOpiFnCl YFz3THiy5HfueiG+HpQWAlz8P3RRNvFvx/g5yXXHOgNvN+2a00/NBx+Ln2iQkKMgOz/6 JwE7oHmOoMG5ipgRL1SV2EQmM1CndS9OGA7+ZAF8BCA5k3Okf6vYFGkaSdvMRhQDhrSs YzfOSBlhzlNnPYCH5xn7RIaS4XKgs0IH+JB70XsdricDDQRvfCWmI967X7sWQdCgXvss B8UA==
X-Gm-Message-State: AG10YOQZPy5cnY6cH8t+7HG++qJLO9aFHaxWYhOeJwnKyGcpr3kPHHnr7ZAgUp17SdT8tQ==
X-Received: by 10.67.2.10 with SMTP id bk10mr10888904pad.26.1454594298512; Thu, 04 Feb 2016 05:58:18 -0800 (PST)
Received: from [10.0.0.21] (108-201-184-41.lightspeed.sntcca.sbcglobal.net. [108.201.184.41]) by smtp.gmail.com with ESMTPSA id ya4sm17497393pab.22.2016.02.04.05.58.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Feb 2016 05:58:17 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail=_921FFAB6-304B-48B8-8A7D-F63F2454DBE8"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
From: Michael Koster <michaeljohnkoster@gmail.com>
In-Reply-To: <56B2F440.3050506@nteczone.com>
Date: Thu, 04 Feb 2016 05:58:16 -0800
Message-Id: <7070C578-7687-45DE-A4CD-50231F2F28AF@gmail.com>
References: <56B2F440.3050506@nteczone.com>
To: Christian Groves <Christian.Groves@nteczone.com>
X-Mailer: Apple Mail (2.2104)
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/UQSH7bED6xu5Nh2gXzTgxvviEl4>
Cc: core@ietf.org
Subject: Re: [core] Binding attributes in draft-ietf-core-interfaces
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Feb 2016 13:58:21 -0000

Hi Christian,

Thanks for the question. I think we may need to clarify this some more in the text or with a figure. 

The notification is controlled by a state machine driven by new sample values.

I think the part we need to clarify is: 
*Whether a notification is generated depends on the state reported in the moss recent previous notification, as well as the current sample value, and the notification attribute values.

So saynig "the temperature rises to 30" we need to indicate the sequence of values which were sampled between 20 and 30, and follow the 
state machine.

You gave sample values of 20, 25, 26, and 30. Let's assume that these values are sampled in sequence. 

Assume that the initial value of 20 was the last reported value, and set the state of the state machine.

The next sample is 25, which causes a notification (report) to be generated due to the st=5 attribute. The new most recent value is now 25.

The next sample is 26, which generates a notification due to the gt=26 attribute, The new most recent value is now 26.

The next sample is 30, which does not generate a notification since the last reported value was 26 and no new reporting condition is met.

Does this make sense? If so, I will add this to the issue list for the next draft update.

Also, I see that we are not clearly defining what happens when a sampled value is exactly equal to a threshold value. In the analysis above, we assume that a threshold value is a reporting condition, but we will need to clearly specify "greater" vs. "greater or equal" instead of "crossing" as in the text.

Best regards,

Michael

PS there is some reference implementation code for OMA LWM2M which follows the definition in the CoRE Interfaces draft:

https://github.com/connectIOT/lwm2m-objects/blob/master/LWM2M_resource.cpp <https://github.com/connectIOT/lwm2m-objects/blob/master/LWM2M_resource.cpp>
https://github.com/connectIOT/lwm2m-objects/blob/master/LWM2M_resource_attributes.cpp <https://github.com/connectIOT/lwm2m-objects/blob/master/LWM2M_resource_attributes.cpp>


> On Feb 3, 2016, at 10:48 PM, Christian Groves <Christian.Groves@nteczone.com> wrote:
> 
> Hello,
> 
> I'm reading clause 5.1/draft-ietf-core-interfaces on boundto attributes. It specifies the interaction between pmin/pmax attributes and the "change step", "Greater than" and "less than" attributes. The draft doesn't limit which attributes may appear so I take it its possible to specify all of them in a single binding. Is this correct?
> 
> If it is it leads to the issue of the interaction between the "change step" and "greater than" and "less than" attributes. I didn't see this described anywhere?
> 
> E.g. for a temperature reading if st=5, lt=10, gt=26 is set and the initial ambient temperature was 20 when set.
> The temperature rises to 30.
> I could assume there's a notification at 25 related to st=5
> Then there's a notification at 26 related to gt=26
> However is there a notification at 30?
> 
> The text for change step indicates "how much the value of a resource SHOULD change before sending a new notification (compared to the value of the last notification)". The last notification in this case is 26 which would make the change step 31.
> 
> A possible alternate interpretation is that notifications only occur when the change step is below 10 or over 26. Alternatively a new change step notification above would seem superfluous if there's always a notification whenever the temperature changes above 26.
> 
> What was the intention with the attributes?
> 
> Regards, Christian G
> 
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core