Skip to main content

BaseEventType

Struct BaseEventType 

Source
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: ByteString

A unique identifier for an event, e.g. a GUID in a byte string

§event_type: NodeId

Event type describes the type of event

§source_node: NodeId

Source node identifies the node that the event originated from or null.

§source_name: UAString

Source name provides the description of the source of the event, e.g. the display of the event source

§time: DateTime

Time provides the time the event occurred. As close to the event generator as possible.

§receive_time: DateTime

Receive 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: LocalizedText

Message provides a human readable localizable text description of the event.

§severity: u16

Severity 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

Source

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.

Source

pub fn new( type_id: impl Into<NodeId>, event_id: ByteString, message: impl Into<LocalizedText>, time: DateTime, ) -> Self

Create a new event.

Source

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.

Source

pub fn set_source_node(self, source_node: NodeId) -> Self

Set the event source node.

Source

pub fn set_source_name(self, source_name: UAString) -> Self

Set the event source name.

Source

pub fn set_receive_time(self, receive_time: DateTime) -> Self

Set the event receive time.

Source

pub fn set_severity(self, severity: u16) -> Self

Set the event severity.

Trait Implementations§

Source§

impl Debug for BaseEventType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BaseEventType

Source§

fn default() -> BaseEventType

Returns the “default value” for a type. Read more
Source§

impl Event for BaseEventType

Source§

fn time(&self) -> &DateTime

Get the Time of this event.
Source§

fn get_field( &self, type_definition_id: &NodeId, attribute_id: AttributeId, index_range: &NumericRange, browse_path: &[QualifiedName], ) -> Variant

Get a field from the event. Should return Variant::Empty if the field is not valid for the event.
Source§

fn event_type_id(&self) -> &NodeId

Get the event type ID of this event.
Source§

impl EventField for BaseEventType

Source§

fn get_value( &self, attribute_id: AttributeId, index_range: &NumericRange, remaining_path: &[QualifiedName], ) -> Variant

Get the variant representation of this field, using the given index range. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more