Not getting custom objects from registration using model provider and ObjectModelSerDes
See original GitHub issueI want to know how much objects and resources are there with a particular client when it is getting registered. In register callback of Device Registration Interface I’ve written below code:
final ObjectModelSerDes serializer;
final LwM2mModelProvider modelProvider;
serializer = new ObjectModelSerDes();
modelProvider = myserver.getModelProvider();
LwM2mModel model = modelProvider.getObjectModel(null);
byte[] test12 = serializer.bSerialize(model.getObjectModels());
System.out.println("models");
String str = new String(test12, "UTF-8");
System.out.println(str);
In output I’m getting details of Default object models (0 to 7) and I’m not getting detail about my custom object models. I tried understanding ObjectSpecServlet.java in leshan-server-demo code and ended up with above logic.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Notes on Enabling Activities for Custom Objects
Custom object records can only be associated with a call log in Salesforce CRM Call Center if activities are enabled for the object....
Read more >Use custom objects - HubSpot Knowledge Base
Click the Type dropdown menu and select your custom object, then select your custom object property.
Read more >Sunshine custom objects guide for admins - Zendesk help
This article contains the following sections: About custom objects; Enabling custom objects; Defining a custom object type; Adding object records; Modeling your ...
Read more >Guide to Pardot Custom Objects: What You Can and Can't Do
Our guide gives you an unbiased point of view on Pardot Custom Objects, how to use them, what they can do, and what...
Read more >Custom Objects | HTTP API - commercetools documentation
Custom Objects store arbitrary JSON-formatted data on commercetools Composable Commerce. Custom Objects allow you to persist data that does not fit the standard ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Once you have the objectLink you can retrieve the corresponding object model using
server.getModelProvider()
but this will works only to know which object are supported. (That’s here where we could provide a better API)To know resources supported, I believe the only way with LWM2M is to use discover request on each object… 😕
@NayangiriGoswamiGit I created a PR #657 to support object versioning. There is now new utility functions on
Registration
to get supported version of an object for a registration. See https://github.com/eclipse/leshan/pull/657/files#diff-cd77b361911b907b7b59f79409eeb341R318And a
LwM2mModelProvider
which return only supported objects. See https://github.com/eclipse/leshan/pull/657/files#diff-5a532c30888fe3d248b10f6ffd3eef73R27