summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjung2012-04-05 08:41:59 (EDT)
committertjung2012-04-05 08:41:59 (EDT)
commitc4eb9a4e52a13544539eaaaa3dac78f81d71fc94 (patch)
tree9c419df484e1dfb276ca3cd05dfa70add9b6882c
parentb55879c5b38893b71cad4ada9daf5f67f16697ed (diff)
downloadorg.eclipse.etrice-c4eb9a4e52a13544539eaaaa3dac78f81d71fc94.zip
org.eclipse.etrice-c4eb9a4e52a13544539eaaaa3dac78f81d71fc94.tar.gz
org.eclipse.etrice-c4eb9a4e52a13544539eaaaa3dac78f81d71fc94.tar.bz2
[generator.generic.ProcedureHelpers.xtend] attribut initialization changed according reference handling
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend8
-rw-r--r--runtime/org.eclipse.etrice.modellib/models/TimingService.room8
2 files changed, 12 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend
index c359bed..dcae389 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/ProcedureHelpers.xtend
@@ -102,12 +102,16 @@ class ProcedureHelpers {
«ENDIF»
«ELSEIF a.refType.type instanceof ComplexType || a.size>1 || !useClassDefaultsOnly»
«IF a.size==0»
- «a.name» = «a.refType.type.defaultValue»;
+ «IF a.refType.isRef»
+ «a.name» = «languageExt.nullPointer()»;
+ «ELSE»
+ «a.name» = «a.refType.type.defaultValue»;
+ «ENDIF»
«ELSE»
«a.name» = new «a.refType.type.typeName»[«a.size»];
«IF !useClassDefaultsOnly»
for (int i=0;i<«a.size»;i++){
- «a.name»[i] = «a.refType.type.defaultValue»;
+ «a.name»[i] = «IF a.refType.isRef»«languageExt.nullPointer()»«ELSE»«a.refType.type.defaultValue»«ENDIF»;
}
«ENDIF»
«ENDIF»
diff --git a/runtime/org.eclipse.etrice.modellib/models/TimingService.room b/runtime/org.eclipse.etrice.modellib/models/TimingService.room
index 9056ef3..c1bbe62 100644
--- a/runtime/org.eclipse.etrice.modellib/models/TimingService.room
+++ b/runtime/org.eclipse.etrice.modellib/models/TimingService.room
@@ -165,8 +165,10 @@ RoomModel room.basic.service.timing {
if (active) {
active = false;
+ TimerData td = new TimerData();
+ td.setId(currentId);
getPeerMsgReceiver().receive(
- new EventWithDataMessage(getPeerAddress(), IN_Kill, currentId));
+ new EventWithDataMessage(getPeerAddress(), IN_Kill, td));
}"
}
Operation Start(time_ms: int32) sends internalStart {
@@ -267,8 +269,10 @@ RoomModel room.basic.service.timing {
if (active) {
active = false;
+ TimerData td = new TimerData();
+ td.setId(currentId);
getPeerMsgReceiver().receive(
- new EventWithDataMessage(getPeerAddress(), IN_Kill, currentId));
+ new EventWithDataMessage(getPeerAddress(), IN_Kill, td));
}"
}
Operation Start(time_ms: int32) sends internalStart {