Code Monkey home page Code Monkey logo

Comments (2)

mkgillmore avatar mkgillmore commented on June 18, 2024

@sbernard31 OMA's specification clarifies that a boolean is an unsigned 8 bit integer with 0 = false and 1 = true

from lwm2m-registry.

sbernard31 avatar sbernard31 commented on June 18, 2024

@mkgillmore, I guess you refer to LWM2M-v1.2.1@core§Appendix C. Data Types (Normative)

I totally missed to look at this.

In the same time, when I read :

Boolean : An 8 bit unsigned integer with the value 0 for False and the value 1 for True.

It seems to me this is kind of mistake to define this here. I mean a boolean is just 2 state true/false.
A 8 bit unsigned integer is either a way to store it (implementation concerns) OR a way encode it (content format concerns).
For string or number it makes senses to clearly define the "kind" of string/numbers supported but for boolean this is just true false.
By the way, we see in LWM2M-v1.2.1@core§Table: C.-2 Data Type Mapping, there is different way to encode boolean (which totally makes sense)

Anyway, I still think that documentation would be clearer with false:DISABLED / true:ENABLED but I agree this is not a big deal too.

If you think my remarks makes sense feel free to take it into account.
If you think this does not deserve to change it, I can understand.
I reported it just in case 🙂

from lwm2m-registry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.