MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / heartbeat

Function heartbeat

src/microham.c:719–727  ·  view source on GitHub ↗

send a heartbeat and record time The "last heartbeat" time is recorded in a global variable such that the service thread can decide whether a new heartbeat is due.

Source from the content-addressed store, hash-verified

717// heartbeat is due.
718//
719static void heartbeat()
720{
721 unsigned char seq[2];
722
723 seq[0] = 0x7e;
724 seq[1] = 0xfe;
725 writeControl(seq, 2);
726 lastbeat = time(NULL);
727}
728#endif /* defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) */
729
730

Callers 2

read_deviceFunction · 0.85
start_threadFunction · 0.85

Calls 1

writeControlFunction · 0.85

Tested by

no test coverage detected