|
Gocator API
|
Note: All speed estimates are based on a good network. Any network delay, such as in accelerated systems or multisensor systems, may lower the speed.
A sensor is considered GO_STATE_UNRESPONSIVE if it misses three consecutive 2-second discovery cycles (a 6-second window). To forcibly trigger discovery cycles, GoSensor_Refresh() can be called three or more times. If GoSensor_Refresh() is called on an unresponsive sensor, it will be formally disconnected, changing its status to GO_STATE_OFFLINE and removing it from monitoring.
The following methods are recommended for detecting disconnection:
GO_STATE_UNRESPONSIVE status.GO_STATE_UNRESPONSIVE: This approach is similar to GoSensor_IsResponsive() but may be slightly slower, as the function may first update the cache info, if it is invalid.These methods are NOT recommended for detecting disconnection:
GO_STATE_OFFLINE status, which can take an indefinite amount of time to be set. If the sensor has been refreshed three times, this function will return false in 6+ seconds after disconnection.| Method | Recommended | Minimum time to detect [s] | Minimum time to detect while PC-accelerated [s] | Reads from |
|---|---|---|---|---|
| GoSensor_IsResponsive() | Yes | 6 | 10 | Cache |
| GoSensor_State() | Yes | 6 | 10 | Cache & sometimes sensor |
| GoSystem_HasChanges() | No; not for just disconnections | 6 | 10 | Cache |
| GoSensor_IsConnected() | No | Slow (without refresh) 6 (after refresh) | 10 | Cache |
| Control Commands, e.g.: | No; adds processing overhead | 3 | 3 | Sensor |