Struct opcua_core::prelude::request_header::RequestHeader
source · [−]pub struct RequestHeader {
pub authentication_token: NodeId,
pub timestamp: DateTime,
pub request_handle: u32,
pub return_diagnostics: DiagnosticBits,
pub audit_entry_id: UAString,
pub timeout_hint: u32,
pub additional_header: ExtensionObject,
}
Expand description
The RequestHeader
contains information common to every request from a client to the server.
Fields
authentication_token: NodeId
The secret Session identifier used to verify that the request is associated with the Session. The SessionAuthenticationToken type is defined in 7.31.
timestamp: DateTime
The time the Client sent the request. The parameter is only used for diagnostic and logging purposes in the server.
request_handle: u32
A requestHandle associated with the request. This client defined handle can be used to cancel the request. It is also returned in the response.
return_diagnostics: DiagnosticBits
A bit mask that identifies the types of vendor-specific diagnostics to be returned in diagnosticInfo response parameters. The value of this parameter may consist of zero, one or more of the following values. No value indicates that diagnostics are not to be returned.
Bit Value Diagnostics to return 0x0000 0001 ServiceLevel / SymbolicId 0x0000 0002 ServiceLevel / LocalizedText 0x0000 0004 ServiceLevel / AdditionalInfo 0x0000 0008 ServiceLevel / Inner StatusCode 0x0000 0010 ServiceLevel / Inner Diagnostics 0x0000 0020 OperationLevel / SymbolicId 0x0000 0040 OperationLevel / LocalizedText 0x0000 0080 OperationLevel / AdditionalInfo 0x0000 0100 OperationLevel / Inner StatusCode 0x0000 0200 OperationLevel / Inner Diagnostics
Each of these values is composed of two components, level and type, as described below. If none are requested, as indicated by a 0 value, or if no diagnostic information was encountered in processing of the request, then diagnostics information is not returned.
Level: ServiceLevel return diagnostics in the diagnosticInfo of the Service. OperationLevel return diagnostics in the diagnosticInfo defined for individual operations requested in the Service.
Type: SymbolicId return a namespace-qualified, symbolic identifier for an error or condition. The maximum length of this identifier is 32 characters. LocalizedText return up to 256 bytes of localized text that describes the symbolic id. AdditionalInfo return a byte string that contains additional diagnostic information, such as a memory image. The format of this byte string is vendor-specific, and may depend on the type of error or condition encountered. InnerStatusCode return the inner StatusCode associated with the operation or Service. InnerDiagnostics return the inner diagnostic info associated with the operation or Service. The contents of the inner diagnostic info structure are determined by other bits in the mask. Note that setting this bit could cause multiple levels of nested diagnostic info structures to be returned.
audit_entry_id: UAString
An identifier that identifies the Client’s security audit log entry associated with this request. An empty string value means that this parameter is not used. The AuditEntryId typically contains who initiated the action and from where it was initiated. The AuditEventId is included in the AuditEvent to allow human readers to correlate an Event with the initiating action. More details of the Audit mechanisms are defined in 6.2 and in Part 3.
timeout_hint: u32
This timeout in milliseconds is used in the Client side Communication Stack to set the timeout on a per-call base. For a Server this timeout is only a hint and can be used to cancel long running operations to free resources. If the Server detects a timeout, he can cancel the operation by sending the Service result BadTimeout. The Server should wait at minimum the timeout after he received the request before cancelling the operation. The Server shall check the timeoutHint parameter of a PublishRequest before processing a PublishResponse. If the request timed out, a BadTimeout Service result is sent and another PublishRequest is used. The value of 0 indicates no timeout.
additional_header: ExtensionObject
Reserved for future use. Applications that do not understand the header should ignore it.
Implementations
sourceimpl RequestHeader
impl RequestHeader
pub fn new(
authentication_token: &NodeId,
timestamp: &DateTime,
request_handle: u32
) -> RequestHeader
pub fn dummy() -> RequestHeader
Trait Implementations
sourceimpl BinaryEncoder<RequestHeader> for RequestHeader
impl BinaryEncoder<RequestHeader> for RequestHeader
sourcefn byte_len(&self) -> usize
fn byte_len(&self) -> usize
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
sourcefn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode> where
S: Write,
fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode> where
S: Write,
Encodes the instance to the write stream.
sourcefn decode<S>(
stream: &mut S,
decoding_options: &DecodingOptions
) -> Result<RequestHeader, StatusCode> where
S: Read,
fn decode<S>(
stream: &mut S,
decoding_options: &DecodingOptions
) -> Result<RequestHeader, StatusCode> where
S: Read,
Decodes an instance from the read stream. The decoding options contains 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
fn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourceimpl Clone for RequestHeader
impl Clone for RequestHeader
sourcefn clone(&self) -> RequestHeader
fn clone(&self) -> RequestHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RequestHeader
impl Debug for RequestHeader
sourceimpl PartialEq<RequestHeader> for RequestHeader
impl PartialEq<RequestHeader> for RequestHeader
sourcefn eq(&self, other: &RequestHeader) -> bool
fn eq(&self, other: &RequestHeader) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RequestHeader) -> bool
fn ne(&self, other: &RequestHeader) -> bool
This method tests for !=
.
impl StructuralPartialEq for RequestHeader
Auto Trait Implementations
impl RefUnwindSafe for RequestHeader
impl Send for RequestHeader
impl Sync for RequestHeader
impl Unpin for RequestHeader
impl UnwindSafe for RequestHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more