Skip to content

Commit

Permalink
Added arrayDimension element even if it is not set to be compatible w…
Browse files Browse the repository at this point in the history
…ith the open62541 nodeset generator
  • Loading branch information
thomasfruehwirth committed Apr 1, 2021
1 parent 68ca3de commit 966ecd4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,27 +126,34 @@ mapping UML::Parameter::parameter2ExtensionObject(inout method : OPCUA::UAMethod
case (self.type.toString().find("Integer") > 0) {
argument.dataType := object TYPES::NodeId{identifier := getId("Int32")};
argument.valueRank := -1;
argument.arrayDimensions := null; // required for compatibility with open62541 nodeset generator
}
case (self.type.toString().find("String") > 0) {
argument.dataType := object TYPES::NodeId{identifier := getId("String")};
argument.valueRank := -1;
argument.arrayDimensions := null; // required for compatibility with open62541 nodeset generator
}
case (self.type.toString().find("Real") > 0) {
argument.dataType := object TYPES::NodeId{identifier := getId("Double")};
argument.valueRank := -1;
argument.arrayDimensions := null; // required for compatibility with open62541 nodeset generator
}
case (self.type.toString().find("Float") > 0) {
argument.dataType := object TYPES::NodeId{identifier := getId("Double")};
argument.valueRank := -1;
argument.arrayDimensions := null; // required for compatibility with open62541 nodeset generator
}
case (self.type.toString().find("Boolean") > 0) {
argument.dataType := object TYPES::NodeId{identifier := getId("Boolean")};
argument.valueRank := -1;
argument.arrayDimensions := null; // required for compatibility with open62541 nodeset generator
}
else {
raise Exception("Unkown datatype for parameter " + self.name + ": " + self.type.toString());
}
};



var feature := TYPES::DocumentRoot.oclAsType(EClass).getEStructuralFeature("argument");
body.oclAsType(EObject).eSet(feature, argument); // add the argument as structural feature of type "TYPES::Argument"
Expand Down

0 comments on commit 966ecd4

Please sign in to comment.