Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectLink and Cbor Mapping #562

Closed
iot-cloud opened this issue Aug 27, 2018 · 8 comments
Closed

ObjectLink and Cbor Mapping #562

iot-cloud opened this issue Aug 27, 2018 · 8 comments
Labels
question Any question about leshan

Comments

@iot-cloud
Copy link

Hi,

I am trying to implement the Client and Leshan Device Management Server to support the ObjectLink and Cbor to be used in the Device ExtDevInfo or LWM2m Software Management.

If I perform a read on ExtDevInfo or Package Settings, I expect a Cbor byte array. What do I do to implement ObjectLink into Cbor encoded byte array.

Has anyone attempt to do anything to map ObjectLink into Cbor and Cbor into ObjectLink?

Please share and guide me with some examples.

Thank in advanced.

Regards, hulk

Device
ExtDevInfo
R
Objlnk

LWM2M Software Management
Package Settings
RW
Objlnk

@sbernard31
Copy link
Contributor

Currently, we only support LWM2M 1.0 and if I'm not wrong Cbor is only in 1.1.
We are thinking about LWM2M 1.1, and this is not impossible we begin to work on it at mid term.

Anyway, Leshan is pretty flexible about encoder/decoder so if you want to add or replace default decoder/encoder, you can !
To do that, just implements a LwM2mNodeDecoder or LwM2mNodeEncoder, you can start from DefaultLwM2mNodeDecoder or DefaultLwM2mNodeEncoder.
Then you can add your custom encode/decoder using LeshanBuilder.setEncoder and LeshanBuilder.setDecoder.

About ObjectLink, I'm not sure to understand what is currently missing ?

Don't forget to share your work with us ;)

@sbernard31 sbernard31 added the question Any question about leshan label Sep 3, 2018
@sbernard31
Copy link
Contributor

(about LWM2M 1.1, if you want to share your thought about it : #563)

@iot-cloud
Copy link
Author

Hi Bernard - the Leshan Gatekeeper. Thank for taking your time to explain.

There're few OMA IPSO Object specifications documented with the ObjLnk type in which is implemented into the ObjectLink Class in Leshan.

I believe that ObjectLink in the IPSO Object-1 is used to specify the "Relation" with other IPSO objects. The IPSO Object-1 also contains the PayLoad Attribute documented with the byte array described the cbor encoding.

Regards, hlkn

@sbernard31
Copy link
Contributor

So you want support of ObjectLink with cbor encoding ?

I understood that your request for objectLink was a separated feature request and I didn't understand because it seems to me that ObjectLink is currently implemented in Leshan (for json and tlv format).

@sbernard31
Copy link
Contributor

Could we close this issue ?

@cavenaghi9
Copy link
Contributor

Hi Bernard, as you explained above, Leshan is pretty flexible to extend encoder/decoder, that is approach what I did. In addition, DefaultLwM2MNodeDecoder/DefaultLwM2MNodeEncoder, knownContentFormat in ContentFomat.java, and client-detail.html in leshan-server-demo component also need to be updated. If I want to share my work, is there any strategy of introducing third party dependency in Leshan, because of CBOR encoder/decoder right now are using open source library.

@sbernard31
Copy link
Contributor

sbernard31 commented Oct 1, 2018

You can start by opening a PR.
You will need to sign eclipse CLA

@sbernard31
Copy link
Contributor

So we can close this issue and we will continue the discussion in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Any question about leshan
Projects
None yet
Development

No branches or pull requests

3 participants