Visavi Visual OPC .NET  

OpcDataType Structure

Represents a data type for an OPC value.

For a list of all members of this type, see  OpcDataType Members.

System.Object
   System.ValueType
      Visavi.Opc.Client.OpcDataType 

[Visual Basic]
 Public
   Structure OpcDataType
[C#]
 public structure OpcDataType
[C++]
 public __gc class
   OpcDataType

Remarks

The OpcDataType wraps the VT_TYPE that defines the type of an OPC value in the OPC Server. You can think of the type as an enumeration; however, it has implicit = operators defined to allow it to be set equall to integers as well as the enumerated constant. The table below shows the list of enumerated constants for this class, the equivalent VARENUM, and the underlying integer value.

OpcDataType VARENUM Integer Equivalent String Equivalent
OpcDataType.Empty VT_EMPTY 1 "Empty"
OpcDataType.Null VT_NULL 2 "Null"
OpcDataType.Int16 VT_I2 3 "Int16"
OpcDataType.Int32 VT_I4 4 "Int32"
OpcDataType.Single VT_R4 5 "Single"
OpcDataType.Double VT_R8 6 "Double"
OpcDataType.Currency VT_CY 7 "Currency"
OpcDataType.DateTime VT_DATE 8 "DateTime"
OpcDataType.String VT_BSTR 9 "String"
OpcDataType.Dispatch VT_DISPATCH 10 "Dispatch"
OpcDataType.Error VT_ERROR 11 "Error"
OpcDataType.Boolean VT_BOOL 12 "Boolean"
OpcDataType.Variant VT_VARIANT 13 "Variant"
OpcDataType.Decimal VT_DECIMAL 14 "Decimal"
OpcDataType.Record VT_RECORD 15 "Record"
OpcDataType.Unknown VT_UNKNOWN 16 "Unknown"
OpcDataType.Char VT_I1 17 "Char"
OpcDataType.UChar VT_UI1 18 "UChar"
OpcDataType.UInt16 VT_UI2 19 "UInt16"
OpcDataType.UInt32 VT_UI4 20 "UInt32"

For a more detailed discussion on the OPC data types, see the topic VARIANT Data Types and Interoperability.

Requirements

Namespace: Visavi.Opc.Client

Platforms:  Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

Assembly: Visavi.Opc.Client

See Also

OpcDataType Members | Visavi.Opc.Client Namespace