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

[TECU]: Add ISOBUS Heartbeat Message #443

Merged
merged 2 commits into from
Mar 1, 2024
Merged

[TECU]: Add ISOBUS Heartbeat Message #443

merged 2 commits into from
Mar 1, 2024

Conversation

ad3154
Copy link
Member

@ad3154 ad3154 commented Feb 28, 2024

Describe your changes

Added an interface which manages sending and receiving the ISOBUS heartbeat.

The heartbeat message is used to determine the integrity of the communication of messages and parameters being transmitted by a control function. There may be multiple instances of the heartbeat message on the network, and CFs are required transmit the message on request. As long as the heartbeat message is transmitted at the regular time interval and the sequence number increases through the valid range, then the heartbeat message indicates that the data source CF is operational and provides correct data in all its messages.

This interface is enabled by default, but can be disabled if you want to stop your heartbeat(s) or don't care about the safety-critical path of the machine.

https://www.isobus.net/isobus/pGNAndSPN/2507?type=PGN

How has this been tested?

  • Added unit test for heartbeat interface
  • Tested with seeder example

@ad3154 ad3154 added iso: application messages Related to the ISO-11783:7 standard iso: tractor ecu Related to ISO11783-9 standard labels Feb 28, 2024
@ad3154 ad3154 requested a review from GwnDaan February 28, 2024 00:51
@ad3154 ad3154 self-assigned this Feb 28, 2024
Copy link
Member

@GwnDaan GwnDaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial feedback, I haven't been able to test it yet but it looks promising

isobus/include/isobus/isobus/isobus_heartbeat.hpp Outdated Show resolved Hide resolved
isobus/include/isobus/isobus/isobus_heartbeat.hpp Outdated Show resolved Hide resolved
isobus/include/isobus/isobus/isobus_heartbeat.hpp Outdated Show resolved Hide resolved
isobus/include/isobus/isobus/isobus_heartbeat.hpp Outdated Show resolved Hide resolved
isobus/src/isobus_heartbeat.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_heartbeat.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_heartbeat.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_heartbeat.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_heartbeat.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_heartbeat.cpp Outdated Show resolved Hide resolved
@ad3154 ad3154 force-pushed the adrian/heartbeat branch 2 times, most recently from 2462c2d to 00b1751 Compare February 29, 2024 02:29
@ad3154
Copy link
Member Author

ad3154 commented Feb 29, 2024

Some initial feedback, I haven't been able to test it yet but it looks promising

I think I addressed all your comments/suggestions in the latest diff, and I tested with the seeder example and it appeared to start sending a compliant heartbeat on request, which is great! The counter appeared to start at 251, roll over to 0, and reset once 250 was crossed as expected.

I also fixed the seeder example's manufacturer code (was 64) to be our code.

@GwnDaan
Copy link
Member

GwnDaan commented Feb 29, 2024

Sounds good, I re-opened one of them, but other than that looks good! I'm thinking it might be good to add a little bit of documentation under the API section of sphinx? And let it automatically link the available public interface there. Just to make the feature known to users now and not put it on the long list of postponed documentation haha, what do you think?

EDIT: sorry for closing, I hit the wrong button 😅

@GwnDaan GwnDaan closed this Feb 29, 2024
@GwnDaan GwnDaan reopened this Feb 29, 2024
Added an interface which manages sending and receiving the ISOBUS heartbeat.
Fixed seeder example's manufacturer code.
@ad3154 ad3154 force-pushed the adrian/heartbeat branch from 00b1751 to eb5b8c1 Compare March 1, 2024 00:09
@ad3154
Copy link
Member Author

ad3154 commented Mar 1, 2024

I'm thinking it might be good to add a little bit of documentation under the API section of sphinx?

Added basic Sphinx API docs for all implement application layer message interfaces!

image

Copy link

sonarqubecloud bot commented Mar 1, 2024

Copy link
Member

@GwnDaan GwnDaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@ad3154 ad3154 merged commit a093eb9 into main Mar 1, 2024
10 checks passed
@ad3154 ad3154 deleted the adrian/heartbeat branch March 1, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iso: application messages Related to the ISO-11783:7 standard iso: tractor ecu Related to ISO11783-9 standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants