After I managed to get some DataTypeDescription from the Server (without using UAModeler Files) I wanted to create a complex structure, matching the given DataType and pass it to the inputArguments-list.
The question is - how to do that?
Here is, what I've got:
Code: Select all
// Some code for getting Parameters dynamically in combination with Click_Events
// ...
// Create new instance of datatypemanager
DataTypeManager mgr = new DataTypeManager(session);
// Get DataType Description/Dictionary
DataTypeDescription descType = mgr.GetDescriptionFromEncoding(nodeId, true);
DataTypeDictionary myDict = descType.Dictionary;
// BinaryBuilder
BinarySchemaBuilder bBuilder = new BinarySchemaBuilder(myDict.SchemaData);
// Get GenericDataType
GenericStructureDataType dType = (GenericStructureDataType)bBuilder.NewTypeFromDictionary(new XmlQualifiedName("name", "namespace"));
How can I create a ComplexDataType (ExtensionObject?) reflecting dType-Description, fill this structure with values, and pass it to the inputArgs of a method (for a Call())?
Thank you for your help