Event Types
Event types are used by Apis Chronical for two purposes. First, each event type defines the fields that can be included in events of that type. Secondly, they define a hierarchy of increasingly more specialized types. For example, the DiscreteAlarm type inherits from/is a specialization of the generic Alarm type. This hierarchy then defines the semantics of each event type, i.e. all subtypes of the Alarm type are also some kind of alarms.
Predefined Types
The following event type hierarchy is predefined in Apis Hive/Chronical:
Event
ConditionEvent
Alarm
DiscreteAlarm
DataValidationAlarm
OffNormalAlarm
QualityAlarm
WatchdogAlarm
LimitAlarm
LevelAlarm
OpcAlarm
SystemEvent
BatchEvent
DeviceEvent
ProcessEvent
TimeSeriesEvent
TraceEvent
TrackingEvent
AdvancedControlEvent
OperatorChangeEvent
SecurityEvent
SessionEvent
LogonEvent
SystemConfigEvent
EventSourceModified
The following event fields are defined by these event types:
Field name | Defined by | Datatype | Description |
---|---|---|---|
Timestamp | Event | time64 | Date and time of event, 100ns resolution |
Generation | Event | uint32 | Internal usage |
Sequence | Event | uint32 | Internal usage |
Source | Event | uint32 | ID of event source |
Type | Event | uint32 | ID of event type |
State | Event | uint32 | Bitmap of event states |
Severity | Event | uint16 | The severity of the event in range 0-1000 |
Message | Event | string | Unstructured information intended for humans |
Received | Event | time64 | Date and time when event was received |
Sourcename | Event | string | Extra source description |
UserName | Event | string | Name of related user |
Category | Event | uint32 | ID of classical OPC AE event category |
ActiveTime | ConditionEvent | time64 | Date and time when the condition became active |
CurrentValue | ConditionEvent | variant | Current observed value of the monitored signal |
CurrentQuality | ConditionEvent | uint16 | Current observed OPC quality of the monitored signal |
CurrentTimestamp | ConditionEvent | time64 | Current observed date and time of the monitored signal |
LastState | ConditionEvent | variant | Previous event state |
LastValue | ConditionEvent | variant | Previous observed value of the monitored signal |
LastQuality | ConditionEvent | uint16 | Previous observed OPC quality of the monitored signal |
LastTimestamp | ConditionEvent | time64 | Previous observed date and time of the monitored signal |
LastSeverity | ConditionEvent | variant | Previous event severity |
UnshelveTime | ConditionEvent | time64 | Date and time when event should be unshelved |
Comment | ConditionEvent | string | User comment given by e.g. Acknowledge |
AckTime | ConditionEvent | time64 | Date and time when alarm was Acknowledged |
ConditionName | OpcEvent | string | OPC AE condition name |
SubconditionName | OpcEvent | string | OPC AE subcondition name |
StartTime | TimeSeriesEvent | time64 | Internal usage |
EndTime | TimeSeriesEvent | time64 | Internal usage |
Samples | TimeSeriesEvent | uint32 | Internal usage |
Status | TrackingEvent | bool | Indicates if the requested action was successfull |
ClientAuditId | TrackingEvent | string | Audit ID specified by client |
OldName | EventSourceModified | string | The old name of the event source |
OldFlags | EventSourceModified | string | The old flags value of the event source |
NewName | EventSourceModified | string | The new name of the event source |
NewFlags | EventSourceModified | string | The new flags value of the event source |
Supported Datatypes
The event field datatype is either a scalar or an array of one of the following base types:
- bool
- uint8
- uint16
- uint32
- uint64
- int8
- int16
- int32
- int64
- time64
- float32
- float64
- string
- variant
Flags
The following flags can be specified on each event type:
Name | Description |
---|---|
Deleted | Events of this type should not be included in query results |
Immutable | Events of this type are never replaced/updated by newer events |
The "Immutable" flag is used if Chronical receives events from another server, and that server generates multiple events with the same Timestamp, Type, and Source, and these events should all be considered valid. The default behaviour in Chronical is to consider such event series as updated/replaced events, meaning that only the last event received with a specific Timestamp, Type, and Source would be retreived on historial reads.
The following flags can be specified on each event field:
Name | Description |
---|---|
Deleted | This field should not be included in query results |
Sticky | Events without this field inherits the field from the previous event |
The "Sticky" flag can be used to attach third-party information on an event that will be automatically preserved on newer events with identical Type and Source where the "Sticky" field is not present.