The PIEventObject is used to represent changes to the server delivered by the EventPipe object. A client application retrieves an EventPipe for an object in order to track changes on the server of that object. When changes occur, these changes are added to the EventPipe for the client to retrieve. When these changes are retrieved (using, EventPipe methods Take, TakeAll, or Peek) the changes are encapsulated in a PIEventObject.
The PIEventObject properties available are dependent on the type of EventPipe they were obtained from and what happened (see below). The PIEventObject supports four properties which perform the following functions:
Action: describes what happened.
PassivationString: provides a way for the user to obtain the object where the action happened.
EventData: provides the new data
ReceivedTime: notes when the object was added to the pipe (as opposed to when it was modified on the server which is usually in the object itself.
As mentioned above, the nature of data being returned requires different handling. In particular:
For high frequency data, like snapshot and archive events we provide the
actual events. For low frequency data we provide a passivation string allowing the user to instantiate the desired object and inspect its properties.
For data values (PIPoint.Data.Eventpipe, PointList.ListData.Eventpipe) we combine new snapshots and archive edits into the same pipe and the Action for all the events in these Eventpipe is eaUpdate. If you are interested in monitoring specifically archive edit events, you should use the ArchiveEventPipe where the Action of the archive events differentiates between add, edit and delete.
The complete list of the properties returned for each EventPipe type (provider) is:
|EventPipe source||Data type||Action||Passivation string creates||EventData||Purpose|
|PIPoints||Point database Updates||Add, Edit, Delete||PIPoint (If deleted, then this can't be used to retrieve item)||NamedValues collection:
|New, edited or removed point definition|
|PIPoint.Data, PointList.ListData||All new snapshot and archive edit events||update||n/a||PointValue||All new snapshot and archive edit events for the point or pointlist|
|IPIData2.ArchiveEventPipe, ListData.ArchiveEventpipe||Archive Data Updates||add, edit, addNoReplace, delete||n/a||PointValue||new, edited, or removed archive values for the point or pointlist|
|TransferRecordDB||PITransferRecord||add, edit, delete||PITransferRecord
(If deleted, then this can't be used to retrieve item)
|new, edited, or deleted PITransferRecord.|
|PIBatchDB||PIBatch||add, edit, delete||PIBatch (If deleted, then this can't be used to retrieve item)||NamedValues collection:
|new, edited, or deleted PIBatch|
|PIModule||PIUnitBatch||add, edit, delete||UnitBatch (If deleted, then this can't be used to retrieve item)||NamedValues collection:
|new, edited, or
NOTE: Delete events aren't available until PI 3.4.
|PIModuleDB||PIModule||add, edit, delete||PIModule (If deleted, then this can't be used to retrieve item)||NamedValues collection:
|new, edited, or
NOTE: OldEffectiveDate is returned only if the effective date was changed.