SubscribeProgress¶
-
virtual PSubscription IUpdatable::SubscribeProgress(double increment, UpdatableProgressHandler handler, double interval = std::numeric_limits<double>::max()) = 0¶
Subscribes a callback to be executed when the progress of a transfer reaches a multiple of increment or when the time since the previous callback reaches interval.
- Parameters
increment – Progress increment [0.05-1.0], e.g. use 0.05 for progress events every 5% of the total transfer size.
handler – Function to be called.
interval – Progress maximum interval in seconds.
- Returns
PSubscription – An ISubscription for the callback.
- Throws
CInvalidArgumentException
– Invalid increment value.CInvalidArgumentException
– Empty callback handler specified.CInvalidArgumentException
– Invalid interval value (NaN).COutOfResourcesException
– No resources available to subscribe callback.CCommunicationErrorException
– Protocol error.CConnectionLostException
– Connection to controller lost.CRebootedException
– Controller has been rebooted since this object reference was retrieved, invalidating this reference.