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

Inconsistent TLV specification #551

Open
tuve opened this issue Nov 10, 2022 · 2 comments
Open

Inconsistent TLV specification #551

tuve opened this issue Nov 10, 2022 · 2 comments
Assignees

Comments

@tuve
Copy link

tuve commented Nov 10, 2022

  • OMA-TS-LightweightM2M_Core-V1_2-20201110-A_full (and all previous versions)
  • section 7.4.5

In table 7.4.5-1, the Type field, bits 7-6 states:

10= multiple Resource, in which case the Value contains one or more Resource
Instance TLVs

further down on the page you find:

When a Multiple Resource has to be returned to the LwM2M Server, the Multiple Resource TLV MUST be used whatever
the number of Instances (0, 1 or more) of that resource.

The conflicting part is 'one or more' vs '(0, 1 or more)'. To me it seems clear that the 'one or more' is at fault since it is quite possible to have a multiple resource with no instances e.g., a error codes. Neither can I see any reason why a writable multiple instance shouldn't be writable as no instances, i.e., clearing a multiple instance resource.

Could someone clarify if a multiple resource type must have instances?

@sbernard31
Copy link

sbernard31 commented Nov 10, 2022

I agree this is probably an error in specification :

10= multiple Resource, in which case the Value contains one or more Resource
Instance TLVs

Should be

10= multiple Resource, in which case the Value contains 0, one or more Resource
Instance TLVs

@sbernard31
Copy link

And probably also :

00= Object Instance in which case the Value contains one or more Resource TLVs

Should also be :

00= Object Instance in which case the Value contains 0, one or more Resource TLVs

(From : http://www.openmobilealliance.org/release/LightweightM2M/V1_1_1-20190617-A/HTML-Version/OMA-TS-LightweightM2M_Core-V1_1_1-20190617-A.html#Table-744-1-TLV-format-and-description)

Even if the use case is less obvious, I guess maybe you can have some Object Instance with no resource at all (if they are all optional) 🤷

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

No branches or pull requests

3 participants