Skip to content

Best practices for using this library #471

Answered by acolomb
erlend-aasland asked this question in Q&A
Discussion options

You must be logged in to vote
  • I've never used (and didn't know about) network.check(). Must be optional obviously :-) Usually better to put logging inside any callbacks you install and try to make them not raise exceptions.

  • The heartbeat protocol is used for a number of different schemes, like Node Guarding, Life Guarding, and the Boot-up Protocol. wait_for_heartbeat() is only the correct approach if you know that one will be sent out by a device. That happens only once during power-on, or if you send the NMT state change command RESET or RESET COMMUNICATION. It's possible to send it as a broadcast by using network.nmt.state = 'RESET', if that is appropriate for your application lifecycle. I've had projects where …

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
4 replies
@erlend-aasland
Comment options

@erlend-aasland
Comment options

@acolomb
Comment options

acolomb Jun 28, 2024
Collaborator

@erlend-aasland
Comment options

Comment options

You must be logged in to vote
9 replies
@erlend-aasland
Comment options

@acolomb
Comment options

acolomb Jul 3, 2024
Collaborator

@erlend-aasland
Comment options

@acolomb
Comment options

acolomb Jul 4, 2024
Collaborator

@sveinse
Comment options

sveinse Jul 6, 2024
Collaborator

Answer selected by erlend-aasland
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants