简体   繁体   中英

Does Leshan support ObjLink?

I am trying to create my composite LWM2M object by using objlink type.

For Leshan , the only source on how to write the spec file in JSON seems to be the official oma-objects-spec.json , which does not contain examples of objlinks.

Can anyone provide an example on how to create an objlink object? If it is not possible in Leshan, have anyone tried other implementations?

Hope it's not too late.

As of now there is no support of OBJLNK in Leshan API. I was also needed OBJLNK support in Leshan so i have modified and created a pull request for supporting OBJLNK. If you want to have objlnk support can use my branch which is forked from Leshan. https://github.com/DevendraKurre/leshan

Leshan has added support to this feature. I have tested it with version 0.1.11-M14.

Reading can be done as usual, and writing is done as follows.

WriteRequest writeReq = new WriteRequest(
                          WriteRequest.Mode.UPDATE,
                          9, 0,
                          LwM2mSingleResource.newObjectLinkResource(
                            13, 
                            new ObjectLink(5566, 7788)
                          )
                        );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM