.NET Based OPC UA Client/Server SDK
2.6.4.435
|
Functions that operate on built in types. More...
Public Member Functions | |
delegate object | CastArrayElementHandler (object source, BuiltInType srcType, BuiltInType dstType) |
A delegate for a function that converts an array element. More... | |
Static Public Member Functions | |
static void | RegisterTypeDefinition (Type type) |
Registers a type that represents a type definition. More... | |
static object | Clone (object value) |
Returns a deep copy of the value. More... | |
static bool | IsEqual (object value1, object value2) |
Checks if two values are equal. More... | |
static string | Format (IFormatProvider provider, object value) |
Formats the value using the specified format provider. More... | |
static NodeId | GetDataTypeId (object value) |
Returns the data type id that describes a value. More... | |
static NodeId | GetDataTypeId (Type type) |
Returns the data type id that describes a value. More... | |
static NodeId | GetDataTypeId (TypeInfo typeInfo) |
Returns the data type id that describes a value. More... | |
static int | GetValueRank (object value) |
Returns the array rank for a value. More... | |
static int | GetValueRank (Type type) |
Returns the array rank for a type. More... | |
static BuiltInType | GetBuiltInType (NodeId datatypeId) |
Returns the BuiltInType type for the DataTypeId. More... | |
static bool | IsNumericType (BuiltInType builtInType) |
Returns true if the built-in type is a numeric type. More... | |
static bool | IsValueType (BuiltInType builtInType) |
Returns true if the built-in type is a type that cannot be null. More... | |
static BuiltInType | GetBuiltInType (NodeId datatypeId, ITypeTable typeTree) |
Returns the BuiltInType type for the DataTypeId. More... | |
static Type | GetSystemType (NodeId datatypeId, EncodeableFactory factory) |
Returns the system type for the datatype. More... | |
static TypeInfo | IsInstanceOfDataType (object value, NodeId expectedDataTypeId, int expectedValueRank, NamespaceTable namespaceUris, ITypeTable typeTree) |
Returns the type info if the value is an instance of the data type with the specified value rank. More... | |
static TypeInfo | IsInstanceOfDataType (Variant value, TypeInfo expectedType) |
Returns the type info if the value is an instance of the data type with the specified value rank. More... | |
static TypeInfo | IsInstanceOfDataType (Variant value, NodeId expectedDataTypeId, int expectedValueRank, NamespaceTable namespaceUris, ITypeTable typeTree) |
Returns the type info if the value is an instance of the data type with the specified value rank. More... | |
static Type | GetSystemType (BuiltInType builtInType, int valueRank) |
Returns the system type a scalar or array instance of the built-in type. More... | |
static Variant | GetDefaultValue (BuiltInType type) |
Returns the default value for the specified built-in type. More... | |
static Variant | GetDefaultValue (NodeId dataType, int valueRank) |
Returns the default value for the specified data type and value rank. More... | |
static Variant | GetDefaultValue (NodeId dataType, int valueRank, ITypeTable typeTree) |
Returns the default value for the specified data type and value rank. More... | |
static Array | CreateArray (BuiltInType type, params int[] dimensions) |
Returns the default value for the specified built-in type. More... | |
static Variant | Cast2 (Variant source, BuiltInType targetType) |
Casts a value to the specified target type. More... | |
static Variant | Cast2 (Variant source, TypeInfo sourceType, BuiltInType targetType) |
Casts a value to the specified target type. More... | |
static object | Cast (object source, BuiltInType targetType) |
Casts a value to the specified target type. More... | |
static object | Cast (object source, TypeInfo sourceType, BuiltInType targetType) |
Casts a value to the specified target type. More... | |
static void | CastArray (Array dst, BuiltInType dstType, Array src, BuiltInType srcType, CastArrayElementHandler convertor) |
Converts the array using the specified conversion function. More... | |
static Array | CastArray (Array srcArray, BuiltInType srcType, BuiltInType dstType, CastArrayElementHandler convertor) |
Converts the array. More... | |
static bool | ValidateArrayDimensions (int valueRank, IList< uint > arrayDimensions) |
Validates the array dimensions. More... | |
Static Public Attributes | |
static readonly UTF8Encoding | UTF8 = new UTF8Encoding(false) |
A preallocated UTF8 encoder object. More... | |
Functions that operate on built in types.
|
inlinestatic |
Casts a value to the specified target type.
source | The instance of a source value. |
targetType | Type of the target. |
InvalidCastException | if imposible to cast. |
|
inlinestatic |
Casts a value to the specified target type.
source | The instance of a source value. |
sourceType | Type of the source. |
targetType | Type of the target. |
InvalidCastException | if imposible to cast. |
|
inlinestatic |
Casts a value to the specified target type.
source | The instance of a source value. |
targetType | Type of the target. |
InvalidCastException | if imposible to cast. |
|
inlinestatic |
Casts a value to the specified target type.
source | The instance of a source value. |
sourceType | Type of the source. |
targetType | Type of the target. |
InvalidCastException | if imposible to cast. |
|
inlinestatic |
Converts the array using the specified conversion function.
dst | The destination array (must have the same size as the source array). |
dstType | The data type of the elements in the destination array. |
src | The source array. |
srcType | The data type of the elements in the source array. |
convertor | The handler which does the conversion. |
|
inlinestatic |
Converts the array.
srcArray | The source array. |
srcType | The type of the source array. |
dstType | The type of the converted array. |
convertor | The handler which does the conversion. |
delegate object UnifiedAutomation.UaBase.TypeUtils.CastArrayElementHandler | ( | object | source, |
BuiltInType | srcType, | ||
BuiltInType | dstType | ||
) |
A delegate for a function that converts an array element.
source | The element to be converted. |
srcType | The type of the source element. |
dstType | The type of the converted value. |
|
inlinestatic |
Returns a deep copy of the value.
|
inlinestatic |
Returns the default value for the specified built-in type.
type | The built-in type. |
dimensions | The dimensions. |
|
inlinestatic |
Formats the value using the specified format provider.
provider | The format provider. |
value | The value. |
|
inlinestatic |
Returns the BuiltInType type for the DataTypeId.
datatypeId | The data type identifier. |
|
inlinestatic |
Returns the BuiltInType type for the DataTypeId.
datatypeId | The data type identyfier for a node in a server's address space. |
typeTree | The type tree for a server. . |
|
inlinestatic |
Returns the data type id that describes a value.
value | The value instance to check the data type. |
|
inlinestatic |
Returns the data type id that describes a value.
type | The framework type. |
Returns the data type id that describes a value.
typeInfo | The type info. |
|
inlinestatic |
Returns the default value for the specified built-in type.
type | The Built-in type. |
|
inlinestatic |
Returns the default value for the specified data type and value rank.
dataType | The data type. |
valueRank | The value rank. |
|
inlinestatic |
Returns the default value for the specified data type and value rank.
dataType | The data type. |
valueRank | The value rank. |
typeTree | The type tree for a server. |
|
inlinestatic |
Returns the system type for the datatype.
datatypeId | The datatype id. |
factory | The factory used to store and retrieve underlying OPC UA system types. |
|
inlinestatic |
Returns the system type a scalar or array instance of the built-in type.
builtInType | A built-in type. |
valueRank | The value rank. |
|
inlinestatic |
Returns the array rank for a value.
value | The value instance to check the array rank. |
|
inlinestatic |
Returns the array rank for a type.
type | The framework type to check the array rank. |
|
inlinestatic |
Checks if two values are equal.
|
inlinestatic |
Returns the type info if the value is an instance of the data type with the specified value rank.
value | The value instance to check. |
expectedDataTypeId | The expected data type identifier for a node. |
expectedValueRank | The expected value rank. |
namespaceUris | The namespace URI's. |
typeTree | The type tree for a server. |
null
.
|
inlinestatic |
Returns the type info if the value is an instance of the data type with the specified value rank.
value | The value instance to check. |
expectedType | The expected type. |
null
.
|
inlinestatic |
Returns the type info if the value is an instance of the data type with the specified value rank.
value | The value instance to check. |
expectedDataTypeId | The expected data type identifier for a node. |
expectedValueRank | The expected value rank. |
namespaceUris | The namespace URI's. |
typeTree | The type tree for a server. |
null
.
|
inlinestatic |
Returns true if the built-in type is a numeric type.
builtInType | The built-in type to check. |
|
inlinestatic |
Returns true if the built-in type is a type that cannot be null.
builtInType | The built in type to check. |
|
inlinestatic |
Registers a type that represents a type definition.
type | The type definition. |
|
inlinestatic |
Validates the array dimensions.
valueRank | The value rank. |
arrayDimensions | The array dimensions. |
|
static |
A preallocated UTF8 encoder object.