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

Type of incoming/outgoing frame counters #1361

Open
mikomarrache opened this issue Dec 4, 2022 · 2 comments
Open

Type of incoming/outgoing frame counters #1361

mikomarrache opened this issue Dec 4, 2022 · 2 comments

Comments

@mikomarrache
Copy link
Contributor

The counters are declared as Integer here:

However, the specs says:

image (4)
image (3)
image (5)

If I understand correctly, that may become an issue when the counters will reach high value, am I correct ?

If yes, should we declare the properties as Long instead of Integer ?

@cdjackson
Copy link
Member

Yes, values above 2^31 I guess will be an issue. It's not so obvious without looking at the code how to resolve this though as I'm not sure what impact changing this will have - not just on this class, but all the others that use uint32_t

@cdjackson
Copy link
Member

Just to add though that in reality this is unlikely to be an issue since 2^31 is still a very large number :)

At this rate, it would take around 7 years to overflow assuming 10 commands were sent every second - or 68 years if it's just 1 command per second. So the reality is that it's very (very!) unlikely to cause a problem IMHO.

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

2 participants