Open-Agriculture / AgIsoStack-plus-plus

AgIsoStack++ is the completely free open-source C++ ISOBUS library for everyone
https://agisostack.com/
MIT License
167 stars 40 forks source link

[TECU]: Add ISOBUS Heartbeat Message #443

Closed ad3154 closed 4 months ago

ad3154 commented 4 months ago

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?

ad3154 commented 4 months ago

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 commented 4 months ago

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 😅

ad3154 commented 4 months ago

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

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
6 New issues
0 Accepted issues

Measures
0 Security Hotspots
72.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud