blob: 3256accac96ddc1b1c600a285bd7a90884237692 [file] [log] [blame]
/////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2000-2019 Ericsson Telecom AB
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
// which accompanies this distribution, and is available at
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
/////////////////////////////////////////////////////////////////////////////////////
// Contributors:
// Akos Makovics
//
// File: UpcUa_Types_Binary.ttcn
// Rev: <RnXnn>
// Prodnr: CNL113861
/////////////////////////////////////////////////////////////////////////////////////
module OpcUa_Types_Binary
{
/////////////////////////////////////////////////////////////
// //
// Encoders and Decoders //
// //
/////////////////////////////////////////////////////////////
external function enc_MessageChunk (in MessageChunk msg) return octetstring
with { extension "prototype(convert) encode(RAW)" }
external function dec_MessageChunk (in octetstring p_oct, out MessageChunk msg) return integer
with {extension "prototype(backtrack) decode (RAW) errorbehavior(ALL:WARNING)"}
external function enc_ServiceBody (in ServiceBody msg) return octetstring
with { extension "prototype(convert) encode(RAW)" }
external function dec_ServiceBody (in octetstring p_oct, out ServiceBody msg) return integer
with {extension "prototype(backtrack) decode (RAW) errorbehavior(ALL:WARNING)"}
/////////////////////////////////////////////////////////////
// //
// Constant Values //
// //
/////////////////////////////////////////////////////////////
const integer Null_Value := -2147483647;
const integer HelloHeaderMsgType := 4998472;
const integer AckHeaderMsgType := 4932417;
const integer ErrorHeaderMsgType := 5395013;
const integer ReverseHelloHeaderMsgType := 4540498;
const integer OpenSecureChannelMsgType := 5132367;
const integer CloseSecureChannelMsgType := 5196867;
const integer ServicesMsgType := 4674381;
const integer FinalChunk := 70;
const integer IntermediateChunk := 67;
const integer ErrorChunk := 65;
/////////////////////////////////////////////////////////////
// //
// Enumerations //
// //
/////////////////////////////////////////////////////////////
type enumerated MessageSecurityMode {
INVALID_0,
NONE_1,
SIGN_2,
SIGNANDENCRYPT_3
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated SecurityTokenRequestType {
ISSUE_0,
RENEW_1
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated NodeClass
{
UNSPECIFIED_0(0),
OBJECT_1(1),
VARIABLE_2(2),
METHOD_4(4),
OBJECT_TYPE_8(8),
VARIABLE_TYPE_16(16),
REFERENCE_TYPE_32(32),
DATA_TYPE_64(64),
VIEW_128(128)
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated StructureType {
STRUCTURE_0,
STRUCTURE_WITH_OPTIONAL_FIELDS_1,
UNION_2
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated ApplicationType {
SERVER_0,
CLIENT_1,
CLIENTANDSERVER_2,
DISCOVERYSERVER_3
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated DataChangeTrigger {
STATUS_0,
STATUS_VALUE_1,
STATUS_VALUE_TIMESTAMP_2
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated MonitoringMode {
DISABLED_0,
SAMPLING_1,
REPORTING_2
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated BrowseDirection {
FORWARD_0,
INVERSE_1,
BOTH_2
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated TimestampsToReturn {
SOURCE_0,
SERVER_1,
BOTH_2,
NEITHER_3
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated UserIdentityTokenType {
ANONYMOUS_0,
USERNAME_1,
CERTIFICATE_2,
ISSUEDTOKEN_3
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated PerformUpdateType {
INSERT_1(1),
REPLACE_2(2),
UPDATE_3(3)
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated PerformUpdateTypeExtended {
INSERT_1(1),
REPLACE_2(2),
UPDATE_3(3),
REMOVE_4(4)
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated IdType
{
NUMERIC_0,
STRING_1,
GUID_2,
OPAQUE_3
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated FilterOperator {
Equals_0,
IsNull_1,
GreaterThan_2,
LessThan_3,
GreaterThanOrEqual_4,
LessThanOrEqual_5,
Like_6,
Not_7,
Between_8,
InList_9,
And_10,
Or_11,
Cast_12,
InView_13,
OfType_14,
RelatedTo_15,
BitwiseAnd_16,
BitwiseOr_17
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated OpenFileMode
{
READ_1(1),
WRITE_2(2),
ERASE_EXISTING_4(4),
APPEND_8(8)
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
type enumerated TrustListMasks
{
none_0(0),
trustedCertificates_1(1),
trustedCrls_2(2),
issuerCertificates_4(4),
issuerCrls_8(8),
all_15(15)
} with {
variant "FIELDLENGTH(32)"
variant "COMP(signbit)"
variant "BYTEORDER(first)"
}
/////////////////////////////////////////////////////////////
// //
// Base Types //
// //
/////////////////////////////////////////////////////////////
//Value 0 is false, any other value is true. Encoder must use value 1 as true
type Byte Boolean;
//An integer value between 0 and 1
type integer Bit with { variant "FIELDLENGTH(1), COMP(nosign), BYTEORDER(first)" };
//An integer value between 0 and 15
type integer Bit4 with { variant "FIELDLENGTH(4), COMP(nosign), BYTEORDER(first)" };
//An integer value between 0 and 63
type integer Bit6 with { variant "FIELDLENGTH(6), COMP(nosign), BYTEORDER(first)" };
//An integer value between -128 and 127 inclusive.
type integer SByte with { variant "FIELDLENGTH(8), COMP(signbit), BYTEORDER(first)" };
//An integer value between 0 and 255 inclusive.
type integer Byte with { variant "FIELDLENGTH(8), COMP(nosign), BYTEORDER(first)" };
//An integer value between -32 768 and 32 767 inclusive.
type integer Int16 with { variant "FIELDLENGTH(16), COMP(signbit), BYTEORDER(first)" };
//An integer value between 0 and 65 535 inclusive.
type integer UInt16 with { variant "FIELDLENGTH(16), COMP(nosign), BYTEORDER(first)" };
//An integer value between 0 and 16 777 215
type integer UInt24 with { variant "FIELDLENGTH(24), COMP(nosign), BYTEORDER(first)" }
//An integer value between -2 147 483 648 and 2 147 483 647 inclusive.
type integer Int32 with { variant "FIELDLENGTH(32), COMP(signbit), BYTEORDER(first)" };
//An integer value between 0 and 4 294 967 295 inclusive.
type integer UInt32 with { variant "FIELDLENGTH(32), COMP(nosign), BYTEORDER(first)" };
//An integer value between -9 223 372 036 854 775 808 and 9 223 372 036 854 775 807 inclusive.
type integer Int64 with { variant "FIELDLENGTH(64), COMP(signbit), BYTEORDER(first)" };
//An integer value between 0 and 18 446 744 073 709 551 615 inclusive.
type integer UInt64 with { variant "FIELDLENGTH(64), COMP(nosign), BYTEORDER(first)" };
//An IEEE single precision (32 bit) floating point value.
type float Float with { variant "FORMAT(IEEE754 float), FIELDLENGTH(32), BYTEORDER(last)"};
//An IEEE double precision (64 bit) floating point value.
type float Double with { variant "FORMAT(IEEE754 double), FIELDLENGTH(64), BYTEORDER(last)"};
//Defines an interval of time in milliseconds
type float Duration with { variant "FORMAT(IEEE754 double), BYTEORDER(last)"};
//Number of 100 nanosecond intervals since January 1, 1601
type integer DateTime with { variant "FIELDLENGTH(64), COMP(signbit), BYTEORDER(first)"};
//Define Coordinated Universal Time (UTC) values.
type DateTime UtcTime;
//Represents the time in seconds since the year 2000. It is used as version number based on the last change time.
type UInt32 VersionTime;
//Represents the value of a counter
type UInt32 Counter;
//Identifies an element of an array
type UInt32 Index;
//Used as an identifier, such as a handle. All values, except for 0, are valid.
type UInt32 IntegerId;
//Representing an image.
type octetstring Image;
//Representing an image in BMP format.
type octetstring ImageBMP;
//Representing an image in GIF format.
type octetstring ImageGIF;
//Representing an image in JPG format.
type octetstring ImageJPG;
//Representing an image in PNG format.
type octetstring ImagePNG;
//Representing audio data. It can be any number of audio formats.
type ByteString AudioData;
//A string that is composed of a language component and a country/region component
type String LocaleId;
//Used to pause a Browse or QueryFirst operation
type ByteString ContinuationPoint;
//Used for indexing a range within an array
type String NumericRange;
//An opaque identifier that is used to identify requests associated with a particular Session.
type NodeId SessionAuthenticationToken;
/////////////////////////////////////////////////////////////
// //
// Complex Types //
// //
/////////////////////////////////////////////////////////////
//Sequence of UTF-8 characters without a null terminator and preceded by the length in bytes.
//A length of -1 is used to indicate a null string
type union String {
NullArray nullString,
NonNullString realString
}
//A 16-byte value that can be used as a globally unique identifier.
type record Guid {
UInt32 data1,
UInt16 data2,
UInt16 data3,
Byte data41,
Byte data42,
Byte data43,
Byte data44,
Byte data45,
Byte data46,
Byte data47,
Byte data48
};
//Sequence of bytes preceded by its length in bytes
type union ByteString {
NullArray nullByteString,
RealByteString realByteString
}
//An XML element, as an XML fragment serialized as UTF-8 string
type ByteString XmlElement;
//An identifier for a node in the address space of an OPC UA Server.
type record NodeId {
Bit4 mask,
Bit namespaceUriBit,
Bit serverIndexBit,
Bit reservedBit1,
Bit reservedBit2,
NodeIdType IdType
} with {
variant (IdType)"CROSSTAG( twoByte, mask = 0;
fourByte, mask = 1;
numeric, mask = 2;
string, mask = 3;
guid, mask = 4;
byteString, mask = 5)";
}
//Helper type, contains the possible body types for NodeId
type union NodeIdType {
TwoByteNodeId twoByte,
FourByteNodeId fourByte,
NumericNodeId numeric,
StringNodeId string,
GuidNodeId guid,
ByteStringNodeId byteString
}
//The body of a two byte node id
type record TwoByteNodeId {
Byte nodeValue
}
//The body of a four byte node id
type record FourByteNodeId {
Byte nameSpace,
UInt16 nodeValue
}
//The body of a numeric node id
type record NumericNodeId {
Byte nameSpace,
UInt32 nodeValue
}
//The body of a string node id
type record StringNodeId {
UInt16 nameSpace,
String nodeValue
}
//The body of a guid node id
type record GuidNodeId {
UInt16 nameSpace,
Guid nodeValue
}
//The body of a byte string node id
type record ByteStringNodeId {
UInt16 nameSpace,
ByteString nodeValue
}
//Extends the NodeId structure by allowing the NamespaceUri to be explicitly specified instead of using the NamespaceIndex.
type record ExpandedNodeId {
NodeId node,
String namespaceUri optional, //not present if null or empty
UInt32 serverIndex optional //not present if null
}with {
variant (namespaceUri) "PRESENCE(node.namespaceUriBit = 1)"
variant (serverIndex) "PRESENCE(node.serverIndexBit = 1)"
}
//Implementation of the Extension Object for the Extensible Parameter types
type record ExtensibleParameter {
Byte encodingByte,
Byte twoByteNodeValue optional,
Byte namespaceIndex optional,
UInt16 fourByteNodeValue optional,
Byte encoding,
Int32 parameterLength optional,
ExtensibleParameterBody extensibleParameterBody optional
} with {
variant (twoByteNodeValue)"PRESENCE( encodingByte = 0)";
variant (namespaceIndex)"PRESENCE( encodingByte = 1)";
variant (fourByteNodeValue)"PRESENCE( encodingByte = 1)";
variant (parameterLength) "PRESENCE( twoByteNodeValue = 594, fourByteNodeValue = 594,
twoByteNodeValue = 597, fourByteNodeValue = 597,
twoByteNodeValue = 600, fourByteNodeValue = 600,
twoByteNodeValue = 603, fourByteNodeValue = 603,
twoByteNodeValue = 724, fourByteNodeValue = 724,
twoByteNodeValue = 727, fourByteNodeValue = 727,
twoByteNodeValue = 730, fourByteNodeValue = 730,
twoByteNodeValue = 736, fourByteNodeValue = 736,
twoByteNodeValue = 739, fourByteNodeValue = 739,
twoByteNodeValue = 354, fourByteNodeValue = 354,
twoByteNodeValue = 357, fourByteNodeValue = 357,
twoByteNodeValue = 360, fourByteNodeValue = 360,
twoByteNodeValue = 363, fourByteNodeValue = 363,
twoByteNodeValue = 366, fourByteNodeValue = 366,
twoByteNodeValue = 369, fourByteNodeValue = 369,
twoByteNodeValue = 372, fourByteNodeValue = 372,
twoByteNodeValue = 375, fourByteNodeValue = 375,
twoByteNodeValue = 1, fourByteNodeValue = 1,
twoByteNodeValue = 321, fourByteNodeValue = 321,
twoByteNodeValue = 324, fourByteNodeValue = 324,
twoByteNodeValue = 327, fourByteNodeValue = 327,
twoByteNodeValue = 940, fourByteNodeValue = 940,
twoByteNodeValue = 12901, fourByteNodeValue = 12901,
twoByteNodeValue = 646, fourByteNodeValue = 646,
twoByteNodeValue = 649, fourByteNodeValue = 649,
twoByteNodeValue = 652, fourByteNodeValue = 652,
twoByteNodeValue = 655, fourByteNodeValue = 655,
twoByteNodeValue = 658, fourByteNodeValue = 658,
twoByteNodeValue = 682, fourByteNodeValue = 682,
twoByteNodeValue = 11300, fourByteNodeValue = 11300,
twoByteNodeValue = 685, fourByteNodeValue = 685,
twoByteNodeValue = 688, fourByteNodeValue = 688,
twoByteNodeValue = 691, fourByteNodeValue = 691,
twoByteNodeValue = 694, fourByteNodeValue = 694,
twoByteNodeValue = 811, fourByteNodeValue = 811,
twoByteNodeValue = 916, fourByteNodeValue = 916,
twoByteNodeValue = 820, fourByteNodeValue = 820)"
variant (extensibleParameterBody) "CROSSTAG( elementOperand, {twoByteNodeValue = 594, fourByteNodeValue = 594};
literalOperand, {twoByteNodeValue = 597, fourByteNodeValue = 597};
attributeOperand, {twoByteNodeValue = 600, fourByteNodeValue = 600};
simpleAttributeOperand, {twoByteNodeValue = 603, fourByteNodeValue = 603};
dataChangeFilter, {twoByteNodeValue = 724, fourByteNodeValue = 724};
eventFilter, {twoByteNodeValue = 727, fourByteNodeValue = 727};
aggregateFilter, {twoByteNodeValue = 730, fourByteNodeValue = 730};
eventFilterResult, {twoByteNodeValue = 736, fourByteNodeValue = 736};
aggregateFilterResult, {twoByteNodeValue = 739, fourByteNodeValue = 739};
objectAttributes, {twoByteNodeValue = 354, fourByteNodeValue = 354};
variableAttributes, {twoByteNodeValue = 357, fourByteNodeValue = 357};
methodAttributes, {twoByteNodeValue = 360, fourByteNodeValue = 360};
objectTypeAttributes, {twoByteNodeValue = 363, fourByteNodeValue = 363};
variableTypeAttributes, {twoByteNodeValue = 366, fourByteNodeValue = 366};
referenceTypeAttributes, {twoByteNodeValue = 369, fourByteNodeValue = 369};
dataTypeAttributes, {twoByteNodeValue = 372, fourByteNodeValue = 372};
viewAttributes, {twoByteNodeValue = 375, fourByteNodeValue = 375};
genericAttributes, {twoByteNodeValue = 1, fourByteNodeValue = 1};
anonymousIdentityToken, {twoByteNodeValue = 321, fourByteNodeValue = 321};
userNameIdentityToken, {twoByteNodeValue = 324, fourByteNodeValue = 324};
x509IdentityToken, {twoByteNodeValue = 327, fourByteNodeValue = 327};
issuedIdentityToken, {twoByteNodeValue = 940, fourByteNodeValue = 940};
mdnsDiscoveryConfiguration, {twoByteNodeValue = 12901, fourByteNodeValue = 12901};
readEventDetails, {twoByteNodeValue = 646, fourByteNodeValue = 646};
readRawModifiedDetails, {twoByteNodeValue = 649, fourByteNodeValue = 649};
readProcessedDetails, {twoByteNodeValue = 652, fourByteNodeValue = 652};
readAtTimeDetails, {twoByteNodeValue = 655, fourByteNodeValue = 655};
dataValues, {twoByteNodeValue = 658, fourByteNodeValue = 658};
updateDataDetails, {twoByteNodeValue = 682, fourByteNodeValue = 682};
updateStructureDataDetails, {twoByteNodeValue = 11300, fourByteNodeValue = 11300};
updateEventDetails, {twoByteNodeValue = 685, fourByteNodeValue = 685};
deleteRawModifiedDetails, {twoByteNodeValue = 688, fourByteNodeValue = 688};
deleteAtTimeDetails, {twoByteNodeValue = 691, fourByteNodeValue = 691};
deleteEventDetails, {twoByteNodeValue = 694, fourByteNodeValue = 694};
dataChangeNotification, {twoByteNodeValue = 811, fourByteNodeValue = 811};
eventNotificationList, {twoByteNodeValue = 916, fourByteNodeValue = 916};
statusChangeNotification, {twoByteNodeValue = 820, fourByteNodeValue = 820})"
}
//Possible extension types
type union ExtensibleParameterBody {
ElementOperand elementOperand,
LiteralOperand literalOperand,
AttributeOperand attributeOperand,
SimpleAttributeOperand simpleAttributeOperand,
DataChangeFilter dataChangeFilter,
EventFilter eventFilter,
AggregateFilter aggregateFilter,
EventFilterResult eventFilterResult,
AggregateFilterResult aggregateFilterResult,
ObjectAttributes objectAttributes,
VariableAttributes variableAttributes,
MethodAttributes methodAttributes,
ObjectTypeAttributes objectTypeAttributes,
VariableTypeAttributes variableTypeAttributes,
ReferenceTypeAttributes referenceTypeAttributes,
DataTypeAttributes dataTypeAttributes,
ViewAttributes viewAttributes,
GenericAttributes genericAttributes,
UserNameIdentityToken userNameIdentityToken,
X509IdentityToken x509IdentityToken,
IssuedIdentityToken issuedIdentityToken,
AnonymousIdentityToken anonymousIdentityToken,
MdnsDiscoveryConfiguration mdnsDiscoveryConfiguration,
ReadEventDetails readEventDetails,
ReadRawModifiedDetails readRawModifiedDetails,
ReadProcessedDetails readProcessedDetails,
ReadAtTimeDetails readAtTimeDetails,
ListOfDataValue dataValues,
UpdateDataDetails updateDataDetails,
UpdateStructureDataDetails updateStructureDataDetails,
UpdateEventDetails updateEventDetails,
DeleteRawModifiedDetails deleteRawModifiedDetails,
DeleteAtTimeDetails deleteAtTimeDetails,
DeleteEventDetails deleteEventDetails,
DataChangeNotification dataChangeNotification,
EventNotificationList eventNotificationList,
StatusChangeNotification statusChangeNotification
}
//A numeric identifier for an error or condition that is associated with a value or an operation.
type UInt32 StatusCode;
//A structure that contains detailed error and diagnostic information associated with a StatusCode.
type record DiagnosticInfo {
Bit symbolicIdBit,
Bit namespaceUriBit,
Bit localeBit,
Bit localisedTextBit,
Bit additionalInfoBit,
Bit innerStatusCodeBit,
Bit innerDiagnosticInfoBit,
Bit reserveBit,
Int32 symbolicId optional,
Int32 namespaceUri optional,
Int32 locale optional,
Int32 localisedText optional,
String additionalInfo optional,
StatusCode innerStatusCode optional,
DiagnosticInfo innerDiagnosticInfo optional
}with {
variant (symbolicId) "PRESENCE(symbolicIdBit = 1)";
variant (namespaceUri) "PRESENCE(namespaceUriBit = 1)";
variant (locale) "PRESENCE(localeBit = 1)";
variant (localisedText) "PRESENCE(localisedTextBit = 1)";
variant (additionalInfo) "PRESENCE(additionalInfoBit = 1)";
variant (innerStatusCode) "PRESENCE(innerStatusCodeBit = 1)";
variant (innerDiagnosticInfo) "PRESENCE(innerDiagnosticInfoBit = 1)";
}
//A name qualified by a namespace.
type record QualifiedName {
UInt16 namespaceIndex,
String name
}
//Human readable text with an optional locale identifier.
type record LocalizedText {
Bit localeBit,
Bit textBit,
Bit spareBit1,
Bit spareBit2,
Bit spareBit3,
Bit spareBit4,
Bit spareBit5,
Bit spareBit6,
String locale optional,
String text optional
} with {
variant (locale) "PRESENCE(localeBit = 1)";
variant (text) "PRESENCE(textBit = 1)";
}
//A structure that contains an application specific data type that may not be recognized by the receiver
type record ExtensionObject {
NodeId typeId,
Byte encoding,
Int32 Length,
ExtensionObjectBody body optional
} with {
variant (body)"CROSSTAG( byteString, encoding = 1;
xmlElement, encoding = 2)";
}
type union ExtensionObjectBody {
ListOfByte byteString,
octetstring xmlElement
}
//A union of all of the types specified above.
type record Variant {
Bit6 encodingBits,
Bit arrayDimensionsBit,
Bit arrayEncodedBit,
Int32 arrayLength optional,
VariantSingleValue ValueSingle optional,
VariantArrayValue ValueArray optional,
Int32 arrayDimensionsLenght optional,
ListOfInt32 arrayDimensions optional
} with {
variant (arrayDimensions) "PRESENCE(arrayDimensionsBit = 1)";
variant (arrayDimensionsLenght) "PRESENCE(arrayDimensionsBit = 1)";
variant (arrayLength) "PRESENCE(arrayDimensionsBit = 1)";
variant (ValueSingle) "PRESENCE(arrayEncodedBit = 0)"
variant (ValueArray) "PRESENCE(arrayEncodedBit = 1)"
variant (ValueSingle)"CROSSTAG( bool, encodingBits = 1;
sbyte, encodingBits = 2;
byte, encodingBits = 3;
int16, encodingBits = 4;
uint16, encodingBits = 5;
int32, encodingBits = 6;
uint32, encodingBits = 7;
int64, encodingBits = 8;
uint64, encodingBits = 9;
floatValue, encodingBits = 10;
double, encodingBits = 11;
string, encodingBits = 12;
datetime, encodingBits = 13;
guid, encodingBits = 14;
bytestring, encodingBits = 15;
xmlelement, encodingBits = 16;
nodeid, encodingBits = 17;
expandednodeid, encodingBits = 18;
statuscode, encodingBits = 19;
qualifiedname, encodingBits = 20;
localizedtext, encodingBits = 21;
extensionobject, encodingBits = 22;
datavalue, encodingBits = 23;
listofvariant, encodingBits = 24;
diagnosticinfo, encodingBits = 25)";
variant (ValueArray)"CROSSTAG( bool, encodingBits = 1;
sbyte, encodingBits = 2;
byte, encodingBits = 3;
int16, encodingBits = 4;
uint16, encodingBits = 5;
int32, encodingBits = 6;
uint32, encodingBits = 7;
int64, encodingBits = 8;
uint64, encodingBits = 9;
floatValue, encodingBits = 10;
double, encodingBits = 11;
string, encodingBits = 12;
datetime, encodingBits = 13;
guid, encodingBits = 14;
bytestring, encodingBits = 15;
xmlelement, encodingBits = 16;
nodeid, encodingBits = 17;
expandednodeid, encodingBits = 18;
statuscode, encodingBits = 19;
qualifiedname, encodingBits = 20;
localizedtext, encodingBits = 21;
extensionobject, encodingBits = 22;
datavalue, encodingBits = 23;
listofvariant, encodingBits = 24;
diagnosticinfo, encodingBits = 25)";
}
//An union of single values for Variant
type union VariantSingleValue {
Boolean bool,
SByte sbyte,
Byte byte,
Int16 int16,
UInt16 uint16,
Int32 int32,
UInt32 uint32,
Int64 int64,
UInt64 uint64,
Float floatValue,
Double double,
String string,
DateTime datetime,
Guid guid,
ByteString bytestring,
XmlElement xmlelement,
NodeId nodeid,
ExpandedNodeId expandednodeid,
StatusCode statuscode,
QualifiedName qualifiedname,
LocalizedText localizedtext,
ExtensionObject extensionobject,
DataValue datavalue,
ListOfVariant listofvariant,
DiagnosticInfo diagnosticinfo
}
//An union of arrays for Variant
type union VariantArrayValue {
ListOfBoolean bool,
ListOfSByte sbyte,
ListOfByte byte,
ListOfInt16 int16,
ListOfUInt16 uint16,
ListOfInt32 int32,
ListOfUInt32 uint32,
ListOfInt64 int64,
ListOfUInt64 uint64,
ListOfFloat floatValue,
ListOfDouble double,
ListOfString string,
ListOfDateTime datetime,
ListOfGuid guid,
ListOfByteString bytestring,
ListOfXmlElement xmlelement,
ListOfNodeId nodeid,
ListOfExpandedNodeId expandednodeid,
ListOfStatusCode statuscode,
ListOfQualifiedName qualifiedname,
ListOfLocalizedText localizedtext,
ListOfExtensionObject extensionobject,
ListOfDataValue datavalue,
ListOfVariant listofvariant,
ListOfDiagnosticInfo diagnosticinfo
}
//A data value with an associated status code and timestamps.
type record DataValue {
Bit ValueBit,
Bit statusBit,
Bit sourceTimestampBit,
Bit serverTimestampBit,
Bit sourcePicoSecondsBit,
Bit serverPicoSecondsBit,
Bit spareBit1,
Bit spareBit2,
Variant Value optional,
StatusCode status optional,
DateTime sourceTimestamp optional,
UInt16 sourcePicoSeconds optional,
DateTime serverTimestamp optional,
UInt16 serverPicoSeconds optional
} with {
variant (Value) "PRESENCE(ValueBit = 1)";
variant (status) "PRESENCE(statusBit = 1)";
variant (sourceTimestamp) "PRESENCE(sourceTimestampBit = 1)";
variant (sourcePicoSeconds) "PRESENCE(sourcePicoSecondsBit = 1)";
variant (serverTimestamp) "PRESENCE(serverTimestampBit = 1)";
variant (serverPicoSeconds) "PRESENCE(serverPicoSecondsBit = 1)";
}
//A high-precision signed decimal number
type record Decimal {
NodeId typeId,
Byte decimalLength,
Int16 scale,
Byte decimalValue
}
//Structured DataType defines the local time that may or may not take daylight saving time into account.
type record TimeZoneDataType {
Int16 offset,
Boolean daylightSavingInOffset
}
//Defines a Method input or output argument specification.
type record Argument {
String name,
NodeId dataType,
Int32 valueRank,
ListOfUInt32 arrayDimensions,
LocalizedText description
}
//Represent a human-readable representation of an Enumeration.
type record EnumValueType {
Int64 Value,
LocalizedText displayName,
LocalizedText description
}
//Base DataType for all DataTypes representing a bit mask.
type record OptionSet {
ByteString Value,
ByteString validBits
}
//Provides the meta data for a custom Structure DataType.
type record StructureDefinition {
NodeId defaultEncodingId,
NodeId baseDataType,
StructureType structureType,
ListOfStructureField fields
}
//Provides the metadata for a custom Enumeration or OptionSet DataType.
type record EnumDefinition {
ListOfEnumField fields
}
//Provides the metadata for a field of a custom Enumeration or OptionSet DataType.
type record EnumField {
String name
}
//Provides the metadata for a field of a custom Structure DataType.
type record StructureField {
String name,
LocalizedText description,
NodeId dataType,
Int32 valueRank,
Boolean isOptional
}
/////////////////////////////////////////////////////////////
// //
// Lists and Arrays //
// //
/////////////////////////////////////////////////////////////
//Arrays of types. Used in lists, and in templates for lists
type record of Boolean BooleanArray;
type record of SByte SByteArray;
type record of Byte ByteArray;
type record of Int16 Int16Array;
type record of UInt16 UInt16Array;
type record of Int32 Int32Array;
type record of UInt32 UInt32Array;
type record of Int64 Int64Array;
type record of UInt64 UInt64Array;
type record of Float FloatArray;
type record of Double DoubleArray;
type record of DateTime DateTimeArray;
type record of UtcTime UtcTimeArray;
type record of Counter CounterArray;
type record of IntegerId IntegerIdArray;
type record of LocaleId LocaleIdArray;
type record of ContinuationPoint ContinuationPointArray;
type record of String StringArray;
type record of Guid GuidArray;
type record of ByteString ByteStringArray;
type record of XmlElement XmlElementArray;
type record of NodeId NodeIdArray;
type record of ExpandedNodeId ExpandedNodeIdArray;
type record of StatusCode StatusCodeArray;
type record of DiagnosticInfo DiagnosticInfoArray;
type record of QualifiedName QualifiedNameArray;
type record of LocalizedText LocalizedTextArray;
type record of ExtensionObject ExtensionObjectArray;
type record of Variant VariantArray;
type record of DataValue DataValueArray;
type record of Decimal DecimalArray;
type record of EnumValueType EnumValueTypeArray;
type record of EnumField EnumFieldArray;
type record of StructureField StructureFieldArray;
type record of ExtensibleParameter ExtensibleParameterArray;
type record of ApplicationDescription ApplicationDescriptionArray;
type record of BrowseResult BrowseResultArray;
type record of ContentFilterElement ContentFilterElementArray;
type record of ContentFilterElementResult ContentFilterElementResultArray;
type record of SimpleAttributeOperand SimpleAttributeOperandArray;
type record of EndpointDescription EndpointDescriptionArray;
type record of MonitoringParameters MonitoringParametersArray;
type record of GenericAttributeValue GenericAttributeValueArray;
type record of MonitoredItemNotification MonitoredItemNotificationArray;
type record of EventFieldList EventFieldListArray;
type record of QueryDataSet QueryDataSetArray;
type record of ReadValueId ReadValueIdArray;
type record of ReferenceDescription ReferenceDescriptionArray;
type record of RelativePathElement RelativePathElementArray;
type record of ApplicationInstanceCertificate ApplicationInstanceCertificateArray;
type record of ChannelSecurityToken ChannelSecurityTokenArray;
type record of UserTokenPolicy UserTokenPolicyArray;
type record of ServerOnNetwork ServerOnNetworkArray;
type record of AddNodesItem AddNodesItemArray;
type record of AddNodesResult AddNodesResultArray;
type record of AddReferencesItem AddReferencesItemArray;
type record of DeleteNodesItem DeleteNodesItemArray;
type record of DeleteReferencesItem DeleteReferencesItemArray;
type record of SignedSoftwareCertificate SignedSoftwareCertificateArray;
type record of BrowseDescription BrowseDescriptionArray;
type record of BrowsePath BrowsePathArray;
type record of BrowsePathResult BrowsePathResultArray;
type record of BrowsePathTarget BrowsePathTargetArray;
type record of NodeTypeDescription NodeTypeDescriptionArray;
type record of QueryDataDescription QueryDataDescriptionArray;
type record of ParsingResult ParsingResultArray;
type record of HistoryReadValueId HistoryReadValueIdArray;
type record of HistoryReadResult HistoryReadResultArray;
type record of WriteValue WriteValueArray;
type record of HistoryUpdateResult HistoryUpdateResultArray;
type record of CallMethodRequest CallMethodRequestArray;
type record of CallMethodResult CallMethodResultArray;
type record of MonitoredItemCreateRequest MonitoredItemCreateRequestArray;
type record of MonitoredItemCreateResult MonitoredItemCreateResultArray;
type record of MonitoredItemModifyRequest MonitoredItemModifyRequestArray;
type record of MonitoredItemModifyResult MonitoredItemModifyResultArray;
type record of SubscriptionAcknowledgement SubscriptionAcknowledgementArray;
type record of TransferResult TransferResultArray;
//Custom type for NullArrays, which are indicated with a lenght of -1
type record NullArray {
Int32 arrayLength
} with {
variant "PRESENCE(arrayLength = Null_Value)";
}
//Non null arrays. Their length can be zero, or any other positive value
type record ListOfBooleanArray {
Int32 arrayLength,
BooleanArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfSByteArray {
Int32 arrayLength,
SByteArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfByteArray {
Int32 arrayLength,
ByteArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfInt16Array {
Int32 arrayLength,
Int16Array arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfUInt16Array {
Int32 arrayLength,
UInt16Array arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfInt32Array {
Int32 arrayLength,
Int32Array arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfUInt32Array {
Int32 arrayLength,
UInt32Array arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfInt64Array {
Int32 arrayLength,
Int64Array arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfUInt64Array {
Int32 arrayLength,
UInt64Array arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfFloatArray {
Int32 arrayLength,
FloatArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfDoubleArray {
Int32 arrayLength,
DoubleArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfDateTimeArray {
Int32 arrayLength,
DateTimeArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfUtcTimeArray {
Int32 arrayLength,
UtcTimeArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfCounterArray {
Int32 arrayLength,
CounterArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfIntegerIdArray {
Int32 arrayLength,
IntegerIdArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfLocaleIdArray {
Int32 arrayLength,
LocaleIdArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfContinuationPointArray {
Int32 arrayLength,
ContinuationPointArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record NonNullString {
Int32 stringLength,
charstring stringValue
} with {
variant (stringLength) "LENGTHTO(stringValue)";
}
type record ListOfStringArray {
Int32 arrayLength,
StringArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfGuidArray {
Int32 arrayLength,
GuidArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record RealByteString {
Int32 lengthValue,
ByteArray byteStringValue
} with {
variant (lengthValue) "LENGTHTO(byteStringValue)";
variant (lengthValue) "UNIT(elements)"
}
type record ListOfByteStringArray {
Int32 arrayLength,
ByteStringArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfXmlElementArray {
Int32 arrayLength,
XmlElementArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfNodeIdArray {
Int32 arrayLength,
NodeIdArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfExpandedNodeIdArray {
Int32 arrayLength,
ExpandedNodeIdArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfStatusCodeArray {
Int32 arrayLength,
StatusCodeArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfDiagnosticInfoArray {
Int32 arrayLength,
DiagnosticInfoArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfQualifiedNameArray {
Int32 arrayLength,
QualifiedNameArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfLocalizedTextArray {
Int32 arrayLength,
LocalizedTextArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfExtensionObjectArray {
Int32 arrayLength,
ExtensionObjectArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfVariantArray {
Int32 arrayLength,
VariantArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfDataValueArray {
Int32 arrayLength,
DataValueArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfDecimalArray {
Int32 arrayLength,
DecimalArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfEnumValueTypeArray {
Int32 arrayLength,
EnumValueTypeArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfEnumFieldArray {
Int32 arrayLength,
EnumFieldArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfStructureFieldArray {
Int32 arrayLength,
StructureFieldArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfExtensibleParameterArray {
Int32 arrayLength,
ExtensibleParameterArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfApplicationDescriptionArray {
Int32 arrayLength,
ApplicationDescriptionArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfBrowseResultArray {
Int32 arrayLength,
BrowseResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfContentFilterElementArray {
Int32 arrayLength,
ContentFilterElementArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfContentFilterElementResultArray {
Int32 arrayLength,
ContentFilterElementResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfSimpleAttributeOperandArray {
Int32 arrayLength,
SimpleAttributeOperandArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfEndpointDescriptionArray {
Int32 arrayLength,
EndpointDescriptionArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfMonitoringParametersArray {
Int32 arrayLength,
MonitoringParametersArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfGenericAttributeValueArray {
Int32 arrayLength,
GenericAttributeValueArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfMonitoredItemNotificationArray {
Int32 arrayLength,
MonitoredItemNotificationArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfEventFieldListArray {
Int32 arrayLength,
EventFieldListArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfQueryDataSetArray {
Int32 arrayLength,
QueryDataSetArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfReadValueIdArray {
Int32 arrayLength,
ReadValueIdArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfReferenceDescriptionArray {
Int32 arrayLength,
ReferenceDescriptionArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfRelativePathElementArray {
Int32 arrayLength,
RelativePathElementArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfApplicationInstanceCertificateArray {
Int32 arrayLength,
ApplicationInstanceCertificateArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfChannelSecurityTokenArray {
Int32 arrayLength,
ChannelSecurityTokenArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfUserTokenPolicyArray {
Int32 arrayLength,
UserTokenPolicyArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfServerOnNetworkArray {
Int32 arrayLength,
ServerOnNetworkArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfAddNodesItemArray {
Int32 arrayLength,
AddNodesItemArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfAddNodesResultArray {
Int32 arrayLength,
AddNodesResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfAddReferencesItemArray {
Int32 arrayLength,
AddReferencesItemArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfDeleteNodesItemArray {
Int32 arrayLength,
DeleteNodesItemArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfDeleteReferencesItemArray {
Int32 arrayLength,
DeleteReferencesItemArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfSignedSoftwareCertificateArray {
Int32 arrayLength,
SignedSoftwareCertificateArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfBrowseDescriptionArray {
Int32 arrayLength,
BrowseDescriptionArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfBrowsePathArray {
Int32 arrayLength,
BrowsePathArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfBrowsePathResultArray {
Int32 arrayLength,
BrowsePathResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfBrowsePathTargetArray {
Int32 arrayLength,
BrowsePathTargetArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfNodeTypeDescriptionArray {
Int32 arrayLength,
NodeTypeDescriptionArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfQueryDataDescriptionArray {
Int32 arrayLength,
QueryDataDescriptionArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfParsingResultArray {
Int32 arrayLength,
ParsingResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfHistoryReadValueIdArray {
Int32 arrayLength,
HistoryReadValueIdArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfHistoryReadResultArray {
Int32 arrayLength,
HistoryReadResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfWriteValueArray {
Int32 arrayLength,
WriteValueArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfHistoryUpdateResultArray {
Int32 arrayLength,
HistoryUpdateResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfCallMethodRequestArray {
Int32 arrayLength,
CallMethodRequestArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfCallMethodResultArray {
Int32 arrayLength,
CallMethodResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfMonitoredItemCreateRequestArray {
Int32 arrayLength,
MonitoredItemCreateRequestArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfMonitoredItemCreateResultArray {
Int32 arrayLength,
MonitoredItemCreateResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfMonitoredItemModifyRequestArray {
Int32 arrayLength,
MonitoredItemModifyRequestArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfMonitoredItemModifyResultArray {
Int32 arrayLength,
MonitoredItemModifyResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfSubscriptionAcknowledgementArray {
Int32 arrayLength,
SubscriptionAcknowledgementArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
type record ListOfTransferResultArray {
Int32 arrayLength,
TransferResultArray arrayValues
} with {
variant (arrayLength) "LENGTHTO(arrayValues)";
variant (arrayLength) "UNIT(elements)"
}
//List of types. These are used by the services
//Can be null array, or non null array. Null arrays have a length of -1
type union ListOfBoolean {
NullArray nullArray,
ListOfBooleanArray realArray
}
type union ListOfSByte {
NullArray nullArray,
ListOfSByteArray realArray
}
type union ListOfByte {
NullArray nullArray,
ListOfByteArray realArray
}
type union ListOfInt16 {
NullArray nullArray,
ListOfInt16Array realArray
}
type union ListOfUInt16 {
NullArray nullArray,
ListOfUInt16Array realArray
}
type union ListOfInt32 {
NullArray nullArray,
ListOfInt32Array realArray
}
type union ListOfUInt32 {
NullArray nullArray,
ListOfUInt32Array realArray
}
type union ListOfInt64 {
NullArray nullArray,
ListOfInt64Array realArray
}
type union ListOfUInt64 {
NullArray nullArray,
ListOfUInt64Array realArray
}
type union ListOfFloat {
NullArray nullArray,
ListOfFloatArray realArray
}
type union ListOfDouble {
NullArray nullArray,
ListOfDoubleArray realArray
}
type union ListOfDateTime {
NullArray nullArray,
ListOfDateTimeArray realArray
}
type union ListOfUtcTime {
NullArray nullArray,
ListOfUtcTimeArray realArray
}
type union ListOfCounter {
NullArray nullArray,
ListOfCounterArray realArray
}
type union ListOfIntegerId {
NullArray nullArray,
ListOfIntegerIdArray realArray
}
type union ListOfLocaleId {
NullArray nullArray,
ListOfLocaleIdArray realArray
}
type union ListOfContinuationPoint {
NullArray nullArray,
ListOfContinuationPointArray realArray
}
type union ListOfString {
NullArray nullArray,
ListOfStringArray realArray
}
type union ListOfGuid {
NullArray nullArray,
ListOfGuidArray realArray
}
type union ListOfByteString {
NullArray nullArray,
ListOfByteStringArray realArray
}
type union ListOfXmlElement {
NullArray nullArray,
ListOfXmlElementArray realArray
}
type union ListOfNodeId {
NullArray nullArray,
ListOfNodeIdArray realArray
}
type union ListOfExpandedNodeId {
NullArray nullArray,
ListOfExpandedNodeIdArray realArray
}
type union ListOfStatusCode {
NullArray nullArray,
ListOfStatusCodeArray realArray
}
type union ListOfDiagnosticInfo {
NullArray nullArray,
ListOfDiagnosticInfoArray realArray
}
type union ListOfQualifiedName {
NullArray nullArray,
ListOfQualifiedNameArray realArray
}
type union ListOfLocalizedText {
NullArray nullArray,
ListOfLocalizedTextArray realArray
}
type union ListOfExtensionObject {
NullArray nullArray,
ListOfExtensionObjectArray realArray
}
type union ListOfVariant {
NullArray nullArray,
ListOfVariantArray realArray
}
type union ListOfDataValue {
NullArray nullArray,
ListOfDataValueArray realArray
}
type union ListOfDecimal {
NullArray nullArray,
ListOfDecimalArray realArray
}
type union ListOfEnumValueType {
NullArray nullArray,
ListOfEnumValueTypeArray realArray
}
type union ListOfEnumField {
NullArray nullArray,
ListOfEnumFieldArray realArray
}
type union ListOfStructureField {
NullArray nullArray,
ListOfStructureFieldArray realArray
}
type union ListOfExtensibleParameter {
NullArray nullArray,
ListOfExtensibleParameterArray realArray
}
type union ListOfApplicationDescription {
NullArray nullArray,
ListOfApplicationDescriptionArray realArray
}
type union ListOfBrowseResult {
NullArray nullArray,
ListOfBrowseResultArray realArray
}
type union ListOfContentFilterElement {
NullArray nullArray,
ListOfContentFilterElementArray realArray
}
type union ListOfContentFilterElementResult {
NullArray nullArray,
ListOfContentFilterElementResultArray realArray
}
type union ListOfSimpleAttributeOperand {
NullArray nullArray,
ListOfSimpleAttributeOperandArray realArray
}
type union ListOfEndpointDescription {
NullArray nullArray,
ListOfEndpointDescriptionArray realArray
}
type union ListOfMonitoringParameters {
NullArray nullArray,
ListOfMonitoringParametersArray realArray
}
type union ListOfGenericAttributeValue {
NullArray nullArray,
ListOfGenericAttributeValueArray realArray
}
type union ListOfMonitoredItemNotification {
NullArray nullArray,
ListOfMonitoredItemNotificationArray realArray
}
type union ListOfEventFieldList {
NullArray nullArray,
ListOfEventFieldListArray realArray
}
type union ListOfQueryDataSet {
NullArray nullArray,
ListOfQueryDataSetArray realArray
}
type union ListOfReadValueId {
NullArray nullArray,
ListOfReadValueIdArray realArray
}
type union ListOfReferenceDescription {
NullArray nullArray,
ListOfReferenceDescriptionArray realArray
}
type union ListOfRelativePathElement {
NullArray nullArray,
ListOfRelativePathElementArray realArray
}
type union ListOfApplicationInstanceCertificate {
NullArray nullArray,
ListOfApplicationInstanceCertificateArray realArray
}
type union ListOfChannelSecurityToken {
NullArray nullArray,
ListOfChannelSecurityTokenArray realArray
}
type union ListOfUserTokenPolicy {
NullArray nullArray,
ListOfUserTokenPolicyArray realArray
}
type union ListOfServerOnNetwork {
NullArray nullArray,
ListOfServerOnNetworkArray realArray
}
type union ListOfAddNodesItem {
NullArray nullArray,
ListOfAddNodesItemArray realArray
}
type union ListOfAddNodesResult {
NullArray nullArray,
ListOfAddNodesResultArray realArray
}
type union ListOfAddReferencesItem {
NullArray nullArray,
ListOfAddReferencesItemArray realArray
}
type union ListOfDeleteNodesItem {
NullArray nullArray,
ListOfDeleteNodesItemArray realArray
}
type union ListOfDeleteReferencesItem {
NullArray nullArray,
ListOfDeleteReferencesItemArray realArray
}
type union ListOfSignedSoftwareCertificate {
NullArray nullArray,
ListOfSignedSoftwareCertificateArray realArray
}
type union ListOfBrowseDescription {
NullArray nullArray,
ListOfBrowseDescriptionArray realArray
}
type union ListOfBrowsePath {
NullArray nullArray,
ListOfBrowsePathArray realArray
}
type union ListOfBrowsePathResult {
NullArray nullArray,
ListOfBrowsePathResultArray realArray
}
type union ListOfBrowsePathTarget {
NullArray nullArray,
ListOfBrowsePathTargetArray realArray
}
type union ListOfNodeTypeDescription {
NullArray nullArray,
ListOfNodeTypeDescriptionArray realArray
}
type union ListOfQueryDataDescription {
NullArray nullArray,
ListOfQueryDataDescriptionArray realArray
}
type union ListOfParsingResult {
NullArray nullArray,
ListOfParsingResultArray realArray
}
type union ListOfHistoryReadValueId {
NullArray nullArray,
ListOfHistoryReadValueIdArray realArray
}
type union ListOfHistoryReadResult {
NullArray nullArray,
ListOfHistoryReadResultArray realArray
}
type union ListOfWriteValue {
NullArray nullArray,
ListOfWriteValueArray realArray
}
type union ListOfHistoryUpdateResult {
NullArray nullArray,
ListOfHistoryUpdateResultArray realArray
}
type union ListOfCallMethodRequest {
NullArray nullArray,
ListOfCallMethodRequestArray realArray
}
type union ListOfCallMethodResult {
NullArray nullArray,
ListOfCallMethodResultArray realArray
}
type union ListOfMonitoredItemCreateRequest {
NullArray nullArray,
ListOfMonitoredItemCreateRequestArray realArray
}
type union ListOfMonitoredItemCreateResult {
NullArray nullArray,
ListOfMonitoredItemCreateResultArray realArray
}
type union ListOfMonitoredItemModifyRequest {
NullArray nullArray,
ListOfMonitoredItemModifyRequestArray realArray
}
type union ListOfMonitoredItemModifyResult {
NullArray nullArray,
ListOfMonitoredItemModifyResultArray realArray
}
type union ListOfSubscriptionAcknowledgement {
NullArray nullArray,
ListOfSubscriptionAcknowledgementArray realArray
}
type union ListOfTransferResult {
NullArray nullArray,
ListOfTransferResultArray realArray
}
/////////////////////////////////////////////////////////////
// //
// Common Parameters //
// //
/////////////////////////////////////////////////////////////
//Information that describes an application.
type record ApplicationDescription {
String applicationUri,
String productUri,
LocalizedText applicationName,
ApplicationType applicationType,
String gatewayServerUri,
String discoveryProfileUri,
ListOfString discoveryUrls
}
//Information that identified an application instance
type record ApplicationInstanceSubjectIdentifier {
String name
}
//Information that identified the issuer of an application instance
type record ApplicationInstanceIssuerIdentifier {
String productName ,
String organisation
}
type record BrowseResult {
StatusCode statusCode,
ContinuationPoint continuationPoint,
ListOfReferenceDescription References
}
type record ContentFilter {
ListOfContentFilterElement elements
}
type record ContentFilterElement {
FilterOperator filterOperator,
ListOfExtensibleParameter filterOperands
}
type record ContentFilterResult {
ListOfContentFilterElementResult elementResults,
ListOfDiagnosticInfo elementDiagnosticInfos
}
type record ContentFilterElementResult {
StatusCode statusCode,
ListOfStatusCode operandStatusCodes,
ListOfDiagnosticInfo operandDiagnosticInfos
}
type record ElementOperand {
UInt32 index
}
type record LiteralOperand {
BaseDataType Value
}
type record AttributeOperand {
NodeId nodeId,
String alias,
RelativePath browsePath,
IntegerId attributeId,
NumericRange indexRange
}
type record SimpleAttributeOperand {
NodeId typeId,
ListOfQualifiedName browsePath,
IntegerId attributeId,
NumericRange indexRange
}
type record MdnsDiscoveryConfiguration {
String mdnsServerName,
ListOfString serverCapabilities
}
type record EndpointDescription {
String endpointUrl,
ApplicationDescription server,
ByteString serverCertificate,
MessageSecurityMode securityMode,
String securityPolicyUri,
ListOfUserTokenPolicy userIdentityTokens,
String transportProfileUri,
Byte securityLevel
}
type record MonitoringParameters {
IntegerId clientHandle,
Duration samplingInterval,
ExtensibleParameter filter,
Counter queueSize,
Boolean discardOldest
}
type record DataChangeFilter {
DataChangeTrigger Trigger,
UInt32 deadbandType,
Double deadbandValue
}
type record EventFilter {
ListOfSimpleAttributeOperand selectClauses,
ContentFilter whereClause
}
type record EventFilterResult {
ListOfStatusCode selectClauseResults,
ListOfDiagnosticInfo selectClauseDiagnosticInfos,
ContentFilterResult whereClauseResult
}
type record AggregateFilter {
UtcTime startTime,
NodeId aggregateType,
Duration processingInterval,
AggregateConfiguration aggregateConfiguration,
Boolean useServerCapabilitiesDefaults,
Boolean treatUncertainAsBad,
Byte percentDataBad,
Byte percentDataGood,
Boolean useSlopedExtrapolation
}
type record AggregateConfiguration {
Boolean TreatUncertainAsBad,
Boolean useSeverCapabilitiesDefaults,
Byte PercentDataBad,
Byte PercentDataGood,
Boolean UseSlopedExtrapolation
}
type record AggregateFilterResult {
UtcTime revisedStartTime,
Duration revisedProcessingInterval
}
type record ObjectAttributes {
Bit displayNameBit,
Bit descriptionBit,
Bit eventNotifierBit,
Bit writeMaskBit,
Bit userWriteMaskBit,
Bit reserveBits[25],
LocalizedText displayName optional,
LocalizedText description optional,
Byte eventNotifier optional,
UInt32 writeMask optional,
UInt32 userWriteMask optional
} with {
variant (displayName) "PRESENCE(displayNameBit = 1)";
variant (description) "PRESENCE(descriptionBit = 1)";
variant (eventNotifier) "PRESENCE(eventNotifierBit = 1)";
variant (writeMask) "PRESENCE(writeMaskBit = 1)";
variant (userWriteMask) "PRESENCE(userWriteMaskBit = 1)";
}
type record VariableAttributes {
Bit displayNameBit,
Bit descriptionBit,
Bit ValueBit,
Bit dataTypeBit,
Bit valueRankBit,
Bit arrayDimensionsBit,
Bit accessLevelBit,
Bit userAccessLevelBit,
Bit minimumSamplingIntervalBit,
Bit historizingBit,
Bit writeMaskBit,
Bit userWriteMaskBit,
Bit reserveBits[20],
LocalizedText displayName optional,
LocalizedText description optional,
DataType Value optional,
NodeId dataType optional,
Int32 valueRank optional,
ListOfUInt32 arrayDimensions optional,
Byte accessLevel optional,
Byte userAccessLevel optional,
Duration minimumSamplingInterval optional,
Boolean historizing optional,
UInt32 writeMask optional,
UInt32 userWriteMask optional
}with {
variant (displayName) "PRESENCE(displayNameBit = 1)";
variant (description) "PRESENCE(descriptionBit = 1)";
variant (Value) "PRESENCE(ValueBit = 1)";
variant (dataType) "PRESENCE(dataTypeBit = 1)";
variant (valueRank) "PRESENCE(valueRankBit = 1)";
variant (arrayDimensions) "PRESENCE(arrayDimensionsBit = 1)";
variant (accessLevel) "PRESENCE(accessLevelBit = 1)";
variant (userAccessLevel) "PRESENCE(userAccessLevelBit = 1)";
variant (minimumSamplingInterval) "PRESENCE(minimumSamplingIntervalBit = 1)";
variant (historizing) "PRESENCE(historizingBit = 1)";
variant (writeMask) "PRESENCE(writeMaskBit = 1)";
variant (userWriteMask) "PRESENCE(userWriteMaskBit = 1)";
}
type record MethodAttributes {
Bit displayNameBit,
Bit descriptionBit,
Bit executableBit,
Bit userExecutableBit,
Bit writeMaskBit,
Bit userWriteMaskBit,
Bit reserveBits[26],
LocalizedText displayName optional,
LocalizedText description optional,
Boolean executable optional,
Boolean userExecutable optional,
UInt32 writeMask optional,
UInt32 userWriteMask optional
} with {
variant (displayName) "PRESENCE(displayNameBit = 1)";
variant (description) "PRESENCE(descriptionBit = 1)";
variant (executable) "PRESENCE(executableBit = 1)";
variant (userExecutable) "PRESENCE(userExecutableBit = 1)";
variant (writeMask) "PRESENCE(writeMaskBit = 1)";
variant (userWriteMask) "PRESENCE(userWriteMaskBit = 1)";
}
type record ObjectTypeAttributes {
Bit displayNameBit,
Bit descriptionBit,
Bit isAbstractBit,
Bit writeMaskBit,
Bit userWriteMaskBit,
Bit reserveBits[27],
LocalizedText displayName optional,
LocalizedText description optional,
Boolean isAbstract optional,
UInt32 writeMask optional,
UInt32 userWriteMask optional
} with {
variant (displayName) "PRESENCE(displayNameBit = 1)";
variant (description) "PRESENCE(descriptionBit = 1)";
variant (isAbstract) "PRESENCE(isAbstractBit = 1)";
variant (writeMask) "PRESENCE(writeMaskBit = 1)";
variant (userWriteMask) "PRESENCE(userWriteMaskBit = 1)";
}
type record VariableTypeAttributes {
Bit displayNameBit,
Bit descriptionBit,
Bit ValueBit,
Bit dataTypeBit,
Bit valueRankBit,
Bit arrayDimensionsBit,
Bit isAbstractBit,
Bit writeMaskBit,
Bit userWriteMaskBit,
Bit reserveBits[23],
LocalizedText displayName optional,
LocalizedText description optional,
DataType Value optional,
NodeId dataType optional,
Int32 valueRank optional,
ListOfUInt32 arrayDimensions optional,
Boolean isAbstract optional,
UInt32 writeMask optional,
UInt32 userWriteMask optional
} with {
variant (displayName) "PRESENCE(displayNameBit = 1)";
variant (description) "PRESENCE(descriptionBit = 1)";
variant (Value) "PRESENCE(ValueBit = 1)";
variant (dataType) "PRESENCE(dataTypeBit = 1)";
variant (valueRank) "PRESENCE(valueRankBit = 1)";
variant (arrayDimensions) "PRESENCE(arrayDimensionsBit = 1)";
variant (isAbstract) "PRESENCE(isAbstractBit = 1)";
variant (writeMask) "PRESENCE(writeMaskBit = 1)";
variant (userWriteMask) "PRESENCE(userWriteMaskBit = 1)";
}
type record ReferenceTypeAttributes {
Bit displayNameBit,
Bit descriptionBit,
Bit isAbstractBit,
Bit symmetricBit,
Bit inverseNameBit,
Bit writeMaskBit,
Bit userWriteMaskBit,
Bit reserveBits[25],
LocalizedText displayName optional,
LocalizedText description optional,
Boolean isAbstract optional,
Boolean symmetric optional,
LocalizedText inverseName optional,
UInt32 writeMask optional,
UInt32 userWriteMask optional
} with {
variant (displayName) "PRESENCE(displayNameBit = 1)";
variant (description) "PRESENCE(descriptionBit = 1)";
variant (isAbstract) "PRESENCE(isAbstractBit = 1)";
variant (symmetric) "PRESENCE(symmetricBit = 1)";
variant (inverseName) "PRESENCE(inverseNameBit = 1)";
variant (writeMask) "PRESENCE(writeMaskBit = 1)";
variant (userWriteMask) "PRESENCE(userWriteMaskBit = 1)";
}
type record DataTypeAttributes {
Bit displayNameBit,
Bit descriptionBit,
Bit isAbstractBit,
Bit writeMaskBit,
Bit userWriteMaskBit,
Bit reserveBits[27],
LocalizedText displayName optional,
LocalizedText description optional,
Boolean isAbstract optional,
UInt32 writeMask optional,
UInt32 userWriteMask optional
} with {
variant (displayName) "PRESENCE(displayNameBit = 1)";
variant (description) "PRESENCE(descriptionBit = 1)";
variant (isAbstract) "PRESENCE(isAbstractBit = 1)";
variant (writeMask) "PRESENCE(writeMaskBit = 1)";
variant (userWriteMask) "PRESENCE(userWriteMaskBit = 1)";
}
type record ViewAttributes {
Bit displayNameBit,
Bit descriptionBit,
Bit containsNoLoopsBit,
Bit eventNotifierBit,
Bit writeMaskBit,
Bit userWriteMaskBit,
Bit reserveBits[26],
LocalizedText displayName optional,
LocalizedText description optional,
Boolean containsNoLoops optional,
Byte eventNotifier optional,
UInt32 writeMask optional,
UInt32 userWriteMask optional
} with {
variant (displayName) "PRESENCE(displayNameBit = 1)";
variant (description) "PRESENCE(descriptionBit = 1)";
variant (containsNoLoops) "PRESENCE(containsNoLoopsBit = 1)";
variant (eventNotifier) "PRESENCE(eventNotifierBit = 1)";
variant (writeMask) "PRESENCE(writeMaskBit = 1)";
variant (userWriteMask) "PRESENCE(userWriteMaskBit = 1)";
}
type record GenericAttributes {
ListOfGenericAttributeValue attributeValues
}
type record GenericAttributeValue {
IntegerId attributeId,
BaseDataType Value
}
type record DataChangeNotification {
ListOfMonitoredItemNotification monitoredItems,
ListOfDiagnosticInfo diagnosticInfos
}
type record MonitoredItemNotification {
IntegerId clientHandle,
DataValue Value
}
type record EventNotificationList {
ListOfEventFieldList events
}
type record EventFieldList {
IntegerId clientHandle,
ListOfBaseDataType eventFields
}
type record StatusChangeNotification {
StatusCode status,
DiagnosticInfo diagnosticInfo
}
type record NotificationMessage {
Counter sequenceNumber,
UtcTime publishTime,
ListOfExtensibleParameter notificationData
}
type record QueryDataSet {
ExpandedNodeId nodeId,
ExpandedNodeId typeDefinitionNode,
ListOfBaseDataType values
}
type record ReadValueId {
NodeId nodeId,
IntegerId attributeId,
NumericRange indexRange,
QualifiedName dataEncoding
}
type record ReferenceDescription {
NodeId referenceTypeId,
Boolean isForward,
ExpandedNodeId nodeId,
QualifiedName browseName,
LocalizedText displayName,
NodeClass nodeClass,
ExpandedNodeId typeDefinition
}
type record RelativePath {
ListOfRelativePathElement elements
}
type record RelativePathElement {
NodeId referenceTypeId,
Boolean isInverse,
Boolean includeSubtypes,
QualifiedName targetName
}
type record RegisteredServer {
String serverUri,
String productUri,
ListOfLocalizedText serverNames,
ApplicationType serverType,
String gatewayServerUri,
ListOfString discoveryUrls,
String semaphoreFilePath,
Boolean isOnline
}
/////////////////////////////////////////////////////////////
// //
// Structures for Security (Incomplete) //
// //
/////////////////////////////////////////////////////////////
type record ApplicationInstanceCertificate {
String version,
ByteString serialNumber,
String signatureAlgorithm,
ByteString Signature,
ApplicationInstanceIssuerIdentifier issuer,
UtcTime validFrom,
UtcTime validTo,
ApplicationInstanceSubjectIdentifier subject,
String applicationUri,
ListOfString hostnames,
ByteString publicKey,
ListOfString keyUsage
}
type record ChannelSecurityToken {
UInt32 channelId,
UInt32 tokenId,
UtcTime createdAt,
UInt32 revisedLifetime
}
type record EncryptedSecret {
NodeId TypeId,
Byte EncodingMask,
UInt32 Length,
String SecurityPolicyUri,
ByteString EncryptingCertificate,
DateTime SigningTime,
UInt16 PolicyHeaderLength,
ByteString SigningKey,
ByteString EncryptingKey,
ByteString InitializationVector,
ByteString Nonce,
Byte PolicyHeaderPadding optional,
UInt16 PolicyHeaderPaddingSize,
ByteString Secret,
Byte PayloadPadding optional,
UInt16 PayloadPaddingSize,
Byte Signature optional
}
type record RsaEncryptedSecret {
NodeId TypeId,
Byte EncodingMask,
UInt32 Length,
String SecurityPolicyUri,
ByteString EncryptingCertificate,
DateTime SigningTime,
UInt16 PolicyHeaderLength,
ByteString SigningKey,
ByteString EncryptingKey,
ByteString InitializationVector,
ByteString Nonce,
Byte PolicyHeaderPadding optional,
UInt16 PolicyHeaderPaddingSize,
ByteString Secret,
Byte PayloadPadding optional,
UInt16 PayloadPaddingSize,
Byte Signature optional
}
type record AnonymousIdentityToken {
String policyId
}
type record UserNameIdentityToken {
String policyId,
String userName,
ByteString password,
String encryptionAlgorithm
}
type record X509IdentityToken {
String policyId,
ByteString certificateData
}
type record IssuedIdentityToken {
String policyId,
ByteString tokenData,
String encryptionAlgorithm
}
type record UserTokenPolicy {
String policyId,
UserIdentityTokenType tokenType,
String issuedTokenType,
String issuerEndpointUrl,
String securityPolicyUri
}
/////////////////////////////////////////////////////////////
// //
// Structures for Services //
// //
/////////////////////////////////////////////////////////////
type record ViewDescription {
NodeId viewId,
UtcTime timestamp,
UInt32 viewVersion
}
type record TrustListDataType {
TrustListMasks specifiedLists,
ListOfByteString trustedCertificates,
ListOfByteString trustedCrls,
ListOfByteString issuerCertificates,
ListOfByteString issuerCrls
}
type record ServerOnNetwork {
UInt32 recordId,
String serverName,
String discoveryUrl,
ListOfString serverCapabilities
}
type record AddNodesItem {
ExpandedNodeId parentNodeId,
NodeId referenceTypeId,
QualifiedName browseName,
NodeClass nodeClass,
ExtensibleParameter nodeAttributes,
ExpandedNodeId typeDefinition
}
type record AddNodesResult {
StatusCode statusCode,
NodeId addedNodeId,
ListOfDiagnosticInfo diagnosticInfos
}
type record AddReferencesItem {
NodeId sourceNodeId,
NodeId referenceTypeId,
Boolean isForward,
String targetServerUri,
ExpandedNodeId targetNodeId,
NodeClass targetNodeClass
}
type record DeleteNodesItem {
NodeId nodeId,
Boolean deleteTargetReferences
}
type record DeleteReferencesItem {
NodeId sourceNodeId,
NodeId referenceTypeId,
Boolean isForward,
ExpandedNodeId targetNodeId,
Boolean deleteBidirectional
}
type record BrowseDescription {
NodeId nodeId,
BrowseDirection browseDirection,
NodeId referenceTypeId,
Boolean includeSubtypes,
UInt32 nodeClassMask,
UInt32 resultMask
}
type record SignatureData {
String algorithm,
ByteString Signature
}
type record SignedSoftwareCertificate {
ByteString certificateData,
ByteString Signature
}
type record BrowsePath {
NodeId startingNode,
RelativePath relativePath
}
type record BrowsePathResult {
StatusCode statusCode,
ListOfBrowsePathTarget targets
}
type record BrowsePathTarget {
ExpandedNodeId targetId,
Index remainingPathIndex
}
type record NodeTypeDescription {
ExpandedNodeId typeDefinitionNode,
Boolean includeSubtypes,
ListOfQueryDataDescription dataToReturn
}
type record QueryDataDescription {
RelativePath relativePath,
IntegerId attributeId,
NumericRange indexRange
}
type record ParsingResult {
StatusCode statusCode,
ListOfStatusCode dataStatusCodes,
ListOfDiagnosticInfo dataDiagnosticInfos
}
type record ReadEventDetails {
Counter numValuesPerNode,
UtcTime startTime,
UtcTime endTime,
EventFilter Filter
}
type record ReadRawModifiedDetails {
Boolean isReadModified ,
UtcTime startTime,
UtcTime endTime,
Counter numValuesPerNode,
Boolean returnBounds
}
type record ReadProcessedDetails {
UtcTime startTime,
UtcTime endTime,
Duration ProcessingInterval,
ListOfNodeId aggregateType,
AggregateConfiguration aggregateConfiguration
}
type record ReadAtTimeDetails {
ListOfUtcTime reqTimes,
Boolean useSimpleBounds
}
type record HistoryReadValueId {
NodeId nodeId,
NumericRange indexRange,
QualifiedName dataEncoding,
ByteString continuationPoint
}
type record HistoryReadResult {
StatusCode statusCode,
ByteString continuationPoint,
ExtensibleParameter historyData
}
type record WriteValue {
NodeId nodeId,
IntegerId attributeId,
NumericRange indexRange,
DataValue datavalue
}
type record UpdateDataDetails {
NodeId nodeId,
PerformUpdateType performInsertReplace,
ListOfDataValue updateValues
}
type record UpdateStructureDataDetails {
NodeId nodeId,
PerformUpdateTypeExtended performInsertReplace,
ListOfDataValue updateValues
}
type record UpdateEventDetails {
NodeId nodeId,
PerformUpdateType performInsertReplace,
EventFilter filter,
ListOfDataValue updateValues
}
type record DeleteRawModifiedDetails {
NodeId nodeId,
Boolean isDeleteModified,
UtcTime startTime,
UtcTime endTime
}
type record DeleteAtTimeDetails {
NodeId nodeId,
ListOfUtcTime reqTimes
}
type record DeleteEventDetails {
NodeId nodeId,
ListOfByteString eventId
}
type record HistoryUpdateResult {
StatusCode statusCode,
ListOfStatusCode operationResults,
ListOfDiagnosticInfo diagnosticInfos
}
type record CallMethodRequest {
NodeId objectId,
NodeId methodId,
ListOfVariant inputArguments
}
type record CallMethodResult {
StatusCode statusCode,
ListOfStatusCode inputArgumentResults,
ListOfDiagnosticInfo inputArgumentDiagnosticInfos,
ListOfVariant outputArguments
}
type record MonitoredItemCreateRequest {
ReadValueId itemToMonitor,
MonitoringMode monitoringMode,
MonitoringParameters requestedParameters
}
type record MonitoredItemCreateResult {
StatusCode statusCode,
IntegerId monitoredItemId,
Duration revisedSamplingInterval,
Counter revisedQueueSize,
ExtensibleParameter filterResult
}
type record MonitoredItemModifyRequest {
IntegerId monitoredItemId,
MonitoringParameters requestedParameters
}
type record MonitoredItemModifyResult {
StatusCode statusCode,
Duration revisedSamplingInterval,
Counter revisedQueueSize,
ExtensibleParameter filterResult
}
type record SubscriptionAcknowledgement {
IntegerId subscriptionId,
Counter sequenceNumber
}
type record TransferResult {
StatusCode statusCode,
ListOfCounter availableSequenceNumbers
}
/////////////////////////////////////////////////////////////
// //
// Headers //
// //
/////////////////////////////////////////////////////////////
type record MessageHeader {
UInt24 messageType,
Byte chunkType,
UInt32 messageSize
}
type union SecurityHeader {
AsymmetricSecurityHeader asymmetricSecurityHeader,
SymmetricSecurityHeader symmetricSecurityHeader
}
type record SequenceHeader {
UInt32 SequenceNumber,
UInt32 RequestId
}
type record AsymmetricSecurityHeader {
Int32 SecurityPolicyUriLength,
ListOfByte SecurityPolicyUri,
Int32 SenderCertificateLength,
ListOfByte SenderCertificate,
Int32 ReceiverCertificateThumbprintLength,
ListOfByte ReceiverCertificateThumbprint
}
type record SymmetricSecurityHeader {
UInt32 TokenId
}
type record MessageFooter {
Byte PaddingSize optional,
ListOfByte Padding optional,
Byte ExtraPaddingSize optional,
ListOfByte Signature optional
} with {
variant (PaddingSize) "LENGTHTO(Padding)";
}
type record AdditionalHeader {
ExpandedNodeId typeId,
Byte Value
}
type record RequestHeader {
SessionAuthenticationToken authenticationToken,
UtcTime timestamp,
IntegerId requestHandle,
UInt32 returnDiagnostics,
String auditEntryId,
UInt32 timeoutHint,
AdditionalHeader additionalHeader
}
type record ResponseHeader {
UtcTime timestamp,
IntegerId requestHandle,
StatusCode serviceResult,
DiagnosticInfo serviceDiagnostics,
ListOfString stringTable,
AdditionalHeader additionalHeader
}
type record ServiceFault {
ResponseHeader responseHeader
}
/////////////////////////////////////////////////////////////
// //
// Basic Messages //
// //
/////////////////////////////////////////////////////////////
type record HelloMessage {
UInt32 version,
UInt32 receiveBufferSize,
UInt32 sendBufferSize,
UInt32 maxMessageSize,
UInt32 maxChunkCount,
String endPointUrl
}
type record AckMessage {
UInt32 version,
UInt32 receiveBufferSize,
UInt32 sendBufferSize,
UInt32 maxMessageSize,
UInt32 maxChunkCount
}
type record ErrorMessage {
UInt32 errorCode,
String reason
}
type record ReverseHelloMessage {
String serverUri,
String endPointUrl
}
/////////////////////////////////////////////////////////////
// //
// Discovery Service Sets //
// //
/////////////////////////////////////////////////////////////
type record FindServiceRequest {
RequestHeader requestHeader,
String endpointUrl,
ListOfLocaleId localeIds,
ListOfString serverUris
}
type record FindServiceResponse {
ResponseHeader responseHeader,
ListOfApplicationDescription servers
}
type record FindServersOnNetworkRequest {
RequestHeader requestHeader,
Counter startingRecordId,
UInt32 maxRecordsToReturn,
ListOfString serverCapabilityFilter
}
type record FindServersOnNetworkResponse {
ResponseHeader responseHeader,
UtcTime lastCounterResetTime,
ListOfServerOnNetwork servers
}
type record GetEndpointsRequest {
RequestHeader requestHeader,
String endpointUrl,
ListOfLocaleId localeIds,
ListOfString profileUris
}
type record GetEndpointsResponse {
ResponseHeader responseHeader,
ListOfEndpointDescription Endpoints
}
type record RegisterServerRequest {
RequestHeader requestHeader,
RegisteredServer server
}
type record RegisterServerResponse {
ResponseHeader responseHeader
}
type record RegisterServer2Request {
RequestHeader requestHeader,
RegisteredServer server,
ListOfExtensibleParameter discoveryConfiguration
}
type record RegisterServer2Response {
ResponseHeader responseHeader,
ListOfStatusCode configurationResults,
ListOfDiagnosticInfo diagnosticInfos
}
/////////////////////////////////////////////////////////////
// //
// SecureChannel Service Sets //
// //
/////////////////////////////////////////////////////////////
type record OpenSecureChannelRequest {
RequestHeader requestHeader,
UInt32 clientProtocolVersion,
SecurityTokenRequestType requestType,
MessageSecurityMode securityMode,
ByteString clientNonce,
UInt32 requestedLifetime
}
type record OpenSecureChannelResponse {
ResponseHeader responseHeader,
UInt32 serverProtocolVersion,
ChannelSecurityToken securityToken,
ByteString serverNonce
}
type record CloseSecureChannelRequest {
RequestHeader requestHeader
}
type record CloseSecureChannelResponse {
ResponseHeader responseHeader
}
/////////////////////////////////////////////////////////////
// //
// Session Service Sets //
// //
/////////////////////////////////////////////////////////////
type record CreateSessionRequest {
RequestHeader requestHeader,
ApplicationDescription clientDescription,
String serverUri,
String endpointUrl,
String sessionName,
ByteString clientNonce,
ByteString clientCertificate,
Duration requestedSessionTimeout,
UInt32 maxResponseMessageSize
}
type record CreateSessionResponse {
ResponseHeader responseHeader,
NodeId sessionId,
SessionAuthenticationToken authenticationToken,
Duration revisedSessionTimeout,
ByteString serverNonce,
ByteString serverCertificate,
ListOfEndpointDescription serverEndpoints,
ListOfSignedSoftwareCertificate serverSoftwareCertificates,
SignatureData serverSignature,
UInt32 maxRequestMessageSize
}
type record ActivateSessionRequest {
RequestHeader requestHeader,
SignatureData clientSignature,
ListOfSignedSoftwareCertificate clientSoftwareCertificates,
ListOfLocaleId localeIds,
ExtensibleParameter userIdentityToken,
SignatureData userTokenSignature
}
type record ActivateSessionResponse {
ResponseHeader responseHeader,
ByteString serverNonce,
ListOfStatusCode results,
ListOfDiagnosticInfo diagnosticInfos
}
type record CloseSessionRequest {
RequestHeader requestHeader,
Boolean deleteSubscriptions
}
type record CloseSessionResponse {
ResponseHeader responseHeader
}
type record CancelRequestRequest {
RequestHeader requestHeader,
IntegerId requestHandle
}
type record CancelRequestResponse {
ResponseHeader responseHeader,
UInt32 cancelCount
}
/////////////////////////////////////////////////////////////
// //
// NodeManagement Service Sets //
// //
/////////////////////////////////////////////////////////////
type record AddNodesRequest {
RequestHeader requestHeader,
ListOfAddNodesItem nodesToAdd
}
type record AddNodesResponse {
ResponseHeader responseHeader,
ListOfAddNodesResult results
}
type record AddReferencesRequest {
RequestHeader requestHeader,
ListOfAddReferencesItem referencesToAdd
}
type record AddReferencesResponse {
ResponseHeader responseHeader,
ListOfStatusCode results,
ListOfDiagnosticInfo diagnosticInfos
}
type record DeleteNodesRequest {
RequestHeader requestHeader,
ListOfDeleteNodesItem nodesToDelete
}
type record DeleteNodesResponse {
ResponseHeader responseHeader,
ListOfStatusCode results,
ListOfDiagnosticInfo diagnosticInfos
}
type record DeleteReferencesRequest {
RequestHeader requestHeader,
ListOfDeleteReferencesItem referencesToDelete
}
type record DeleteReferencesResponse {
ResponseHeader responseHeader,
ListOfStatusCode results,
ListOfDiagnosticInfo diagnosticInfos
}
/////////////////////////////////////////////////////////////
// //
// Browse Service Sets //
// //
/////////////////////////////////////////////////////////////
type record BrowseRequest {
RequestHeader requestHeader,
ViewDescription view,
Counter requestedMaxReferencesPerNode,
ListOfBrowseDescription nodesToBrowse
}
type record BrowseResponse {
ResponseHeader responseHeader,
ListOfBrowseResult results,
ListOfDiagnosticInfo diagnosticInfos
}
type record BrowseNextRequest {
RequestHeader requestHeader,
Boolean releaseContinuationPoints,
ListOfContinuationPoint continuationPoints
}
type record BrowseNextResponse {
ResponseHeader responseHeader,
ListOfBrowseResult results,
ListOfDiagnosticInfo diagnosticInfos
}
type record TranslateBrowsePathsToNodeIdsRequest {
RequestHeader requestHeader,
ListOfBrowsePath browsePaths
}
type record TranslateBrowsePathsToNodeIdsResponse {
ResponseHeader responseHeader,
ListOfBrowsePathResult results,
ListOfDiagnosticInfo diagnosticInfos
}
type record RegisterNodesRequest {
RequestHeader requestHeader,
ListOfNodeId nodesToRegister
}
type record RegisterNodesResponse {
ResponseHeader responseHeader,
ListOfNodeId registeredNodeIds
}
type record UnregisterNodesRequest {
RequestHeader requestHeader,
ListOfNodeId nodesToUnregister
}
type record UnregisterNodesResponse {
ResponseHeader responseHeader
}
/////////////////////////////////////////////////////////////
// //
// Query Service Set //
// //
/////////////////////////////////////////////////////////////
type record QueryFirstRequest {
RequestHeader requestHeader,
ListOfNodeTypeDescription nodeTypes,
ContentFilter filter,
Counter maxDataSetsToReturn,
Counter maxReferencesToReturn
}
type record QueryFirstResponse {
ResponseHeader responseHeader,
ListOfQueryDataSet queryDataSets,
ContinuationPoint continuationPoint,
ListOfParsingResult parsingResults,
ListOfDiagnosticInfo diagnosticInfos,
ContentFilterResult filterResult
}
type record QueryNextRequest {
RequestHeader requestHeader,
Boolean releaseContinuationPoint,
ContinuationPoint continuationPoint
}
type record QueryNextResponse {
ResponseHeader responseHeader,
ListOfQueryDataSet queryDataSets,
ContinuationPoint revisedContinuationPoint
}
/////////////////////////////////////////////////////////////
// //
// Attribute Service Set //
// //
/////////////////////////////////////////////////////////////
type record ReadRequest {
RequestHeader requestHeader,
Duration maxAge,
TimestampsToReturn timestampsToReturn,
ListOfReadValueId nodesToRead
}
type record ReadResponse {
ResponseHeader responseHeader,
ListOfDataValue results,
ListOfDiagnosticInfo diagnosticInfos
}
type record HistoryReadRequest {
RequestHeader requestHeader,
ExtensibleParameter historyReadDetails,
TimestampsToReturn timestampsToReturn,
Boolean releaseContinuationPoints,
ListOfHistoryReadValueId nodesToRead
}
type record HistoryReadResponse {
ResponseHeader responseHeader,
ListOfHistoryReadResult results,
ListOfDiagnosticInfo diagnosticInfos
}
type record WriteRequest {
RequestHeader requestHeader,
ListOfWriteValue nodesToWrite
}
type record WriteResponse {
ResponseHeader responseHeader,
ListOfDiagnosticInfo diagnosticInfos
}
type record HistoryUpdateRequest {
RequestHeader requestHeader,
ListOfExtensibleParameter historyUpdateDetails
}
type record HistoryUpdateResponse {
ResponseHeader responseHeader,
ListOfHistoryUpdateResult results,
ListOfDiagnosticInfo diagnosticInfos
}
/////////////////////////////////////////////////////////////
// //
// Method Service Set //
// //
/////////////////////////////////////////////////////////////
type record CallRequest {
RequestHeader requestHeader,
ListOfCallMethodRequest methodsToCall
}
type record CallResponse {
ResponseHeader responseHeader,
ListOfCallMethodResult results,
ListOfDiagnosticInfo diagnosticInfos
}
/////////////////////////////////////////////////////////////
// //
// MonitoredItem Service Set //
// //
/////////////////////////////////////////////////////////////
type record CreateMonitoredItemsRequest {
RequestHeader requestHeader,
IntegerId subscriptionId,
TimestampsToReturn timestampsToReturn,
ListOfMonitoredItemCreateRequest itemsToCreate
}
type record CreateMonitoredItemsResponse {
ResponseHeader responseHeader,
ListOfMonitoredItemCreateResult results,
ListOfDiagnosticInfo diagnosticInfos
}
type record ModifyMonitoredItemsRequest {
RequestHeader requestHeader,
IntegerId subscriptionId,
TimestampsToReturn timestampsToReturn,
ListOfMonitoredItemModifyRequest itemsToModify
}
type record ModifyMonitoredItemsResponse {
ResponseHeader responseHeader,
ListOfMonitoredItemModifyResult results,
ListOfDiagnosticInfo diagnosticInfos
}
type record SetMonitoringModeRequest {
RequestHeader requestHeader,
IntegerId subscriptionId,
MonitoringMode monitoringMode,
ListOfIntegerId monitoredItemIds
}
type record SetMonitoringModeResponse {
ResponseHeader responseHeader,
ListOfStatusCode results,
ListOfDiagnosticInfo diagnosticInfos
}
type record SetTriggeringRequest {
RequestHeader requestHeader,
IntegerId subscriptionId,
IntegerId triggeringItemId,
ListOfIntegerId linksToAdd,
IntegerId linksToRemove
}
type record SetTriggeringResponse {
ResponseHeader responseHeader,
ListOfStatusCode addResults,
ListOfDiagnosticInfo addDiagnosticInfos,
ListOfStatusCode removeResults,
ListOfDiagnosticInfo removeDiagnosticInfos
}
type record DeleteMonitoredItemsRequest {
RequestHeader requestHeader,
IntegerId subscriptionId,
ListOfIntegerId monitoredItemIds
}
type record DeleteMonitoredItemsResponse {
ResponseHeader responseHeader,
ListOfStatusCode results,
ListOfDiagnosticInfo diagnosticInfos
}
/////////////////////////////////////////////////////////////
// //
// Subscription Service Set //
// //
/////////////////////////////////////////////////////////////
type record CreateSubscriptionRequest {
RequestHeader requestHeader,
Duration requestedPublishingInterval,
Counter requestedLifetimeCount,
Counter requestedMaxKeepAliveCount,
Counter maxNotificationsPerPublish,
Boolean publishingEnabled,
Byte priorityInt32
}
type record CreateSubscriptionResponse {
ResponseHeader responseHeader,
IntegerId subscriptionId,
Duration revisedPublishingInterval,
Counter revisedLifetimeCount,
Counter revisedMaxKeepAliveCount
}
type record ModifySubscriptionRequest {
RequestHeader requestHeader,
IntegerId subscriptionId,
Duration requestedPublishingInterval,
Counter requestedLifetimeCount,
Counter requestedMaxKeepAliveCount,
Counter maxNotificationsPerPublish,
Byte priority
}
type record ModifySubscriptionResponse {
ResponseHeader responseHeader,
Duration revisedPublishingInterval,
Counter revisedLifetimeCount,
Counter revisedMaxKeepAliveCount
}
type record SetPublishingModeRequest {
RequestHeader requestHeader,
Boolean publishingEnabled,
ListOfIntegerId subscriptionIds
}
type record SetPublishingModeResponse {
ResponseHeader responseHeader,
ListOfStatusCode results,
ListOfDiagnosticInfo diagnosticInfos
}
type record PublishRequest {
RequestHeader requestHeader,
ListOfSubscriptionAcknowledgement subscriptionAcknowledgements
}
type record PublishResponse {
ResponseHeader responseHeader,
IntegerId subscriptionId,
ListOfCounter availableSequenceNumbers,
Boolean moreNotifications,
NotificationMessage notificationMessage,
//NotificationMessage notificationMessage, //!!
ListOfStatusCode results,
ListOfDiagnosticInfo diagnosticInfos
}
type record RepublishRequest {
RequestHeader requestHeader,
IntegerId subscriptionId,
Counter retransmitSequenceNumber
}
type record RepublishResponse {
ResponseHeader responseHeader,
NotificationMessage notificationMessage
}
type record TransferSubscriptionsRequest {
RequestHeader requestHeader,
ListOfIntegerId subscriptionIds,
Boolean sendInitialValues
}
type record TransferSubscriptionsResponse {
ResponseHeader responseHeader,
ListOfTransferResult results,
ListOfDiagnosticInfo diagnosticInfos
}
type record DeleteSubscriptionsRequest {
RequestHeader requestHeader,
ListOfIntegerId subscriptionIds
}
type record DeleteSubscriptionsResponse {
ResponseHeader responseHeader,
ListOfStatusCode results,
ListOfDiagnosticInfo diagnosticInfos
}
/////////////////////////////////////////////////////////////
// //
// Session-less Service //
// //
/////////////////////////////////////////////////////////////
type record SessionlessInvokeRequest {
VersionTime urisVersion,
ListOfString namespaceUris,
ListOfString serverUris,
ListOfLocaleId localeIds,
UInt32 serviceId,
SessionlessServices body
}
type record SessionlessInvokeResponse {
ListOfString namespaceUris,
ListOfString serverUris,
UInt32 serviceId,
SessionlessServices body
}
/////////////////////////////////////////////////////////////
// //
// Main Types //
// //
/////////////////////////////////////////////////////////////
type Int32 DataType;
type Variant BaseDataType;
type record of BaseDataType ListOfBaseDataType;
type union ServiceList {
//DiscoveryServices
FindServiceRequest FindServiceRequest,
FindServiceResponse FindServiceResponse,
FindServersOnNetworkRequest FindServersOnNetworkRequest,
FindServersOnNetworkResponse FindServersOnNetworkResponse,
GetEndpointsRequest GetEndpointsRequest,
GetEndpointsResponse GetEndpointsResponse,
RegisterServerRequest RegisterServerRequest,
RegisterServerResponse RegisterServerResponse,
RegisterServer2Request RegisterServer2Request,
RegisterServer2Response RegisterServer2Response,
//Secure Channel services
OpenSecureChannelRequest OpenSecureChannelRequest,
OpenSecureChannelResponse OpenSecureChannelResponse,
CloseSecureChannelRequest CloseSecureChannelRequest,
CloseSecureChannelResponse CloseSecureChannelResponse,
//Session Services
CreateSessionRequest CreateSessionRequest,
CreateSessionResponse CreateSessionResponse,
ActivateSessionRequest ActivateSessionRequest,
ActivateSessionResponse ActivateSessionResponse,
CloseSessionRequest CloseSessionRequest,
CloseSessionResponse CloseSessionResponse,
CancelRequestRequest CancelRequestRequest,
CancelRequestResponse CancelRequestResponse,
//Node Management Services
AddNodesRequest AddNodesRequest,
AddNodesResponse AddNodesResponse,
AddReferencesRequest AddReferencesRequest,
AddReferencesResponse AddReferencesResponse,
DeleteNodesRequest DeleteNodesRequest,
DeleteNodesResponse DeleteNodesResponse,
DeleteReferencesRequest DeleteReferencesRequest,
DeleteReferencesResponse DeleteReferencesResponse,
//View Services
BrowseRequest BrowseRequest,
BrowseResponse BrowseResponse,
BrowseNextRequest BrowseNextRequest,
BrowseNextResponse BrowseNextResponse,
TranslateBrowsePathsToNodeIdsRequest TranslateBrowsePathsToNodeIdsRequest,
TranslateBrowsePathsToNodeIdsResponse TranslateBrowsePathsToNodeIdsResponse,
RegisterNodesRequest RegisterNodesRequest,
RegisterNodesResponse RegisterNodesResponse,
UnregisterNodesRequest UnregisterNodesRequest,
UnregisterNodesResponse UnregisterNodesResponse,
//Query Services
QueryFirstRequest QueryFirstRequest,
QueryFirstResponse QueryFirstResponse,
QueryNextRequest QueryNextRequest,
QueryNextResponse QueryNextResponse,
//Attribute Services
ReadRequest ReadRequest,
ReadResponse ReadResponse,
HistoryReadRequest HistoryReadRequest,
HistoryReadResponse HistoryReadResponse,
WriteRequest WriteRequest,
WriteResponse WriteResponse,
//Method Services
HistoryUpdateRequest HistoryUpdateRequest,
HistoryUpdateResponse HistoryUpdateResponse,
CallRequest CallRequest,
CallResponse CallResponse,
//Monitored Item Services
CreateMonitoredItemsRequest CreateMonitoredItemsRequest,
CreateMonitoredItemsResponse CreateMonitoredItemsResponse,
ModifyMonitoredItemsRequest ModifyMonitoredItemsRequest,
ModifyMonitoredItemsResponse ModifyMonitoredItemsResponse,
SetMonitoringModeRequest SetMonitoringModeRequest,
SetMonitoringModeResponse SetMonitoringModeResponse,
SetTriggeringRequest SetTriggeringRequest,
SetTriggeringResponse SetTriggeringResponse,
DeleteMonitoredItemsRequest DeleteMonitoredItemsRequest,
DeleteMonitoredItemsResponse DeleteMonitoredItemsResponse,
//Subscription Services
CreateSubscriptionRequest CreateSubscriptionRequest,
CreateSubscriptionResponse CreateSubscriptionResponse,
ModifySubscriptionRequest ModifySubscriptionRequest,
ModifySubscriptionResponse ModifySubscriptionResponse,
SetPublishingModeRequest SetPublishingModeRequest,
SetPublishingModeResponse SetPublishingModeResponse,
PublishRequest PublishRequest,
PublishResponse PublishResponse,
RepublishRequest RepublishRequest,
RepublishResponse RepublishResponse,
TransferSubscriptionsRequest TransferSubscriptionsRequest,
TransferSubscriptionsResponse TransferSubscriptionsResponse,
DeleteSubscriptionsRequest DeleteSubscriptionsRequest,
DeleteSubscriptionsResponse DeleteSubscriptionsResponse
} with {
variant "";
}
type union SessionlessServices {
//Sessionless Invoke Services
//SessionlessInvokeRequest SessionlessInvokeRequest,
SessionlessInvokeResponse SessionlessInvokeResponse,
ReadRequest readRequest,
ReadResponse readResponse,
WriteRequest writeRequest,
WriteResponse writeResponse,
CallRequest callRequest,
CallResponse callResponse
} with {
variant "";
}
type union OpcMessages {
HelloMessage helloMessage,
AckMessage ackMessage,
ErrorMessage errorMessage,
ReverseHelloMessage reverseHelloMessage
} with {
variant "";
}
/////////////////////////////////////////////////////////////
// //
// Encoded Types //
// //
/////////////////////////////////////////////////////////////
//An OPC Message we recivie. Contains headers, and an encoded body.
//If the message is not a whole msg, you can chain the encoded body's together, and decode it when you have
//the full msg
type record MessageChunk {
MessageHeader header,
OpcMessages transportMessage optional, //Transport Messages (Hello, Ack, ...)
UInt32 securityChannelId optional, //OpenSecureChannel, CloseSecureChannel or Services
ListOfByte securePolicyUri optional, //OpenSecureChannel
ListOfByte senderCertificate optional, //OpenSecureChannel
ListOfByte receiverCertificateThumbprint optional, //OpenSecureChannel
UInt32 securityTokenId optional, //Services or CloseSecureChannel
SequenceHeader sequenceHeader optional, //OpenSecureChannel, or Services
octetstring body optional //OpenSecureChannel, CloseSecureChannel or Services
//TODO: Add footer when security is implemented
} with {
variant (transportMessage) "PRESENCE(header.messageType = HelloHeaderMsgType,
header.messageType = AckHeaderMsgType,
header.messageType = ErrorHeaderMsgType,
header.messageType = ReverseHelloHeaderMsgType)"
variant (securityChannelId) "PRESENCE(header.messageType = ServicesMsgType,
header.messageType = CloseSecureChannelMsgType,
header.messageType = OpenSecureChannelMsgType)"
variant (securePolicyUri) "PRESENCE(header.messageType = OpenSecureChannelMsgType)"
variant (senderCertificate) "PRESENCE(header.messageType = OpenSecureChannelMsgType)"
variant (receiverCertificateThumbprint) "PRESENCE(header.messageType = OpenSecureChannelMsgType)"
variant (securityTokenId) "PRESENCE(header.messageType = ServicesMsgType,
header.messageType = CloseSecureChannelMsgType)"
variant (sequenceHeader) "PRESENCE(header.messageType = ServicesMsgType,
header.messageType = CloseSecureChannelMsgType,
header.messageType = OpenSecureChannelMsgType)"
variant (transportMessage)"CROSSTAG(helloMessage, header.messageType = HelloHeaderMsgType;
ackMessage, header.messageType = AckHeaderMsgType;
errorMessage, header.messageType = ErrorHeaderMsgType;
reverseHelloMessage, header.messageType = ReverseHelloHeaderMsgType)";
//TODO: Fix length encoding
variant (header) "LENGTHTO(header, transportMessage, securityChannelId, securePolicyUri, senderCertificate, receiverCertificateThumbprint, securityTokenId, sequenceHeader, body)"
variant (header) "LENGTHINDEX(messageSize)"
}
//The message body
type record ServiceBody {
Byte encodingByte,
Byte namespaceIndex,
UInt16 nodeValue,
ServiceList list
} with {
variant (list)"CROSSTAG( FindServiceRequest, nodeValue = 0; //No data in XML
FindServiceResponse, nodeValue = 1; //No data in XML
CloseSecureChannelRequest, nodeValue = 452;
CloseSecureChannelResponse, nodeValue = 455;
OpenSecureChannelRequest, nodeValue = 446;
OpenSecureChannelResponse, nodeValue = 449;
FindServersOnNetworkRequest, nodeValue = 12208;
FindServersOnNetworkResponse, nodeValue = 12209;
GetEndpointsRequest, nodeValue = 428;
GetEndpointsResponse, nodeValue = 431;
RegisterServerRequest, nodeValue = 437;
RegisterServerResponse, nodeValue = 440;
RegisterServer2Request, nodeValue = 12211;
RegisterServer2Response, nodeValue = 12212;
CreateSessionRequest, nodeValue = 461;
CreateSessionResponse, nodeValue = 464;
ActivateSessionRequest, nodeValue = 467;
ActivateSessionResponse, nodeValue = 470;
CloseSessionRequest, nodeValue = 473;
CloseSessionResponse, nodeValue = 476;
CancelRequestRequest, nodeValue = 479;
CancelRequestResponse, nodeValue = 482;
AddNodesRequest, nodeValue = 488;
AddNodesResponse, nodeValue = 491;
AddReferencesRequest, nodeValue = 494;
AddReferencesResponse, nodeValue = 497;
DeleteNodesRequest, nodeValue = 500;
DeleteNodesResponse, nodeValue = 503;
DeleteReferencesRequest, nodeValue = 506;
DeleteReferencesResponse, nodeValue = 509;
BrowseRequest, nodeValue = 527;
BrowseResponse, nodeValue = 530;
BrowseNextRequest, nodeValue = 533;
BrowseNextResponse, nodeValue = 536;
TranslateBrowsePathsToNodeIdsRequest, nodeValue = 554;
TranslateBrowsePathsToNodeIdsResponse, nodeValue = 557;
RegisterNodesRequest, nodeValue = 560;
RegisterNodesResponse, nodeValue = 563;
UnregisterNodesRequest, nodeValue = 566;
UnregisterNodesResponse, nodeValue = 569;
QueryFirstRequest, nodeValue = 615;
QueryFirstResponse, nodeValue = 618;
QueryNextRequest, nodeValue = 621;
QueryNextResponse, nodeValue = 624;
ReadRequest, nodeValue = 631;
ReadResponse, nodeValue = 634;
HistoryReadRequest, nodeValue = 664;
HistoryReadResponse, nodeValue = 667;
WriteRequest, nodeValue = 673;
WriteResponse, nodeValue = 677;
HistoryUpdateRequest, nodeValue = 700;
HistoryUpdateResponse, nodeValue = 703;
CallRequest, nodeValue = 712;
CallResponse, nodeValue = 715;
CreateMonitoredItemsRequest, nodeValue = 751;
CreateMonitoredItemsResponse, nodeValue = 754;
ModifyMonitoredItemsRequest, nodeValue = 763;
ModifyMonitoredItemsResponse, nodeValue = 766;
SetMonitoringModeRequest, nodeValue = 769;
SetMonitoringModeResponse, nodeValue = 772;
SetTriggeringRequest, nodeValue = 775;
SetTriggeringResponse, nodeValue = 778;
DeleteMonitoredItemsRequest, nodeValue = 781;
DeleteMonitoredItemsResponse, nodeValue = 784;
CreateSubscriptionRequest, nodeValue = 787;
CreateSubscriptionResponse, nodeValue = 790;
ModifySubscriptionRequest, nodeValue = 793;
ModifySubscriptionResponse, nodeValue = 796;
SetPublishingModeRequest, nodeValue = 799;
SetPublishingModeResponse, nodeValue = 802;
PublishRequest, nodeValue = 826;
PublishResponse, nodeValue = 829;
RepublishRequest, nodeValue = 832;
RepublishResponse, nodeValue = 835;
TransferSubscriptionsRequest, nodeValue = 841;
TransferSubscriptionsResponse, nodeValue = 844;
DeleteSubscriptionsRequest, nodeValue = 847;
DeleteSubscriptionsResponse, nodeValue = 850)";
}
} with { encode "RAW" }