SubscribeMatch¶
-
virtual PSubscription ISignal::SubscribeMatch(const SDoubleCondition &condition, SignalMatchHandler<double> handler) = 0¶
Subscribes a callback to be executed when the signal matches the specified condition.
- Parameters
condition – SDoubleCondition specifying when callback is to be executed.
handler – Function to be called when match occurs.
- Returns
PSubscription – An ISubscription for the callback.
- Throws
CInvalidArgumentException
– Invalid condition (e.g. invalid operator).CInvalidArgumentException
– Empty callback handler specified.CUnsupportedException
– Condition type not supported for this signal (signal data type must be ESignalDataType::Double or ESignalDataType::Float).CUnsupportedException
– Signal doesn’t support match functionality (see product specific documentation).CInvalidOperationException
– Top-controller state is not “Run”.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.