|
Gocator API
|
| kStatus GoSensor_SetHeartbeatDisconnectHandler | ( | GoSensor | sensor, |
| GoSensorHeartbeatDisconnectFx | function, | ||
| kPointer | receiver | ||
| ) |
Sets the handler for fast heartbeat-based disconnect detection.
This callback is invoked when the sensor is detected as disconnected via the heartbeat mechanism (~100ms detection time). The callback is invoked from a background thread.
Note: This is separate from the standard connection state change callback (GoSystem_SetDataHandler), which detects disconnection via health messages (~6 seconds detection time).
Callback re-entry rules:
| sensor | GoSensor object. |
| function | Disconnect callback function (or kNULL to unregister). |
| receiver | Receiver argument for callback. |