Subject: Re: [Cbor] mailing list or github for cddl

From: Michael Richardson <[email-masked]>
Date: Sat, 08 Oct 2016 21:24:02 -0400

{conversation mid-way through}

Carsten Bormann <[email-masked]> wrote:
    > Well, [0] is a valid grasp message...  Just not a very interesting one.

    > Unfortunately, the current version of the CDDL tool can't annotate
    > numbers.  So, for instance, for the following message:

    > $ cddl 57be316fdc565354a9df521187a73138/gistfile1.txt  gp
    > /grasp-message/ [8, 7025801,
    > /objective/ [/objective-name/ "decalcifier", 7, 228]]

    > you'd need to look up the 8 (SYNCH) by yourself.

Aha, so I'm supposed to put an encoded message in there, I guess?

I had much difficulties understanding the grasp.cddl.  I thought that
cddl would help me, but I see now what is really does.  Slowly how the
data is described is sinking in for me.

I thought that the CDDL tool was going to grok the file definition somehow
and spit out some kind of JSON definition that I could understand better.
(like on page 26...)

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        | network architect  [
]     [email-masked]  http://www.sandelman.ca/        |   ruby on rails    [

---

From: Carsten Bormann <[email-masked]>
Date: Sun, 09 Oct 2016 06:08:20 +0200

> Aha, so I'm supposed to put an encoded message in there, I guess?

That would be the validate (or vp = validate/pretty) command for the
CDDL tool.

> data is described is sinking in for me.

Great.  If you are used to what ABNF does, CDDL should seem natural.

> and spit out some kind of JSON definition that I could understand better.

Page 26?  That has the overall CDDL,

     grasp-message = (message .within message-structure) / noop-message

     message-structure = [MESSAGE_TYPE, session-id, ?initiator,
                          *grasp-option]

     MESSAGE_TYPE = 1..255
     session-id = 0..16777215 ;up to 24 bits
     grasp-option = any

Then the rest of the CDDL just adds more detailed alternatives to "message".

Grüße, Carsten

---

From: Brian E Carpenter <[email-masked]>
Date: Mon, 10 Oct 2016 08:03:51 +1300

> Michael Richardson wrote:

...
>> data is described is sinking in for me.

If there's anything we can do to make the spec easier to understand,
please make suggestions.

[For the cbor list: we're talking about
https://tools.ietf.org/html/draft-ietf-anima-grasp-07#section-6,
and there's already a plan to add some example messages as an Appendix.]

  Brian