SubscribeMatch¶
-
virtual PSubscription ISignal::SubscribeMatch(const SUint32Condition &condition, SignalMatchHandler<uint32_t> handler) = 0¶
Subscribes a callback to be executed when the signal matches the specified condition.
- Parameters
condition – SUint32Condition 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. mask is zero).CInvalidArgumentException– Empty callback handler specified.CUnsupportedException– Condition type not supported for this signal (signal data type must be ESignalDataType::Uint32, ESignalDataType::Enum, ESignalDataType::Mask, ESignalDataType::Bool, ESignalDataType::Uint8, ESignalDataType::Int8, ESignalDataType::Uint16, ESignalDataType::Int16 or ESignalDataType::Int32).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.