Coder Social home page Coder Social logo

Comments (6)

sophokles73 avatar sophokles73 commented on September 23, 2024

So far, so good. I guess you wouldn't have created the issue if you were content with what you observe ;-) Could you give us a hint what you think should be different?

from leshan.

dnav avatar dnav commented on September 23, 2024

Well the payload must contain the content of the new instance if I understand the LWM2M TS correctly.

The β€œCreate” operation has the following parameters:

Parameter Required Default Value Notes
Object ID Yes - Indicates the Object.
New Value Yes - The new value included in the payload to create the Object Instance(s)

Table 14: Create parameters
The new value included in the payload MUST follow the TLV or JSON format according to the Content-Format option which MUST be specified.

For objects which model are known by Leshan, the Leshan UI asks for the cotent of the new instance.

from leshan.

sophokles73 avatar sophokles73 commented on September 23, 2024

Okay, so we are talking about the demo server's UI. I think that the demo server can dynamically create a form for entering the payload if it is provided with a json file describing the object type at startup. However, I am not very much involved in the demo server UI so we'll have to defer this question to our friends from Sierra Wireless.

@msangoi, @sbernard31 any idea?

from leshan.

dnav avatar dnav commented on September 23, 2024

Yes sorry. I forgot to specify I used the server deployed at leshan.eclipse.org
The demo server's UI indeed provide a form when the object layout is known.

Easiest fix would be to disable the "Create New Instance" when the object layout is unknown.

from leshan.

sbernard31 avatar sbernard31 commented on September 23, 2024

I rethink about this point.
If leshan doesn't know the model and there is no instance, it just show the create button.
In this case you can try to create an instance with no payload as we don't know anything about the model.
If there is no mandatory resource you should be able to create it then read the instance. If there is mandatory resource this will fail but we can not do better.

So I think it's ok like this.
Anyway the right solution is to add the corresponding model using --modelsfolder option.

from leshan.

sbernard31 avatar sbernard31 commented on September 23, 2024

I created a PR #805 which make clearer that Leshan does not know a model :

unknown_model

from leshan.

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.