|
Gocator API
|
Enables fast heartbeat-based disconnection detection for this sensor.
When enabled, the SDK monitors UDP heartbeat packets from the sensor (or accelerator) and can detect disconnection within approximately 100ms, significantly faster than the standard health-based detection (~6 seconds).
This function should be called after GoSensor_Connect succeeds.
Heartbeat monitoring is stopped automatically in two cases:
Concurrency: At most one enable/disable transition is allowed in flight on a given sensor at any time. If a second caller (including a heartbeat callback re-entering through GoSensor_Disconnect, or the discovery-thread auto- disable) arrives while a transition is mid-flight, the second caller receives kERROR_BUSY and must retry after a brief delay. This prevents Start/Stop interleaving on the same internal heartbeat object, which could otherwise deadlock the in-flight Stop's join.
| sensor | GoSensor object. |
| enable | kTRUE to enable heartbeat monitoring, kFALSE to disable. |