diff options
author | Henrik Rentz-Reichert | 2012-05-22 16:00:56 +0000 |
---|---|---|
committer | Henrik Rentz-Reichert | 2012-05-22 16:00:56 +0000 |
commit | 51ef62bc6f1d1d61e4ed2af2e14d81edcbf3274d (patch) | |
tree | c4214ad0b634acfb18d910517be4fc16cb730490 | |
parent | 52118711f988e8d2016c6e5e2b1d1f529e8c1e03 (diff) | |
download | org.eclipse.etrice-51ef62bc6f1d1d61e4ed2af2e14d81edcbf3274d.tar.gz org.eclipse.etrice-51ef62bc6f1d1d61e4ed2af2e14d81edcbf3274d.tar.xz org.eclipse.etrice-51ef62bc6f1d1d61e4ed2af2e14d81edcbf3274d.zip |
[generator.c] bug fix (state machines have not been generated)
2 files changed, 20 insertions, 14 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend index 7dec82656..b86a8baa9 100644 --- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend +++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend @@ -141,7 +141,7 @@ class ActorClassGen extends GenericActorClassGenerator { } «ac.name»_const;
«ENDIF»
- «IF xpac.stateMachine.empty»
+ «IF !xpac.stateMachine.empty»
«stateMachineGen.genHeaderConstants(xpac, ac)»
«ENDIF»
@@ -167,7 +167,7 @@ class ActorClassGen extends GenericActorClassGenerator { «ENDIF»
«ENDFOR»
- «IF xpac.stateMachine.empty»
+ «IF !xpac.stateMachine.empty»
«stateMachineGen.genDataMembers(xpac, ac)»
«ENDIF»
@@ -220,13 +220,13 @@ class ActorClassGen extends GenericActorClassGenerator { /* interface item IDs */
«genInterfaceItemConstants(xpac, ac)»
- «IF xpac.stateMachine.empty»
+ «IF !xpac.stateMachine.empty»
«stateMachineGen.genStateMachine(xpac, ac)»
«ENDIF»
void «ac.name»_init(«ac.name»* self){
ET_MSC_LOGGER_SYNC_ENTRY("«ac.name»", "init")
- «IF xpac.stateMachine.empty»
+ «IF !xpac.stateMachine.empty»
«stateMachineGen.genInitialization(xpac, ac)»
«ENDIF»
ET_MSC_LOGGER_SYNC_EXIT
@@ -235,7 +235,7 @@ class ActorClassGen extends GenericActorClassGenerator { void «ac.name»_receiveMessage(void* self, void* ifitem, const etMessage* msg){
ET_MSC_LOGGER_SYNC_ENTRY("«ac.name»", "_receiveMessage")
- «IF xpac.stateMachine.empty»
+ «IF !xpac.stateMachine.empty»
receiveEvent(self«IF handleEvents», (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage)))«ENDIF»);
«ENDIF»
@@ -246,7 +246,7 @@ class ActorClassGen extends GenericActorClassGenerator { «IF dataDriven || async»
void «ac.name»_execute(«ac.name»* self) {
ET_MSC_LOGGER_SYNC_ENTRY("«ac.name»", "_execute")
- «IF xpac.stateMachine.empty»
+ «IF !xpac.stateMachine.empty»
receiveEvent(self«IF handleEvents», NULL, 0, NULL«ENDIF»);
«ENDIF»
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java index 5da01fff6..44cdfb5ad 100644 --- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java +++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java @@ -408,7 +408,8 @@ public class ActorClassGen extends GenericActorClassGenerator { {
StateGraph _stateMachine = xpac.getStateMachine();
boolean _isEmpty_4 = RoomHelpers.isEmpty(_stateMachine);
- if (_isEmpty_4) {
+ boolean _operator_not = BooleanExtensions.operator_not(_isEmpty_4);
+ if (_operator_not) {
_builder.newLine();
StringConcatenation _genHeaderConstants = this.stateMachineGen.genHeaderConstants(xpac, ac);
_builder.append(_genHeaderConstants, "");
@@ -448,8 +449,8 @@ public class ActorClassGen extends GenericActorClassGenerator { boolean _isEmpty_8 = _allServiceImplementations_2.isEmpty();
_operator_and_3 = BooleanExtensions.operator_and(_operator_and_4, _isEmpty_8);
}
- boolean _operator_not = BooleanExtensions.operator_not(_operator_and_3);
- if (_operator_not) {
+ boolean _operator_not_1 = BooleanExtensions.operator_not(_operator_and_3);
+ if (_operator_not_1) {
_builder.append("\t");
_builder.append("const ");
String _name_14 = ac.getName();
@@ -511,7 +512,8 @@ public class ActorClassGen extends GenericActorClassGenerator { {
StateGraph _stateMachine_1 = xpac.getStateMachine();
boolean _isEmpty_9 = RoomHelpers.isEmpty(_stateMachine_1);
- if (_isEmpty_9) {
+ boolean _operator_not_2 = BooleanExtensions.operator_not(_isEmpty_9);
+ if (_operator_not_2) {
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
@@ -659,7 +661,8 @@ public class ActorClassGen extends GenericActorClassGenerator { {
StateGraph _stateMachine = xpac.getStateMachine();
boolean _isEmpty = RoomHelpers.isEmpty(_stateMachine);
- if (_isEmpty) {
+ boolean _operator_not = BooleanExtensions.operator_not(_isEmpty);
+ if (_operator_not) {
StringConcatenation _genStateMachine = this.stateMachineGen.genStateMachine(xpac, ac);
_builder.append(_genStateMachine, "");
_builder.newLineIfNotEmpty();
@@ -683,7 +686,8 @@ public class ActorClassGen extends GenericActorClassGenerator { {
StateGraph _stateMachine_1 = xpac.getStateMachine();
boolean _isEmpty_1 = RoomHelpers.isEmpty(_stateMachine_1);
- if (_isEmpty_1) {
+ boolean _operator_not_1 = BooleanExtensions.operator_not(_isEmpty_1);
+ if (_operator_not_1) {
_builder.append("\t");
StringConcatenation _genInitialization = this.stateMachineGen.genInitialization(xpac, ac);
_builder.append(_genInitialization, " ");
@@ -711,7 +715,8 @@ public class ActorClassGen extends GenericActorClassGenerator { {
StateGraph _stateMachine_2 = xpac.getStateMachine();
boolean _isEmpty_2 = RoomHelpers.isEmpty(_stateMachine_2);
- if (_isEmpty_2) {
+ boolean _operator_not_2 = BooleanExtensions.operator_not(_isEmpty_2);
+ if (_operator_not_2) {
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
@@ -758,7 +763,8 @@ public class ActorClassGen extends GenericActorClassGenerator { {
StateGraph _stateMachine_3 = xpac.getStateMachine();
boolean _isEmpty_3 = RoomHelpers.isEmpty(_stateMachine_3);
- if (_isEmpty_3) {
+ boolean _operator_not_3 = BooleanExtensions.operator_not(_isEmpty_3);
+ if (_operator_not_3) {
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
|