pub struct BaseEventType {Show 13 fields
pub event_id: ByteString,
pub event_type: NodeId,
pub source_node: NodeId,
pub source_name: UAString,
pub time: DateTime,
pub receive_time: DateTime,
pub local_time: Option<TimeZoneDataType>,
pub message: LocalizedText,
pub severity: u16,
pub condition_class_id: Option<NodeId>,
pub condition_class_name: Option<LocalizedText>,
pub condition_sub_class_id: Option<Vec<NodeId>>,
pub condition_sub_class_name: Option<Vec<LocalizedText>>,
}Expand description
This corresponds to BaseEventType definition in OPC UA Part 5
Fields§
§event_id: ByteStringA unique identifier for an event, e.g. a GUID in a byte string
event_type: NodeIdEvent type describes the type of event
source_node: NodeIdSource node identifies the node that the event originated from or null.
source_name: UAStringSource name provides the description of the source of the event, e.g. the display of the event source
time: DateTimeTime provides the time the event occurred. As close to the event generator as possible.
receive_time: DateTimeReceive time provides the time the OPC UA server received the event from the underlying device of another server.
local_time: Option<TimeZoneDataType>Local time (optional) is a structure containing the offset and daylightsaving flag.
message: LocalizedTextMessage provides a human readable localizable text description of the event.
severity: u16Severity is an indication of the urgency of the event. Values from 1 to 1000, with 1 as the lowest severity and 1000 being the highest. A value of 1000 would indicate an event of catastrophic nature.
Guidance:
- 801-1000 - High
- 601-800 - Medium High
- 401-600 - Medium
- 201-400 - Medium Low
- 1-200 - Low
condition_class_id: Option<NodeId>Condition Class Id specifies in which domain this Event is used.
condition_class_name: Option<LocalizedText>Condition class name specifies the name of the condition class of this event, if set.
condition_sub_class_id: Option<Vec<NodeId>>ConditionSubClassId specifies additional classes that apply to the Event. It is the NodeId of the corresponding subtype of BaseConditionClassType.
condition_sub_class_name: Option<Vec<LocalizedText>>Condition sub class name specifies the names of additional classes that apply to the event.
Implementations§
Source§impl BaseEventType
impl BaseEventType
Sourcepub fn new_now(
type_id: impl Into<NodeId>,
event_id: ByteString,
message: impl Into<LocalizedText>,
) -> Self
pub fn new_now( type_id: impl Into<NodeId>, event_id: ByteString, message: impl Into<LocalizedText>, ) -> Self
Create a new event with Time set to current time.
Sourcepub fn new(
type_id: impl Into<NodeId>,
event_id: ByteString,
message: impl Into<LocalizedText>,
time: DateTime,
) -> Self
pub fn new( type_id: impl Into<NodeId>, event_id: ByteString, message: impl Into<LocalizedText>, time: DateTime, ) -> Self
Create a new event.
Sourcepub fn new_event(
type_id: impl Into<NodeId>,
event_id: ByteString,
message: impl Into<LocalizedText>,
_namespace: &NamespaceMap,
time: DateTime,
) -> Self
pub fn new_event( type_id: impl Into<NodeId>, event_id: ByteString, message: impl Into<LocalizedText>, _namespace: &NamespaceMap, time: DateTime, ) -> Self
Create a new event, resolving the event type ID.
Sourcepub fn set_source_node(self, source_node: NodeId) -> Self
pub fn set_source_node(self, source_node: NodeId) -> Self
Set the event source node.
Sourcepub fn set_source_name(self, source_name: UAString) -> Self
pub fn set_source_name(self, source_name: UAString) -> Self
Set the event source name.
Sourcepub fn set_receive_time(self, receive_time: DateTime) -> Self
pub fn set_receive_time(self, receive_time: DateTime) -> Self
Set the event receive time.
Sourcepub fn set_severity(self, severity: u16) -> Self
pub fn set_severity(self, severity: u16) -> Self
Set the event severity.
Trait Implementations§
Source§impl Debug for BaseEventType
impl Debug for BaseEventType
Source§impl Default for BaseEventType
impl Default for BaseEventType
Source§fn default() -> BaseEventType
fn default() -> BaseEventType
Source§impl Event for BaseEventType
impl Event for BaseEventType
Source§fn get_field(
&self,
type_definition_id: &NodeId,
attribute_id: AttributeId,
index_range: &NumericRange,
browse_path: &[QualifiedName],
) -> Variant
fn get_field( &self, type_definition_id: &NodeId, attribute_id: AttributeId, index_range: &NumericRange, browse_path: &[QualifiedName], ) -> Variant
Variant::Empty
if the field is not valid for the event.