Skip to content

Commit c357b62

Browse files
committed
update code for SmartMDSD Toolchain release v3.12
1 parent 91bffde commit c357b62

File tree

15 files changed

+76
-46
lines changed

15 files changed

+76
-46
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
SmartMDSD Toolchain v3.12
2+
* Fixed bug in Plain OPC UA Code generation that now supports one-dimensional arrays for method calls
3+
* Fixed bug in deployment script that now also copies the SmartSoft library
4+
* Fixed minor issue in component code generation that now sorts extensions for a uniform generation order
5+
* Updated contents in the Welcome page to now show the Release Notes (aka What's New) properly
6+
-- Thu, 5 Dec. 2019
7+
18
SmartMDSD Toolchain v3.11
29
* Updated Welcome Pages (see Help->Welcome)
310
* Updated C++ code geenrators to support updated background infrastructure (SmartSoft API v1.1 and ACE/SmartSoft Kernel v3.2)

ReleaseNotes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This file contains the release notes for the SmartMDSD Toolchain version 3.x. For each release, it provides important information to users to support them in switching from one specific version the previous version. This includes information and instructions how to migrate content from one version to another.
44

5+
## v3.12
6+
7+
This is a hotfix release where several internal code generation bugs are fixed. We recommend to manually trigger the code generation for your existing projects by selecting the project in the SmartMDSD Project Explorer and using the Eclipse menu: **SmartMDSD** -> **Run Code-Generation**. This will update your src-gen folders so you also might want rebuilding your projects by using the Eclipse menu **SmartMDSD** -> **Build Project** (alternatively, you can use the Eclipse menu: **Project** -> **Build All** to rebuild all your projects in the workspace at once). There are no other changes in the models or user-code required.
8+
59
## v3.11
610

711
This is a maintainance release mostly motivated by the updated background infrastructure. Most notably, the **SmartSoft Component Developer API** has been updated from version 1.0 to **version 1.1**, and the **ACE/SmartSoft Kernel** has been updated from version 3.1 to **version 3.2**. Therefore the Toolchain's internal C++ code generators have been updated and now generate consistently towards the updated background infrastructure. This also means that if you have not yet updated your current background infrastructure, then you should do so **before** using this new Toolchain update.

org.smartmdsd.infrastructure/org.smartmdsd.branding/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: SmartMDSD
44
Bundle-SymbolicName: org.smartmdsd.branding;singleton:=true
5-
Bundle-Version: 3.7.0.qualifier
5+
Bundle-Version: 3.9.0.qualifier
66
Bundle-Activator: org.smartmdsd.branding.Activator
77
Require-Bundle: org.eclipse.ui,
88
org.eclipse.core.runtime,
0 Bytes
Binary file not shown.
528 Bytes
Binary file not shown.

org.smartmdsd.infrastructure/org.smartmdsd.feature/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.smartmdsd.toolchain"
44
label="SmartMDSD-Toolchain"
5-
version="3.11.0.qualifier"
5+
version="3.12.0.qualifier"
66
provider-name="Servicerobotics Ulm"
77
plugin="org.smartmdsd.branding"
88
os="linux,win32"

org.xtend.generators/org.open62541.xml.compiler/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: OpcUaXmlCompiler
44
Bundle-SymbolicName: org.open62541.xml.compiler
5-
Bundle-Version: 3.7.0.qualifier
5+
Bundle-Version: 3.8.0.qualifier
66
Bundle-Vendor: Servicerobotics Ulm
77
Automatic-Module-Name: org.open62541.xml.compiler
88
Bundle-RequiredExecutionEnvironment: JavaSE-1.8

org.xtend.generators/org.open62541.xml.compiler/src/org/open62541/xml/compiler/OpcUaClientImpl.xtend

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -236,29 +236,33 @@ class OpcUaClientImpl implements OpcUaClient {
236236
«ENDFOR»
237237

238238
«FOR method: methodList»
239-
OPCUA::StatusCode «objectName»::call«method.name.toFirstUpper»(«method.cppMethodArgumentsDef»)
240-
{
241-
std::vector<OPCUA::Variant> inputArguments(«method.inputArguments.size»);
242-
«var count1=-1»
243-
«FOR arg: method.inputArguments»
244-
inputArguments[«count1=count1+1»] = «arg.name»;
245-
«ENDFOR»
246-
std::vector<OPCUA::Variant> outputArguments;
247-
OPCUA::StatusCode status = callMethod(std::string("«method.name»"), inputArguments, outputArguments);
248-
if(status == OPCUA::StatusCode::ALL_OK)
249-
{
250-
«var count2=-1»
251-
«FOR arg: method.outputArguments»
252-
«IF arg.DataTypeIdentifier == OpcUaXmlParser.SeRoNetARGUMENT.UA_TYPES_STRING»
253-
«arg.name» = outputArguments[«count2=count2+1»].toString();
254-
«ELSE»
255-
«arg.name» = outputArguments[«count2=count2+1»];
256-
«ENDIF»
239+
OPCUA::StatusCode «objectName»::call«method.name.toFirstUpper»(«method.cppMethodArgumentsDef»)
240+
{
241+
std::vector<OPCUA::Variant> inputArguments(«method.inputArguments.size»);
242+
«var count1=-1»
243+
«FOR arg: method.inputArguments»
244+
inputArguments[«count1=count1+1»] = «arg.name»;
245+
«ENDFOR»
246+
std::vector<OPCUA::Variant> outputArguments;
247+
OPCUA::StatusCode status = callMethod(std::string("«method.name»"), inputArguments, outputArguments);
248+
if(status == OPCUA::StatusCode::ALL_OK)
249+
{
250+
«var count2=-1»
251+
«FOR arg: method.outputArguments»
252+
«IF arg.ValueRank == 1»
253+
«arg.name» = outputArguments[«count2=count2+1»].getArrayValuesAs<«arg.DataTypeString»>();
254+
«ELSE»
255+
«IF arg.DataTypeIdentifier == OpcUaXmlParser.SeRoNetARGUMENT.UA_TYPES_STRING»
256+
«arg.name» = outputArguments[«count2=count2+1»].toString();
257+
«ELSE»
258+
«arg.name» = outputArguments[«count2=count2+1»];
259+
«ENDIF»
260+
«ENDIF»
257261
«ENDFOR»
258-
}
259-
return status;
260-
}
261-
262+
}
263+
return status;
264+
}
265+
262266
«ENDFOR»
263267
'''
264268
@@ -325,4 +329,4 @@ class OpcUaClientImpl implements OpcUaClient {
325329
)
326330
'''
327331

328-
}
332+
}

org.xtend.generators/org.open62541.xml.compiler/src/org/open62541/xml/compiler/OpcUaXmlParser.xtend

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,15 @@ class OpcUaXmlParser {
595595
def String getCppMethodArgumentsDef(SeRoNetMETHOD method) {
596596
var result = ""
597597
for(argIn: method.inputArguments) {
598-
result = result + "const "+argIn.DataTypeString()+" &"+argIn.name
598+
result = result + "const "
599+
if(argIn.ValueRank == 1) {
600+
// one dimensional array
601+
result = result + "std::vector<"+argIn.DataTypeString()+">"
602+
} else {
603+
// we assume it is a scalar type
604+
result = result + argIn.DataTypeString()
605+
}
606+
result = result + " &"+argIn.name
599607
if(argIn != method.inputArguments.last) {
600608
result = result + ", "
601609
}
@@ -608,7 +616,14 @@ class OpcUaXmlParser {
608616
} else {
609617
result = result + ", "
610618
}
611-
result = result + argOut.DataTypeString()+" &"+argOut.name
619+
if(argOut.ValueRank == 1) {
620+
// one dimensional array
621+
result = result + "std::vector<"+argOut.DataTypeString()+">"
622+
} else {
623+
// we assume it is a scalar type
624+
result = result + argOut.DataTypeString()
625+
}
626+
result = result + " &"+argOut.name
612627
}
613628
return result
614629
}
@@ -633,4 +648,4 @@ class OpcUaXmlParser {
633648
}
634649
return result
635650
}
636-
}
651+
}

org.xtend.generators/org.xtend.smartsoft.generator/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: SmartSoftGenerator
44
Bundle-SymbolicName: org.xtend.smartsoft.generator;singleton:=true
5-
Bundle-Version: 3.11.0.qualifier
5+
Bundle-Version: 3.12.0.qualifier
66
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
77
Require-Bundle: org.eclipse.core.runtime,
88
org.eclipse.xtext.xbase.lib,

0 commit comments

Comments
 (0)