.NET Based OPC UA Client/Server SDK  3.0.10.493
UnifiedAutomation.UaBase.SchemaBuilder Class Reference

A class which builds schemas associated with dynamically defined data types. More...

Public Member Functions

 SchemaBuilder (string uriForNodes, string uriForSchema)
 Initializes a new instance of the SchemaBuilder class. More...
 
byte[] GetBinaryDictionary ()
 Gets the OPC Binary dictionary which describes the types managed by the instance. More...
 
GenericEnumeratedDataType NewEnumeration (string name)
 Creates a new generic enumerated data type. More...
 
GenericEnumeratedDataType NewEnumeration (NewEnumerationSettings settings)
 Creates a new generic enumerated data type. More...
 
GenericStructureDataType NewStructure (string name)
 Creates a new generic structured data type. More...
 
GenericStructureDataType NewStructure (NewStructureSettings settings)
 Creates a new generic structured data type. More...
 
GenericUnionDataType NewUnion (string name)
 Creates a new generic union data type. More...
 
GenericUnionDataType NewUnion (NewStructureSettings settings)
 Creates a new generic union data type. More...
 
GenericOptionalFieldListDataType NewOptionalFieldList (string name)
 Creates a new generic optional field list data type. More...
 
GenericOptionalFieldListDataType NewOptionalFieldList (NewStructureSettings settings)
 Creates a new generic optional field list data type. More...
 
GenericStructureDataTypeField AddField (GenericStructureDataType definition, string name, BuiltInType type)
 Adds a field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddField (GenericStructureDataType definition, string name, BuiltInType type, int valueRank)
 Adds a field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddField (GenericStructureDataType definition, string name, BuiltInType type, ExpandedNodeId dataTypeId, int valueRank)
 Adds a field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddField (GenericStructureDataType definition, string name, Type enumeration)
 Adds a field with an enumerated data type to a structured data type. More...
 
GenericStructureDataTypeField AddField (GenericStructureDataType definition, string name, Type enumeration, int valueRank)
 Adds a field with an enumerated data type to a structured data type. More...
 
GenericStructureDataTypeField AddField (GenericStructureDataType definition, string name, GenericEnumeratedDataType enumeration, int valueRank)
 Adds a field with an enumerated data type to a structured data type. More...
 
GenericStructureDataTypeField AddField (GenericStructureDataType definition, string name, GenericDataType type)
 Adds a field with the specified data type to a structured data type. More...
 
GenericStructureDataTypeField AddField (GenericStructureDataType definition, string name, GenericDataType type, int valueRank)
 Adds a field with the specified data type to a structured data type. More...
 
GenericStructureDataTypeField AddOptionalField (GenericOptionalFieldListDataType definition, string name, BuiltInType type)
 Adds an optional field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddOptionalField (GenericOptionalFieldListDataType definition, string name, BuiltInType type, int valueRank)
 Adds an optional field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddOptionalField (GenericOptionalFieldListDataType definition, string name, BuiltInType type, ExpandedNodeId dataTypeId, int valueRank)
 Adds an optional field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddOptionalField (GenericOptionalFieldListDataType definition, string name, Type enumeration)
 Adds an optional field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddOptionalField (GenericOptionalFieldListDataType definition, string name, Type enumeration, int valueRank)
 Adds an optional field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddOptionalField (GenericOptionalFieldListDataType definition, string name, GenericEnumeratedDataType enumeration, int valueRank)
 Adds an optional field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddOptionalField (GenericOptionalFieldListDataType definition, string name, GenericDataType type)
 Adds an optional field with a simple data type to a structure data type. More...
 
GenericStructureDataTypeField AddOptionalField (GenericOptionalFieldListDataType definition, string name, GenericDataType type, int valueRank)
 Adds an optional field with a simple data type to a structure data type. More...
 
bool TypeExists (string name)
 Checks if the type is in the current dictionary. More...
 
Find< T > (string name)
 Finds type with the specified name. More...
 
void Add (GenericDataType definition)
 Adds the specified data type to the dictionaries managed by the instance. More...
 

Properties

NodeId BinaryDictionaryId [get, set]
 Gets or sets the id for the OPC Binary dictionary node. More...
 
string NamespaceUriForNodes [get]
 Gets the namespace URI to use for data type and encoding nodes. More...
 
string NamespaceUriForSchema [get]
 Gets the namespace URI to use for the schemas. More...
 
IdType AutoGeneratedIdType [get, set]
 Gets or sets the type for automatically generated NodeIds. More...
 

Detailed Description

A class which builds schemas associated with dynamically defined data types.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.SchemaBuilder.SchemaBuilder ( string  uriForNodes,
string  uriForSchema 
)
inline

Initializes a new instance of the SchemaBuilder class.

Parameters
uriForNodesThe namespace URI to use for data type and encoding node ids.
uriForSchemaThe namespace to use for the schemas.

Member Function Documentation

void UnifiedAutomation.UaBase.SchemaBuilder.Add ( GenericDataType  definition)
inline

Adds the specified data type to the dictionaries managed by the instance.

Parameters
definitionThe data type to add.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddField ( GenericStructureDataType  definition,
string  name,
BuiltInType  type 
)
inline

Adds a field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeThe type of .
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddField ( GenericStructureDataType  definition,
string  name,
BuiltInType  type,
int  valueRank 
)
inline

Adds a field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeThe type of .
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddField ( GenericStructureDataType  definition,
string  name,
BuiltInType  type,
ExpandedNodeId  dataTypeId,
int  valueRank 
)
inline

Adds a field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeThe type of .
dataTypeIdThe NodeId of the DataType node.
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddField ( GenericStructureDataType  definition,
string  name,
Type  enumeration 
)
inline

Adds a field with an enumerated data type to a structured data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
enumerationA type which respresents the enumeration.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddField ( GenericStructureDataType  definition,
string  name,
Type  enumeration,
int  valueRank 
)
inline

Adds a field with an enumerated data type to a structured data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
enumerationA type which respresents the enumeration.
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddField ( GenericStructureDataType  definition,
string  name,
GenericEnumeratedDataType  enumeration,
int  valueRank 
)
inline

Adds a field with an enumerated data type to a structured data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
enumerationA type which respresents the enumeration.
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddField ( GenericStructureDataType  definition,
string  name,
GenericDataType  type 
)
inline

Adds a field with the specified data type to a structured data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeA generic type representing the field.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddField ( GenericStructureDataType  definition,
string  name,
GenericDataType  type,
int  valueRank 
)
inline

Adds a field with the specified data type to a structured data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeA generic type representing the field.
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddOptionalField ( GenericOptionalFieldListDataType  definition,
string  name,
BuiltInType  type 
)
inline

Adds an optional field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeThe type of .
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddOptionalField ( GenericOptionalFieldListDataType  definition,
string  name,
BuiltInType  type,
int  valueRank 
)
inline

Adds an optional field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeThe type of .
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddOptionalField ( GenericOptionalFieldListDataType  definition,
string  name,
BuiltInType  type,
ExpandedNodeId  dataTypeId,
int  valueRank 
)
inline

Adds an optional field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeThe type of .
dataTypeIdThe NodeId of the DataType node.
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddOptionalField ( GenericOptionalFieldListDataType  definition,
string  name,
Type  enumeration 
)
inline

Adds an optional field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
enumerationA type which respresents the enumeration.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddOptionalField ( GenericOptionalFieldListDataType  definition,
string  name,
Type  enumeration,
int  valueRank 
)
inline

Adds an optional field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
enumerationA type which respresents the enumeration.
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddOptionalField ( GenericOptionalFieldListDataType  definition,
string  name,
GenericEnumeratedDataType  enumeration,
int  valueRank 
)
inline

Adds an optional field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
enumerationA type which respresents the enumeration.
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddOptionalField ( GenericOptionalFieldListDataType  definition,
string  name,
GenericDataType  type 
)
inline

Adds an optional field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeA generic type representing the field.
Returns
The generic field after it is added to structure.
GenericStructureDataTypeField UnifiedAutomation.UaBase.SchemaBuilder.AddOptionalField ( GenericOptionalFieldListDataType  definition,
string  name,
GenericDataType  type,
int  valueRank 
)
inline

Adds an optional field with a simple data type to a structure data type.

Parameters
definitionThe structured data type to update.
nameThe name of the field.
typeA generic type representing the field.
valueRankOneDimension if the field is array; Scalar otherwise.
Returns
The generic field after it is added to structure.
T UnifiedAutomation.UaBase.SchemaBuilder.Find< T > ( string  name)
inline

Finds type with the specified name.

Template Parameters
TThe expected subtype of GenericDataType.
Parameters
nameThe name.
Returns
The type if found; NULL if not found or if not an instance requested GenericDataType subtype.
Type Constraints
T :GenericDataType 
byte [] UnifiedAutomation.UaBase.SchemaBuilder.GetBinaryDictionary ( )
inline

Gets the OPC Binary dictionary which describes the types managed by the instance.

Returns
An UTF-8 encoded XML document which comes to the OPC Binary schema.
GenericEnumeratedDataType UnifiedAutomation.UaBase.SchemaBuilder.NewEnumeration ( string  name)
inline

Creates a new generic enumerated data type.

Creates the required nodes in addressspace and entries in the dictionaries.

Parameters
nameThe name of the enumerated data type.
Returns
The new enumerated data type.
GenericEnumeratedDataType UnifiedAutomation.UaBase.SchemaBuilder.NewEnumeration ( NewEnumerationSettings  settings)
inline

Creates a new generic enumerated data type.

Creates the required nodes in addressspace and entries in the dictionaries.

Parameters
settingsInformation about the DataType to be used for Dictionary and Nodes.
Returns
The new enumerated data type.
GenericOptionalFieldListDataType UnifiedAutomation.UaBase.SchemaBuilder.NewOptionalFieldList ( string  name)
inline

Creates a new generic optional field list data type.

Creates the required nodes in addressspace and entries in the dictionaries.

Parameters
nameThe name of the optional field list data type.
Returns
The new optional field list data type.
GenericOptionalFieldListDataType UnifiedAutomation.UaBase.SchemaBuilder.NewOptionalFieldList ( NewStructureSettings  settings)
inline

Creates a new generic optional field list data type.

Creates the required nodes in addressspace and entries in the dictionaries.

Parameters
settingsInformation about the DataType to be used for Dictionary and Nodes.
Returns
The new optional field list data type.
GenericStructureDataType UnifiedAutomation.UaBase.SchemaBuilder.NewStructure ( string  name)
inline

Creates a new generic structured data type.

Creates the required nodes in addressspace and entries in the dictionaries.

Parameters
nameThe name of the structured data type.
Returns
The new structured data type.
GenericStructureDataType UnifiedAutomation.UaBase.SchemaBuilder.NewStructure ( NewStructureSettings  settings)
inline

Creates a new generic structured data type.

Creates the required nodes in addressspace and entries in the dictionaries.

Parameters
settingsInformation about the DataType to be used for Dictionary and Nodes.
Returns
The new structured data type.
GenericUnionDataType UnifiedAutomation.UaBase.SchemaBuilder.NewUnion ( string  name)
inline

Creates a new generic union data type.

Creates the required nodes in addressspace and entries in the dictionaries.

Parameters
nameThe name of the union data type.
Returns
The new union data type.
GenericUnionDataType UnifiedAutomation.UaBase.SchemaBuilder.NewUnion ( NewStructureSettings  settings)
inline

Creates a new generic union data type.

Creates the required nodes in addressspace and entries in the dictionaries.

Parameters
settingsInformation about the DataType to be used for Dictionary and Nodes.
Returns
The new union data type.
bool UnifiedAutomation.UaBase.SchemaBuilder.TypeExists ( string  name)
inline

Checks if the type is in the current dictionary.

Parameters
nameThe name of the type.
Returns
TRUE if it exist; FALSE otherwise.

Property Documentation

IdType UnifiedAutomation.UaBase.SchemaBuilder.AutoGeneratedIdType
getset

Gets or sets the type for automatically generated NodeIds.

The type for automatically generated NodeIds.

When data types are created the NodeIds for the DataType, DefaultBinary Encoding and DefaultXML Encoding are automatically generated. The AutoGeneratedIdType controls the type of identifiers of the new NodeIds.

The following algorithms are used: Numeric: monotonically increasing counter; Guid: new GUID created for each identifier; String: a string within the dictionary that incorporates the type name; ByteString: a UTF-8 encoded version of a string within the dictionary that incorporates the type name;

If autogenerated NodeIds are not desired they can be manually replace by the caller.

NodeId UnifiedAutomation.UaBase.SchemaBuilder.BinaryDictionaryId
getset

Gets or sets the id for the OPC Binary dictionary node.

The id for the OPC Binary dictionary node.

string UnifiedAutomation.UaBase.SchemaBuilder.NamespaceUriForNodes
get

Gets the namespace URI to use for data type and encoding nodes.

The namespace URI to use for data type and encoding nodes.

string UnifiedAutomation.UaBase.SchemaBuilder.NamespaceUriForSchema
get

Gets the namespace URI to use for the schemas.

The namespace URI to use for the schemas.


The documentation for this class was generated from the following file: