Kvaser CanKing GUI Extensions SDK v7.4.0
Kvaser CanKing GUI Extensions SDK / hooks / useOnlineStatusSync
Function: useOnlineStatusSync()
useOnlineStatusSync(
parentIsInitialized,id,onGoingOnline,onGoingOffline):boolean
Custom hook to synchronize session state with online/offline status changes.
Parameters
parentIsInitialized
boolean
Whether the parent component is initialized and has loaded all project and session data needed before receiving online updates.
id
number
The unique id of the view. This is passed to the view component as the id prop.
onGoingOnline
Callback function to handle going online. Called when the CanKing starts a measurement or when the view is mounted while online.
onGoingOffline
Callback function to handle going offline. Called when the CanKing stops a measurement or when the view is mounted while offline.
Returns
boolean
The current online status.