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

calling Bus::maxSendTries(0) leads to not sending telegrams at all #65

Open
Darthyson opened this issue Mar 28, 2023 · 2 comments
Open
Labels

Comments

@Darthyson
Copy link
Member

this probably also affects Bus::maxSendBusyTries(0)
some logging data:

TLayer4::_begin debugging active
DUMP_TELEGRAMS Bus telegram dump enabled.
Bus begin - Timer prescaler: 000047 ttimer prescaler: 000047 ttimer value: 000882
nak retries: 000003 busy retries: 000003 phy addr: 10.15.254 (0xAFFE)
BCU Name: BIM112  MaskVersion: 0x0701
userRam    start: 0x05FC end: 0x0902 size: 0x0307
userEeprom start: 0x3F00 end: 0x4AFF size: 0x0C00 flashSize: 0x1000

QUE: (01007530) B0 AF FE AF FD 6F 42 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2C
QUE: (01014449) B0 AF FE AF FD 6F 42 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2C
QUE: (01021342) B0 AF FE AF FD 6F 42 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2C
QUE: (01028208) B0 AF FE AF FD 6F 42 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2C
QUE: (01035048) B0 AF FE AF FD 6F 42 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2C
QUE: (01041862) B0 AF FE AF FD 6F 42 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2C
@Darthyson Darthyson added the bug label Mar 28, 2023
@dallmair
Copy link
Member

Calling Bus::maxSendTries(0) specifies that zero tries are allowed, in other words it means that no communication is allowed. So to me it seems the lib already behaves as expected.

What is the behavior you expect? I can come up with the following options:

  1. Ignore the call when invalid values are passed.
  2. Apply the default value instead of zero.
  3. Fail hard.

Others?

@Darthyson
Copy link
Member Author

Darthyson commented Oct 20, 2023

Bus::maxSendTries(0) queues the telegram, but never sends or deletes it => 0 in telegrams in total
Bus::maxSendTries(1) sends the telegram and 1 repeated => 2 telegrams in total
Bus::maxSendTries(2) sends the telegram and 2 repeated => 3 telegrams in total
Bus::maxSendTries(3) sends the telegram and 3 repeated => 4 telegrams in total
So i think it better should be renamed to Bus::maxSendRetries() but that doesn't resolve the issue of Bus::maxSendTries(0) sending nothing.

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

No branches or pull requests

2 participants