An OpaqueType describes a binary encoded value that is either a primitive fixed length type or that has a structure too complex to capture in an OPC Binary type dictionary. Authors of type dictionaries should avoid defining OpaqueTypes that do not have a fixed length because it would prevent applications from interpreting values that use these types without having built-in knowledge of the OpaqueType. The OPC Binary Type Description System defines many standard OpaqueTypes that should allow authors to describe most binary encoded values as StructuredTypes.
The components of an OpaqueType are described in Table E.3.
Table E.3 – OpaqueType Components
|TypeDescription||TypeDescription||An OpaqueType inherits all elements and attributes defined for a TypeDescription in Table E.2.|
|LengthInBits||xs:string||An attribute which specifies the length of the OpaqueType in bits. This value should always be specified. If this value is not specified the Documentation element should describe the encoding in a way that a human understands.|
|ByteOrderSignificant||xs:boolean||An attribute that indicates whether byte order is significant for the type.
If byte order is significant then the application shall determine the byte order to use for the current context before interpreting the encoded value. The application determines the byte order by looking for the DefaultByteOrder attribute specified for containing StructuredTypes or the TypeDictionary. If StructuredTypes are nested the inner StructuredTypes override the byte order of the outer descriptions.
If the DefaultByteOrder attribute is specified for the OpaqueType, then the ByteOrder is fixed and does not change according to context.
If this attribute is “true”, then the LengthInBits attribute shall be specified and it shall be an integer multiple of 8 bits.