The client uses the AckCondition method to acknowledge one or more conditions
in the Event Server. The client receives event notifications from conditions via the OnEvent callback.
This AckCondition method specifically acknowledges the condition becoming active
or transitioning into a different sub-condition (and no other state transition
of the condition). One or more conditions belong to a specific event source – the source of the event notification.
For each condition-related event notification,
the corresponding Source, Condition Name, Active Time and Cookie is received by the client as part of the OnEvent callback parameters.
Syntax
Parameters
- AcknowledgerID
- A string passed in by the client, identifying who is acknowledging the conditions.
This is an attribute (AcknowledgerID) of the condition that identifies who acknowledged the condition.
This is just a string generated by the client. This is also also included as the ActorID in the acknowledgment event
notification sent to all subscribing clients. A NULL string is not allowed, since a NULL AcknowledgerID indicates that
the event was automatically acknowledged by the server.
- Comment
- Comment string passed in by the client associated with acknowledging the conditions.
A NULL string indicating no comment is allowed.
- Source
- Array of event source strings identifying the source (or owner) of each condition that is being
acknowledged, e.g. FIC101. Sources are passed to the client in the szSource member of the ONEVENTSTRUCT by the
IOPCEventSink::OnEvent callback.
- ConditionName
- Array of Condition Name strings identifying each condition that is being acknowledged.
Condition Names are unique within the scope of the event server. Examples of Condition Names might be “LevelAlarm”
or “Deviation”. Condition Names are passed to the client in the szConditionName member of the ONEVENTSTRUCT by the
OnEvent callback.
- ActiveTime
- Array of active times corresponding to each Source and ConditionName pair.
This parameter uniquely identifies a specific transition of the condition to the active state or into a different
sub-condition and is the same as the SubCondLastActive condition attribute. Active Times are passed to the client
in the ActiveTime member of the ONEVENTSTRUCT by the OnEvent callback. If the condition has become
active again or transitioned into a different sub-condition at a later time, this acknowledgment will be ignored.
- Cookie
- Array of server supplied “cookies” corresponding to each Source and Condition Name pair,
that in addition to the Active Time, uniquely identifies a specific event notification.
Cookies are passed to the client in the dwCookie member of the ONEVENTSTRUCT by the OnEvent callback.
The client is responsible for returning the same cookie parameter, received in the event notification,
back to the server in the condition acknowledgment.
- Errors
- Array of HRESULTS indicating the success of the individual acknowledgments.
The errors correspond to the Source and ConditionName pairs passed in to the method.
Return Value
HRESULTS error/success code.
Requirements
Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2016, .NET 4.x
See Also