CDPEventListener
CDPEventListener
The CDPEventListener is a block that listens to CDP object events (like CDP alarms set or cleared) and emits them as sequencer events immediately.
The CDPEventListener is useful when the application must take some immediate actions when some sort of CDP event has been reported by some object in the CDP system. Unlike the other CDP event-related sequencer block EventLogReader, the CDPEventListener needs no CDP Logger to be existing in the system. Also, the CDPEventListener emits the sequencer event immediately after the CDP object event has been reported, unlike the EventLogReader block, which has a delay caused by the CDP Logger that has to log the event first and only then EventLogReader can notify about it, from the logger database.
Note: The CDPEventListener can listen only to events of the CDP objects from the same application it is residing on. You should add CDPEventListener to every application whose objects need prompt reactions on events. Or, when the prompt reacting on events is not so important, then you can use the EventLogReader block together with CDP Logger that can listen to the events of the CDP objects of all the applications of the system.
Events
Name | Input/Output | Description |
---|---|---|
CDPEvent | Output | Will be emitted (with arguments containing the event data) for each CDP object event reported |
Init | Input | Starts the CDP object event emitting to CDPEvent. This event is mandatory to be sent when the WaitForInit is set. |
Arguments
Name | Description |
---|---|
Path | The path (full Routing) to the object that generated the CDP event |
Id | The unique identifier of the CDP event |
Code | CDP event code flags. See CDP Event Code Flags for details. |
Status | The new status of the object that caused the CDP event after the CDP event occurred. For alarms see the Alarm Status Defines in CDPAlarm documentation. |
Timestamp | The Unix epoch timestamp when the CDP event occurred in the unit specified by the TimeUnit property |
Text | Optional text sent with the CDP event. |
Level | Optional level data (for example sent with CDPAlarm events). |
Desc | Optional description sent with the CDP event. Describes the object that emitted the CDP event. |
EventData | Semicolon-separated name=value pairs containing other optional data sent with the CDP event. |
CDP Event Code Flags
Common event codes used in the CDP framework (note multiple flags can be set at the same time)): Common event codes used in the CDP framework (note that multiple flags can be set at the same time):
Name | Code | Description |
---|---|---|
AlarmSet | 0x1 | The alarm's Set flag/state was set. The alarm changed state to "Unack-Set" (The Unack flag was set if not already set). |
AlarmClr | 0x2 | The alarm's Set flag was cleared. The Unack state is unchanged. |
AlarmAck | 0x4 | The alarm changed state from "Unacknowledged" to "Acknowledged". The Set state is unchanged. |
AlarmReprise | 0x40 | A repetition/update of an event that has been reported before. Courtesy of late subscribers. |
SourceObjectUnavailable | 0x100 | The provider of the event has become unavailable (disconnected or similar). |
NodeBoot | 0x40000000 | The provider reports that the CDPEventNode has just booted. |
Properties
Name | Description |
---|---|
ListenPaths | Semicolon-separated list of CDP object object paths to listen on. When left empty, all object events are listened. |
ListenAlarmReprises | When set to true, then the block listens (and emits) alarm reprise events. |
TimeUnit | Unit of the Timestamp argument. Can be set to Second, Millisecond, Microsecond or Nanosecond since epoch (Unix timestamp). |
WaitForInit | When set, then at application startup the emitting of CDPEvents will be held back until the Init event is received |
HistoryPoolSize | Max number of past events that will be kept in the block pool to be re-reported on Init |
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.