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

Clarify offset and length related types #146

Open
OleksandrKvl opened this issue Apr 25, 2022 · 5 comments
Open

Clarify offset and length related types #146

OleksandrKvl opened this issue Apr 25, 2022 · 5 comments

Comments

@OleksandrKvl
Copy link

Currently, offset and message.blockLength are specified as unsignedInt (32-bit) while type.length is nonNegativeInteger which is by spec "unbounded" which I guess can be treated as "at least 64-bit". In this way offset is unable to represent the full range of potential sizes. I think:

  1. They should have the same type.
  2. Maybe it makes sense to use unsignedLong (64-bit) to make it more specific rather than vague nonNegativeInteger which doesn't impose any limitation.
@donmendelson
Copy link
Member

You didn't specify which version of SBE you are referencing. In the latest schema for SBE v2.0 RC3, blockLength and length are of the same type, nonNegativeInteger.

@OleksandrKvl
Copy link
Author

Oh, I checked only the Markdown version, here it still says unsingedInt. In the XSD it's nonNegativeInteger as you said. What do you think about offset type?

@donmendelson
Copy link
Member

The XSD is normative. The documentation needs to be made consistent.

@kleihan
Copy link
Member

kleihan commented Apr 25, 2022

Oh, I checked only the Markdown version, here it still says unsingedInt. In the XSD it's nonNegativeInteger as you said. What do you think about offset type?

@OleksandrKvl, thanks for catching that issue!

@OleksandrKvl
Copy link
Author

Just want to clarify that it's not only about documentation, the main points are that 1. offset should have the same type as length and 2. probably it's better not to use unbounded types anywhere in specification. For example, in Python3 there's no limit for integers which is not true for C++, can I be sure that SBE implementations in both of them are compatible?

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

No branches or pull requests

3 participants