SubscribeConnectionLost¶
-
virtual PSubscription IController::SubscribeConnectionLost(ConnectionLostHandler handler) = 0¶
Subscribes a callback to be executed when the connection to this controller is lost.
- Parameters
handler – Function to be called when connection is lost.
- Returns
PSubscription – An ISubscription for the callback.
- Throws
CInvalidArgumentException
– Empty callback handler specified.CCommunicationErrorException
– Protocol error.CConnectionLostException
– Connection to controller lost.CRebootedException
– Controller has been rebooted since this object reference was retrieved, invalidating this reference.CIncompatibleException
– Incompatible firmware version loaded.CObjectDestroyedException
– Object is destroyed.
- Remarks
It is not executed when the connection to a sub-controller of this controller is lost.