Exporting UA Methods and their arguments to nodeset file #2562
Unanswered
ahmadjqureshi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am looking for help or example to export UA Methods to nodeset file specially exporting input and output arguments. An example of methods is following from uacppserver nodeset file:
<"UAVariable DataType="Argument" ParentNodeId="ns=1;s=Demo.CTT.Methods.MethodIO" ValueRank="1" NodeId="ns=1;s=Demo.CTT.Methods.MethodIO.InputArguments" ArrayDimensions="2" BrowseName="InputArguments"">"
<"DisplayName>InputArguments
<"References>
<"Reference ReferenceType="HasProperty" IsForward="false">ns=1;s=Demo.CTT.Methods.MethodIO
<"Reference ReferenceType="HasTypeDefinition">i=68
<"/References>
<"Value>
<"uax:ListOfExtensionObject>
uax:ExtensionObject
uax:TypeId
uax:Identifieri=297</uax:Identifier>
</uax:TypeId>
uax:Body
uax:Argument
uax:NameSummand1</uax:Name>
uax:DataType
uax:Identifieri=7</uax:Identifier>
</uax:DataType>
To achieve similar structure tried to use ExtensionObjectCollection in following way:
var inputArgs = new ExtensionObjectCollection();
foreach (var inputArg in method.InputArguments)
{
inputArgs.Add(new ExtensionObject(inputArg));
}
((Opc.Ua.VariableNode)inArgsNode).Value = new Opc.Ua.Variant(inputArgs);
But in debugger Variant seems to be null probably this is not correct way to export arguments.
Any help would be appreciated regarding method and its arguments export to nodeset file.
Best regards
Ahmad
Beta Was this translation helpful? Give feedback.
All reactions