Skip to main content

opcua_types/
data_types.rs

1// OPCUA for Rust
2// SPDX-License-Identifier: MPL-2.0
3// Copyright (C) 2017-2024 Adam Lock
4
5//! Certain aliases for OPC-UA data types.
6
7use crate::{date_time::DateTime, ByteString, NodeId, UAString};
8
9/// This primitive data type is a UInt32 that is used as an identifier, such as a handle.
10/// All values, except for 0, are valid. IntegerId = 288,
11pub type IntegerId = u32;
12
13/// This Simple DataType is a Double that defines an interval of time in milliseconds (fractions can
14/// be used to define sub-millisecond values). Negative values are generally invalid but may have
15/// special meanings where the Duration is used. Duration = 290,
16pub type Duration = f64;
17
18/// UtcTime = 294,
19pub type UtcTime = DateTime;
20
21/// OPC-UA UriString, represented as just a string.
22pub type UriString = UAString;
23
24/// OPC-UA AudiDataType, represented as just a ByteString.
25pub type AudioDataType = ByteString;
26
27/// OPC-UA LocaleId.
28pub type LocaleId = UAString;
29
30/// OPC-UA raw continuation point, alias for ByteString.
31pub type ContinuationPoint = ByteString;
32
33/// OPC-UA Index, alias for u32.
34pub type Index = u32;
35
36/// OPC-UA Counter, alias for u32.
37pub type Counter = u32;
38
39/// OPC-UA VersionTime, alias for u32.
40pub type VersionTime = u32;
41
42/// OPC-UA application instance certificate, alias for ByteString.
43pub type ApplicationInstanceCertificate = ByteString;
44
45/// OPC-UA SessionAuthenticationToken, alias for NodeId.
46pub type SessionAuthenticationToken = NodeId;