Procházet zdrojové kódy

Deleted old files which become obsolete by the interface templates

jos.itemis@gmail.com před 14 roky
rodič
revize
5729026d37

+ 0 - 34
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomRepositoryC.xpt

@@ -1,34 +0,0 @@
-«REM»
-
-Templates for the main statechart c file.
-
-@auther joern seger
-
-«ENDREM»
-
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
-
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
-
-«DEFINE file FOR ExecutionFlow»
-
-«FILE DRName()+'.c'»
-#ifndef «DRNAME()»_H_
-#define «DRNAME()»_H_
-
-#include "«DRName()».h"
-
-void «DRName().toFirstLower()»_init(«DRName()»* handle)
-{}
-
-void «DRName().toFirstLower()»_exit(«DRName()»* handle)
-{}
-
-
-#endif /* «DRNAME()»_H_ */
-«ENDFILE»
-
-«ENDDEFINE»

+ 0 - 67
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomRepositoryH.xpt

@@ -1,67 +0,0 @@
-«REM»
-
-Templates for the main statechart cpp file.
-
-@auther joern seger
-
-«ENDREM»
-
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
-
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
-
-
-«DEFINE interfaces FOR ExecutionFlow»
-«EXPAND scope FOREACH this.scopes»
-«ENDDEFINE»
-
-«DEFINE scope FOR Scope -»
-«ENDDEFINE»
-
-«DEFINE scope FOR InterfaceScope»
-«EXPAND declaration FOREACH this.declarations»
-«ENDDEFINE»
-
-«DEFINE scope FOR InternalScope»
-«EXPAND declaration FOREACH this.declarations»
-«ENDDEFINE»
-
-«DEFINE declaration FOR Declaration -»
-	// unknown declaration «name»
-«ENDDEFINE»
-
-«DEFINE declaration FOR EventDefinition -»
-«ENDDEFINE»
-
-«DEFINE declaration FOR VariableDefinition -»
-	«type» «name»; 
-«ENDDEFINE»
-
-
-«DEFINE file FOR ExecutionFlow»
-
-«FILE DRName()+'.h'»
-#ifndef «DRNAME()»_H_
-#define «DRNAME()»_H_
-
-#include "definition.h"
-
-typedef struct {
-
-«FOREACH this.declaredVariables() AS variable»
-    «((VariableDefinition)variable).type» «((VariableDefinition)variable).name»;
-«ENDFOREACH»
-
-
-} «DRName()»;
-
-extern void «DRName().toFirstLower()»_init(«DRName()»* handle);
-extern void «DRName().toFirstLower()»_exit(«DRName()»* handle);
-
-#endif /* «DRNAME()»_H_ */
-«ENDFILE»
-
-«ENDDEFINE»

+ 0 - 3
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Main.xpt

@@ -50,9 +50,6 @@ Contais the root templates that call the different file templates.
 
 	«EXPAND CMakeLists::file FOR this»
 	
-	«REM» Test Code
-	«EXPAND TestMain::file FOR this»
-	 «ENDREM»
 	«EXPAND DummyTimer::file FOR this»
 
 «ENDDEFINE»

+ 0 - 140
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/TestMain.xpt

@@ -1,140 +0,0 @@
-«REM»
-
-Templates for the main statechart cpp file.
-
-@auther joern seger
-
-«ENDREM»
-
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
-
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
-
-
-«DEFINE file FOR ExecutionFlow»
-
-«FILE 'main.c'»
-#include <stdio.h>
-#include <assert.h>
-#include <string.h>
-#include "Timer.h"
-#include "DummyTimer.h"
-#include "«StName()».h"
-#include "«EvName()».h"
-
-#define MAXEVENTSPERTYPE 4
-int main()
-{
-	const char* stateName[6] = {"State1", "State2", "State3", "State4", "State5", "State6"};
-
-	«StName()» machine;
-	Timer dummyTimer;
-	EventPool eventPool;
-    _Event* ev;
-    Event2* e2;
-
-	/* set up dummy Timer */
-	dummyTimer_init(&dummyTimer);
-
-	/* Set up Event Pool */
-	eventPool_init_heap(&eventPool, event_last, MAXEVENTSPERTYPE);
-
-	/* initialize state machine */
-	«stName()»_init(&machine, &dummyTimer, &eventPool);
-
-	/* check the state */
-	printf("%s\n", stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)]);
-	assert( strcmp(stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)], "State1") == 0);
-
-	/* create one event */
-	
-	ev = eventPool_createEvent(&eventPool, ev_event1);
-
-	// The following would work as well
-	// This can be used, if you want to set some information within Event1
-	// e1 = ((Event1*)(eventPool_createEvent(&eventPool, ev_event1)));
-
-	/* set the event */
-	«stName()»_setEvent(&machine, ev);
-
-	/* run the cycle */
-	«stName()»_runCycle(&machine);
-
-	/* check the state */
-	printf("%s\n", stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)]);
-	assert( strcmp(stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)], "State3") == 0);
-
-
-	e2 = ((Event2*)(eventPool_createEvent(&eventPool, ev_event2)));
-	«stName()»_setEvent(&machine, e2);
-
-	«stName()»_runCycle(&machine);
-
-	printf("%s\n", stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)]);
-	assert( strcmp(stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)], "State1") == 0);
-
-	/* does event queuing work? */
-	ev = eventPool_createEvent(&eventPool, ev_event1);
-	«stName()»_setEvent(&machine, ev);
-
-	ev = eventPool_createEvent(&eventPool, ev_event3);
-	«stName()»_setEvent(&machine, ev);
-
-	«stName()»_runCycle(&machine);
-
-	printf("%s\n", stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)]);
-	assert( strcmp(stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)], "State3") == 0);
-
-	assert( «stName()»_eventWaiting(&machine) == bool_false );
-
-
-	ev = eventPool_createEvent(&eventPool, ev_event3);
-	«stName()»_setEvent(&machine, ev);
-
-	assert( «stName()»_eventWaiting(&machine) == bool_true );
-
-	«stName()»_runCycle(&machine);
-
-	printf("%s\n", stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)]);
-	assert( strcmp(stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)], "State4") == 0);
-
-
-	ev = eventPool_createEvent(&eventPool, ev_event4);
-	«stName()»_setEvent(&machine, ev);
-
-	«stName()»_runCycle(&machine);
-
-	printf("%s\n", stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)]);
-	assert( strcmp(stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)], "State3") == 0);
-
-
-	ev = eventPool_createEvent(&eventPool, ev_event3);
-	«stName()»_setEvent(&machine, ev);
-
-	«stName()»_runCycle(&machine);
-
-	printf("%s\n", stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)]);
-	assert( strcmp(stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)], "State4") == 0);
-
-
-	ev = eventPool_createEvent(&eventPool, ev_event5);
-	«stName()»_setEvent(&machine, ev);
-
-	«stName()»_runCycle(&machine);
-
-	printf("%s\n", stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)]);
-	assert( strcmp(stateName[statemachineBase_getState((StatemachineBase*)&machine, 0)], "State1") == 0);
-
-	«stName()»_exit(&machine);
-	timer_exit(&dummyTimer);
-	eventPool_exit(&eventPool);
-
-	return(0);
-}
-
-«ENDFILE»
-
-«ENDDEFINE»