Struct opcua_server::prelude::NotificationMessage [−][src]
pub struct NotificationMessage {
pub sequence_number: u32,
pub publish_time: DateTime,
pub notification_data: Option<Vec<ExtensionObject, Global>>,
}Fields
sequence_number: u32publish_time: DateTimenotification_data: Option<Vec<ExtensionObject, Global>>Implementations
pub fn data_change(
sequence_number: u32,
publish_time: DateTime,
data_change_notifications: Vec<MonitoredItemNotification, Global>,
event_notifications: Vec<EventFieldList, Global>
) -> NotificationMessage
pub fn data_change(
sequence_number: u32,
publish_time: DateTime,
data_change_notifications: Vec<MonitoredItemNotification, Global>,
event_notifications: Vec<EventFieldList, Global>
) -> NotificationMessage
Create a notification message which contains data change AND / OR events. Calling this with neither will panic. Notification data can have up to 2 elements to covers the case in table 158 where a subscription contains monitored items for events and data.
pub fn status_change(
sequence_number: u32,
publish_time: DateTime,
status: StatusCode
) -> NotificationMessage
pub fn status_change(
sequence_number: u32,
publish_time: DateTime,
status: StatusCode
) -> NotificationMessage
Create a status change notification message
Create a keep-alive notification message
pub fn notifications(
&self,
decoding_limits: &DecodingLimits
) -> Option<(Vec<DataChangeNotification, Global>, Vec<EventNotificationList, Global>)>
pub fn notifications(
&self,
decoding_limits: &DecodingLimits
) -> Option<(Vec<DataChangeNotification, Global>, Vec<EventNotificationList, Global>)>
Extract notifications from the message. Unrecognized / unparseable notifications will be
ignored. If there are no notifications, the function will return None.
Trait Implementations
Returns the exact byte length of the structure as it would be if encode were called.
This may be called prior to writing to ensure the correct amount of space is available. Read more
Encodes the instance to the write stream.
pub fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<NotificationMessage, StatusCode> where
S: Read,
pub fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<NotificationMessage, StatusCode> where
S: Read,
Decodes an instance from the read stream. The decoding limits are restrictions set by the server / client
on the length of strings, arrays etc. If these limits are exceeded the implementation should
return with a BadDecodingError as soon as possible. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for NotificationMessage
impl Send for NotificationMessage
impl Sync for NotificationMessage
impl Unpin for NotificationMessage
impl UnwindSafe for NotificationMessage
Blanket Implementations
Mutably borrows from an owned value. Read more