Coder Social home page Coder Social logo

Comments (3)

tomekmalek avatar tomekmalek commented on July 30, 2024

I rechecked this case once again and I discovered that this behaviour appears when Default Maximum Period (/1/x/3) is set to 10 (in my case Anjay 3.4.1). Is it OK that pmin & pmax are ignored if Default Maximum Period is set?

from anjay.

kFYatek avatar kFYatek commented on July 30, 2024

Hi Tomasz,

Thank you for your report.

First of all, there are no changes between 3.4.0 and 3.4.1 related to the Observe/Notify mechanism, so I am fairly sure that the difference in behavior you're seeing is related to some other factor (perhaps this Default Maximum Period setting) rather than the library version.

In case of an Observe-Composite request, the "effective pmax" value is calculated for each of the paths specified in the Observe-Composite request, and the notification will be generated after the shortest of those (provided that other event for its generation does not occur earlier).

The "effective pmax" is calculated by taking the "pmax" value attached to the Resource; if that's not set, then the "pmax" value attached to its enclosing Object Instance is checked; if that's not set either, then the "pmax" value attached to its enclosing Object is used; and if that's not set, the Default Maximum Period (/1/x/3) is used; if that's empty as well, then there's no "effective pmax" (i.e., it's "infinity").

So, if you have an Observe-Composite request targeting resource /1/0/1 where you have set the "pmax" value to 45, but also targeting any other resource that does not have an associated "pmax" value, then the "effective pmax" for /1/0/1 will be 45, but the "effective pmax" for that other resource will be the Default Maximum Period. If the Default Maximum Period is shorter than 45 (as is in your example), then that will be the effective notification interval.

The LwM2M specification is not super clear on the intended behavior in such a case; we believe that our implementation is compliant with the spec, but I admit that it is a bit of a gray area, open to interpretation.

I hope that this answers your doubts and that the logic behind the behavior you're observing is clear now.

Best regards,
Mateusz Kwiatkowski

from anjay.

tomekmalek avatar tomekmalek commented on July 30, 2024

Thank you for your explanation, @kFYatek .

best regards
T.

from anjay.

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.