button

Dependencies:   BMI160 SDFileSystem USBDevice max32630fthr sd-driver

Fork of MPSMAX by Faizan Ahmad

Files at this revision

API Documentation at this revision

Comitter:
FaizanAhmad
Date:
Tue May 08 13:45:42 2018 +0000
Parent:
1:6b969a803e1b
Commit message:
\button

Changed in this revision

src/Default.c Show annotated file Show diff for this revision Revisions of this file
src/Default.h Show annotated file Show diff for this revision Revisions of this file
src/DefaultRequired.h Show annotated file Show diff for this revision Revisions of this file
src/Functions.cpp Show annotated file Show diff for this revision Revisions of this file
src/sc_types.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Default.c	Tue May 08 13:45:42 2018 +0000
@@ -0,0 +1,1107 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "Default.h"
+#include "DefaultRequired.h"
+/*! \file Implementation of the state machine 'default'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean check_main_region_Functions_tr0_tr0(const Default* handle);
+static sc_boolean check_main_region_Functions_tr1_tr1(const Default* handle);
+static sc_boolean check_main_region_Functions_tr2_tr2(const Default* handle);
+static sc_boolean check_main_region_Functions_tr3_tr3(const Default* handle);
+static sc_boolean check_main_region_Functions_tr4_tr4(const Default* handle);
+static sc_boolean check_main_region_Menu_tr0_tr0(const Default* handle);
+static sc_boolean check_main_region_Menu_tr1_tr1(const Default* handle);
+static sc_boolean check_main_region_Menu_tr2_tr2(const Default* handle);
+static sc_boolean check_main_region_Menu_tr3_tr3(const Default* handle);
+static sc_boolean check_main_region_Ready_tr0_tr0(const Default* handle);
+static sc_boolean check_main_region_Function_Selected_tr0_tr0(const Default* handle);
+static sc_boolean check_main_region_Function_Selected_tr1_tr1(const Default* handle);
+static sc_boolean check_r1_Function_Ready_tr0_tr0(const Default* handle);
+static sc_boolean check_r1_Function_Active_tr0_tr0(const Default* handle);
+static sc_boolean check_r1_Function_Active_tr1_tr1(const Default* handle);
+static sc_boolean check_r1_Alarm_tr0_tr0(const Default* handle);
+static sc_boolean check_r1_Alarm_tr1_tr1(const Default* handle);
+static sc_boolean check_r1_Move_Down_tr0_tr0(const Default* handle);
+static sc_boolean check_r1_Move_Down_tr1_tr1(const Default* handle);
+static sc_boolean check_r1_Move_Up_tr0_tr0(const Default* handle);
+static sc_boolean check_r1_Move_Up_tr1_tr1(const Default* handle);
+static void effect_main_region_Functions_tr0(Default* handle);
+static void effect_main_region_Functions_tr1(Default* handle);
+static void effect_main_region_Functions_tr2(Default* handle);
+static void effect_main_region_Functions_tr3(Default* handle);
+static void effect_main_region_Functions_tr4(Default* handle);
+static void effect_main_region_Menu_tr0(Default* handle);
+static void effect_main_region_Menu_tr1(Default* handle);
+static void effect_main_region_Menu_tr2(Default* handle);
+static void effect_main_region_Menu_tr3(Default* handle);
+static void effect_main_region_Ready_tr0(Default* handle);
+static void effect_main_region_Function_Selected_tr0(Default* handle);
+static void effect_main_region_Function_Selected_tr1(Default* handle);
+static void effect_r1_Function_Ready_tr0(Default* handle);
+static void effect_r1_Function_Active_tr0(Default* handle);
+static void effect_r1_Function_Active_tr1(Default* handle);
+static void effect_r1_Alarm_tr0(Default* handle);
+static void effect_r1_Alarm_tr1(Default* handle);
+static void effect_r1_Move_Down_tr0(Default* handle);
+static void effect_r1_Move_Down_tr1(Default* handle);
+static void effect_r1_Move_Up_tr0(Default* handle);
+static void effect_r1_Move_Up_tr1(Default* handle);
+static void enact_main_region_Functions(Default* handle);
+static void enact_main_region_Menu(Default* handle);
+static void enact_main_region_Ready(Default* handle);
+static void enact_main_region_Function_Selected(Default* handle);
+static void enact_r1_Function_Ready(Default* handle);
+static void enact_r1_Function_Active(Default* handle);
+static void enact_r1_Alarm(Default* handle);
+static void enact_r1_Move_Down(Default* handle);
+static void enact_r1_Move_Up(Default* handle);
+static void exact_r1_Move_Down(Default* handle);
+static void exact_r1_Move_Up(Default* handle);
+static void enseq_main_region_Functions_default(Default* handle);
+static void enseq_main_region_Menu_default(Default* handle);
+static void enseq_main_region_Ready_default(Default* handle);
+static void enseq_main_region_Function_Selected_default(Default* handle);
+static void enseq_r1_Function_Ready_default(Default* handle);
+static void enseq_r1_Function_Active_default(Default* handle);
+static void enseq_r1_Alarm_default(Default* handle);
+static void enseq_r1_Move_Down_default(Default* handle);
+static void enseq_r1_Move_Up_default(Default* handle);
+static void enseq_main_region_default(Default* handle);
+static void enseq_r1_default(Default* handle);
+static void exseq_main_region_Functions(Default* handle);
+static void exseq_main_region_Menu(Default* handle);
+static void exseq_main_region_Ready(Default* handle);
+static void exseq_main_region_Function_Selected(Default* handle);
+static void exseq_r1_Function_Ready(Default* handle);
+static void exseq_r1_Function_Active(Default* handle);
+static void exseq_r1_Alarm(Default* handle);
+static void exseq_r1_Move_Down(Default* handle);
+static void exseq_r1_Move_Up(Default* handle);
+static void exseq_main_region(Default* handle);
+static void exseq_r1(Default* handle);
+static void react_main_region_Functions(Default* handle);
+static void react_main_region_Menu(Default* handle);
+static void react_main_region_Ready(Default* handle);
+static void react_main_region_Function_Selected(Default* handle);
+static void react_r1_Function_Ready(Default* handle);
+static void react_r1_Function_Active(Default* handle);
+static void react_r1_Alarm(Default* handle);
+static void react_r1_Move_Down(Default* handle);
+static void react_r1_Move_Up(Default* handle);
+static void react_main_region__entry_Default(Default* handle);
+static void react_r1__entry_Default(Default* handle);
+static void clearInEvents(Default* handle);
+static void clearOutEvents(Default* handle);
+
+
+void default_init(Default* handle)
+{
+		sc_integer i;
+	
+		for (i = 0; i < DEFAULT_MAX_ORTHOGONAL_STATES; ++i)
+		{
+			handle->stateConfVector[i] = Default_last_state;
+		}
+		
+		
+		handle->stateConfVectorPosition = 0;
+	
+		clearInEvents(handle);
+		clearOutEvents(handle);
+	
+		/* Default init sequence for statechart default */
+		handle->iface.select1 = 0;
+		handle->iface.select2 = 0;
+		handle->ifaceFunc.t = 0;
+}
+
+void default_enter(Default* handle)
+{
+	/* Default enter sequence for statechart default */
+	enseq_main_region_default(handle);
+	enseq_r1_default(handle);
+}
+
+void default_exit(Default* handle)
+{
+	/* Default exit sequence for statechart default */
+	exseq_main_region(handle);
+	exseq_r1(handle);
+}
+
+sc_boolean default_isActive(const Default* handle)
+{
+	sc_boolean result = bool_false;
+	int i;
+	
+	for(i = 0; i < DEFAULT_MAX_ORTHOGONAL_STATES; i++)
+	{
+		result = result || handle->stateConfVector[i] != Default_last_state;
+	}
+	
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean default_isFinal(const Default* handle)
+{
+   return bool_false;
+}
+
+static void clearInEvents(Default* handle)
+{
+	handle->iface.mode_raised = bool_false;
+	handle->iface.down_raised = bool_false;
+	handle->iface.up_raised = bool_false;
+	handle->iface.back_raised = bool_false;
+	handle->iface.home_raised = bool_false;
+	handle->ifaceFunc.Selected_raised = bool_false;
+	handle->ifaceFunc.Deselect_raised = bool_false;
+	handle->ifaceFunc.Alarmset_raised = bool_false;
+	handle->ifaceFunc.MoveDown_raised = bool_false;
+	handle->ifaceFunc.MoveUp_raised = bool_false;
+	handle->timeEvents.default_r1_Move_Down_tev0_raised = bool_false;
+	handle->timeEvents.default_r1_Move_Up_tev0_raised = bool_false;
+}
+
+static void clearOutEvents(Default* handle)
+{
+}
+
+void default_runCycle(Default* handle)
+{
+	
+	clearOutEvents(handle);
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < DEFAULT_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case Default_main_region_Functions:
+		{
+			react_main_region_Functions(handle);
+			break;
+		}
+		case Default_main_region_Menu:
+		{
+			react_main_region_Menu(handle);
+			break;
+		}
+		case Default_main_region_Ready:
+		{
+			react_main_region_Ready(handle);
+			break;
+		}
+		case Default_main_region_Function_Selected:
+		{
+			react_main_region_Function_Selected(handle);
+			break;
+		}
+		case Default_r1_Function_Ready:
+		{
+			react_r1_Function_Ready(handle);
+			break;
+		}
+		case Default_r1_Function_Active:
+		{
+			react_r1_Function_Active(handle);
+			break;
+		}
+		case Default_r1_Alarm:
+		{
+			react_r1_Alarm(handle);
+			break;
+		}
+		case Default_r1_Move_Down:
+		{
+			react_r1_Move_Down(handle);
+			break;
+		}
+		case Default_r1_Move_Up:
+		{
+			react_r1_Move_Up(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	clearInEvents(handle);
+}
+
+void default_raiseTimeEvent(const Default* handle, sc_eventid evid)
+{
+	if ( ((sc_intptr_t)evid) >= ((sc_intptr_t)&(handle->timeEvents))
+		&&  ((sc_intptr_t)evid) < ((sc_intptr_t)&(handle->timeEvents)) + sizeof(DefaultTimeEvents))
+		{
+		*(sc_boolean*)evid = bool_true;
+	}		
+}
+
+sc_boolean default_isStateActive(const Default* handle, DefaultStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case Default_main_region_Functions :
+			result = (sc_boolean) (handle->stateConfVector[SCVI_DEFAULT_MAIN_REGION_FUNCTIONS] == Default_main_region_Functions
+			);
+			break;
+		case Default_main_region_Menu :
+			result = (sc_boolean) (handle->stateConfVector[SCVI_DEFAULT_MAIN_REGION_MENU] == Default_main_region_Menu
+			);
+			break;
+		case Default_main_region_Ready :
+			result = (sc_boolean) (handle->stateConfVector[SCVI_DEFAULT_MAIN_REGION_READY] == Default_main_region_Ready
+			);
+			break;
+		case Default_main_region_Function_Selected :
+			result = (sc_boolean) (handle->stateConfVector[SCVI_DEFAULT_MAIN_REGION_FUNCTION_SELECTED] == Default_main_region_Function_Selected
+			);
+			break;
+		case Default_r1_Function_Ready :
+			result = (sc_boolean) (handle->stateConfVector[SCVI_DEFAULT_R1_FUNCTION_READY] == Default_r1_Function_Ready
+			);
+			break;
+		case Default_r1_Function_Active :
+			result = (sc_boolean) (handle->stateConfVector[SCVI_DEFAULT_R1_FUNCTION_ACTIVE] == Default_r1_Function_Active
+			);
+			break;
+		case Default_r1_Alarm :
+			result = (sc_boolean) (handle->stateConfVector[SCVI_DEFAULT_R1_ALARM] == Default_r1_Alarm
+			);
+			break;
+		case Default_r1_Move_Down :
+			result = (sc_boolean) (handle->stateConfVector[SCVI_DEFAULT_R1_MOVE_DOWN] == Default_r1_Move_Down
+			);
+			break;
+		case Default_r1_Move_Up :
+			result = (sc_boolean) (handle->stateConfVector[SCVI_DEFAULT_R1_MOVE_UP] == Default_r1_Move_Up
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void defaultIface_raise_mode(Default* handle)
+{
+	handle->iface.mode_raised = bool_true;
+}
+void defaultIface_raise_down(Default* handle)
+{
+	handle->iface.down_raised = bool_true;
+}
+void defaultIface_raise_up(Default* handle)
+{
+	handle->iface.up_raised = bool_true;
+}
+void defaultIface_raise_back(Default* handle)
+{
+	handle->iface.back_raised = bool_true;
+}
+void defaultIface_raise_home(Default* handle)
+{
+	handle->iface.home_raised = bool_true;
+}
+
+
+sc_integer defaultIface_get_select1(const Default* handle)
+{
+	return handle->iface.select1;
+}
+void defaultIface_set_select1(Default* handle, sc_integer value)
+{
+	handle->iface.select1 = value;
+}
+sc_integer defaultIface_get_select2(const Default* handle)
+{
+	return handle->iface.select2;
+}
+void defaultIface_set_select2(Default* handle, sc_integer value)
+{
+	handle->iface.select2 = value;
+}
+void defaultIfaceFunc_raise_selected(Default* handle)
+{
+	handle->ifaceFunc.Selected_raised = bool_true;
+}
+void defaultIfaceFunc_raise_deselect(Default* handle)
+{
+	handle->ifaceFunc.Deselect_raised = bool_true;
+}
+void defaultIfaceFunc_raise_alarmset(Default* handle)
+{
+	handle->ifaceFunc.Alarmset_raised = bool_true;
+}
+void defaultIfaceFunc_raise_moveDown(Default* handle)
+{
+	handle->ifaceFunc.MoveDown_raised = bool_true;
+}
+void defaultIfaceFunc_raise_moveUp(Default* handle)
+{
+	handle->ifaceFunc.MoveUp_raised = bool_true;
+}
+
+
+sc_integer defaultIfaceFunc_get_t(const Default* handle)
+{
+	return handle->ifaceFunc.t;
+}
+void defaultIfaceFunc_set_t(Default* handle, sc_integer value)
+{
+	handle->ifaceFunc.t = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean check_main_region_Functions_tr0_tr0(const Default* handle)
+{
+	return handle->iface.back_raised;
+}
+
+static sc_boolean check_main_region_Functions_tr1_tr1(const Default* handle)
+{
+	return handle->iface.down_raised;
+}
+
+static sc_boolean check_main_region_Functions_tr2_tr2(const Default* handle)
+{
+	return ((handle->iface.up_raised) && (handle->iface.select2 > 1)) ? bool_true : bool_false;
+}
+
+static sc_boolean check_main_region_Functions_tr3_tr3(const Default* handle)
+{
+	return handle->iface.home_raised;
+}
+
+static sc_boolean check_main_region_Functions_tr4_tr4(const Default* handle)
+{
+	return handle->iface.mode_raised;
+}
+
+static sc_boolean check_main_region_Menu_tr0_tr0(const Default* handle)
+{
+	return handle->iface.down_raised;
+}
+
+static sc_boolean check_main_region_Menu_tr1_tr1(const Default* handle)
+{
+	return ((handle->iface.up_raised) && (handle->iface.select1 > 1)) ? bool_true : bool_false;
+}
+
+static sc_boolean check_main_region_Menu_tr2_tr2(const Default* handle)
+{
+	return handle->iface.back_raised;
+}
+
+static sc_boolean check_main_region_Menu_tr3_tr3(const Default* handle)
+{
+	return handle->iface.mode_raised;
+}
+
+static sc_boolean check_main_region_Ready_tr0_tr0(const Default* handle)
+{
+	return handle->iface.mode_raised;
+}
+
+static sc_boolean check_main_region_Function_Selected_tr0_tr0(const Default* handle)
+{
+	return handle->iface.back_raised;
+}
+
+static sc_boolean check_main_region_Function_Selected_tr1_tr1(const Default* handle)
+{
+	return handle->iface.home_raised;
+}
+
+static sc_boolean check_r1_Function_Ready_tr0_tr0(const Default* handle)
+{
+	return handle->ifaceFunc.Selected_raised;
+}
+
+static sc_boolean check_r1_Function_Active_tr0_tr0(const Default* handle)
+{
+	return handle->ifaceFunc.Deselect_raised;
+}
+
+static sc_boolean check_r1_Function_Active_tr1_tr1(const Default* handle)
+{
+	return handle->ifaceFunc.Alarmset_raised;
+}
+
+static sc_boolean check_r1_Alarm_tr0_tr0(const Default* handle)
+{
+	return handle->ifaceFunc.MoveDown_raised;
+}
+
+static sc_boolean check_r1_Alarm_tr1_tr1(const Default* handle)
+{
+	return handle->ifaceFunc.MoveUp_raised;
+}
+
+static sc_boolean check_r1_Move_Down_tr0_tr0(const Default* handle)
+{
+	return (handle->ifaceFunc.t == 0) ? bool_true : bool_false;
+}
+
+static sc_boolean check_r1_Move_Down_tr1_tr1(const Default* handle)
+{
+	return ((handle->timeEvents.default_r1_Move_Down_tev0_raised) && (handle->ifaceFunc.t > 0)) ? bool_true : bool_false;
+}
+
+static sc_boolean check_r1_Move_Up_tr0_tr0(const Default* handle)
+{
+	return (handle->ifaceFunc.t == 0) ? bool_true : bool_false;
+}
+
+static sc_boolean check_r1_Move_Up_tr1_tr1(const Default* handle)
+{
+	return ((handle->timeEvents.default_r1_Move_Up_tev0_raised) && (handle->ifaceFunc.t > 0)) ? bool_true : bool_false;
+}
+
+static void effect_main_region_Functions_tr0(Default* handle)
+{
+	exseq_main_region_Functions(handle);
+	enseq_main_region_Menu_default(handle);
+}
+
+static void effect_main_region_Functions_tr1(Default* handle)
+{
+	exseq_main_region_Functions(handle);
+	handle->iface.select2 += 1;
+	enseq_main_region_Functions_default(handle);
+}
+
+static void effect_main_region_Functions_tr2(Default* handle)
+{
+	exseq_main_region_Functions(handle);
+	handle->iface.select2 -= 1;
+	enseq_main_region_Functions_default(handle);
+}
+
+static void effect_main_region_Functions_tr3(Default* handle)
+{
+	exseq_main_region_Functions(handle);
+	enseq_main_region_Ready_default(handle);
+}
+
+static void effect_main_region_Functions_tr4(Default* handle)
+{
+	exseq_main_region_Functions(handle);
+	defaultIface_function(handle, handle->iface.select2);
+	enseq_main_region_Function_Selected_default(handle);
+}
+
+static void effect_main_region_Menu_tr0(Default* handle)
+{
+	exseq_main_region_Menu(handle);
+	handle->iface.select1 += 1;
+	enseq_main_region_Menu_default(handle);
+}
+
+static void effect_main_region_Menu_tr1(Default* handle)
+{
+	exseq_main_region_Menu(handle);
+	handle->iface.select1 -= 1;
+	enseq_main_region_Menu_default(handle);
+}
+
+static void effect_main_region_Menu_tr2(Default* handle)
+{
+	exseq_main_region_Menu(handle);
+	enseq_main_region_Ready_default(handle);
+}
+
+static void effect_main_region_Menu_tr3(Default* handle)
+{
+	exseq_main_region_Menu(handle);
+	defaultIface_menu(handle, handle->iface.select1);
+	handle->iface.select2 = 1;
+	enseq_main_region_Functions_default(handle);
+}
+
+static void effect_main_region_Ready_tr0(Default* handle)
+{
+	exseq_main_region_Ready(handle);
+	handle->iface.select1 = 1;
+	enseq_main_region_Menu_default(handle);
+}
+
+static void effect_main_region_Function_Selected_tr0(Default* handle)
+{
+	exseq_main_region_Function_Selected(handle);
+	enseq_main_region_Functions_default(handle);
+}
+
+static void effect_main_region_Function_Selected_tr1(Default* handle)
+{
+	exseq_main_region_Function_Selected(handle);
+	enseq_main_region_Ready_default(handle);
+}
+
+static void effect_r1_Function_Ready_tr0(Default* handle)
+{
+	exseq_r1_Function_Ready(handle);
+	enseq_r1_Function_Active_default(handle);
+}
+
+static void effect_r1_Function_Active_tr0(Default* handle)
+{
+	exseq_r1_Function_Active(handle);
+	enseq_r1_Function_Ready_default(handle);
+}
+
+static void effect_r1_Function_Active_tr1(Default* handle)
+{
+	exseq_r1_Function_Active(handle);
+	enseq_r1_Alarm_default(handle);
+}
+
+static void effect_r1_Alarm_tr0(Default* handle)
+{
+	exseq_r1_Alarm(handle);
+	enseq_r1_Move_Down_default(handle);
+}
+
+static void effect_r1_Alarm_tr1(Default* handle)
+{
+	exseq_r1_Alarm(handle);
+	enseq_r1_Move_Up_default(handle);
+}
+
+static void effect_r1_Move_Down_tr0(Default* handle)
+{
+	exseq_r1_Move_Down(handle);
+	defaultIfaceFunc_return(handle);
+	enseq_r1_Function_Active_default(handle);
+}
+
+static void effect_r1_Move_Down_tr1(Default* handle)
+{
+	exseq_r1_Move_Down(handle);
+	defaultIfaceFunc_moveDownAct(handle);
+	handle->ifaceFunc.t -= 1;
+	enseq_r1_Move_Down_default(handle);
+}
+
+static void effect_r1_Move_Up_tr0(Default* handle)
+{
+	exseq_r1_Move_Up(handle);
+	defaultIfaceFunc_return(handle);
+	enseq_r1_Function_Active_default(handle);
+}
+
+static void effect_r1_Move_Up_tr1(Default* handle)
+{
+	exseq_r1_Move_Up(handle);
+	defaultIfaceFunc_moveUpAct(handle);
+	handle->ifaceFunc.t -= 1;
+	enseq_r1_Move_Up_default(handle);
+}
+
+/* Entry action for state 'Functions'. */
+static void enact_main_region_Functions(Default* handle)
+{
+	/* Entry action for state 'Functions'. */
+	defaultIface_function(handle, handle->iface.select2);
+}
+
+/* Entry action for state 'Menu'. */
+static void enact_main_region_Menu(Default* handle)
+{
+	/* Entry action for state 'Menu'. */
+	defaultIface_menu(handle, handle->iface.select1);
+}
+
+/* Entry action for state 'Ready'. */
+static void enact_main_region_Ready(Default* handle)
+{
+	/* Entry action for state 'Ready'. */
+	handle->iface.select1 = 0;
+	handle->iface.select2 = 0;
+}
+
+/* Entry action for state 'Function Selected'. */
+static void enact_main_region_Function_Selected(Default* handle)
+{
+	/* Entry action for state 'Function Selected'. */
+	defaultIface_execute(handle);
+}
+
+/* Entry action for state 'Function Ready'. */
+static void enact_r1_Function_Ready(Default* handle)
+{
+	/* Entry action for state 'Function Ready'. */
+	defaultIfaceFunc_ready(handle);
+}
+
+/* Entry action for state 'Function Active'. */
+static void enact_r1_Function_Active(Default* handle)
+{
+	/* Entry action for state 'Function Active'. */
+	defaultIfaceFunc_active(handle);
+}
+
+/* Entry action for state 'Alarm'. */
+static void enact_r1_Alarm(Default* handle)
+{
+	/* Entry action for state 'Alarm'. */
+	handle->ifaceFunc.t = 15;
+}
+
+/* Entry action for state 'Move Down'. */
+static void enact_r1_Move_Down(Default* handle)
+{
+	/* Entry action for state 'Move Down'. */
+	default_setTimer(handle, (sc_eventid) &(handle->timeEvents.default_r1_Move_Down_tev0_raised) , 1 * 1000, bool_true);
+	defaultIfaceFunc_moveDownAct(handle);
+}
+
+/* Entry action for state 'Move Up'. */
+static void enact_r1_Move_Up(Default* handle)
+{
+	/* Entry action for state 'Move Up'. */
+	default_setTimer(handle, (sc_eventid) &(handle->timeEvents.default_r1_Move_Up_tev0_raised) , 1 * 1000, bool_true);
+	defaultIfaceFunc_moveUpAct(handle);
+}
+
+/* Exit action for state 'Move Down'. */
+static void exact_r1_Move_Down(Default* handle)
+{
+	/* Exit action for state 'Move Down'. */
+	default_unsetTimer(handle, (sc_eventid) &(handle->timeEvents.default_r1_Move_Down_tev0_raised) );		
+}
+
+/* Exit action for state 'Move Up'. */
+static void exact_r1_Move_Up(Default* handle)
+{
+	/* Exit action for state 'Move Up'. */
+	default_unsetTimer(handle, (sc_eventid) &(handle->timeEvents.default_r1_Move_Up_tev0_raised) );		
+}
+
+/* 'default' enter sequence for state Functions */
+static void enseq_main_region_Functions_default(Default* handle)
+{
+	/* 'default' enter sequence for state Functions */
+	enact_main_region_Functions(handle);
+	handle->stateConfVector[0] = Default_main_region_Functions;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state Menu */
+static void enseq_main_region_Menu_default(Default* handle)
+{
+	/* 'default' enter sequence for state Menu */
+	enact_main_region_Menu(handle);
+	handle->stateConfVector[0] = Default_main_region_Menu;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state Ready */
+static void enseq_main_region_Ready_default(Default* handle)
+{
+	/* 'default' enter sequence for state Ready */
+	enact_main_region_Ready(handle);
+	handle->stateConfVector[0] = Default_main_region_Ready;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state Function Selected */
+static void enseq_main_region_Function_Selected_default(Default* handle)
+{
+	/* 'default' enter sequence for state Function Selected */
+	enact_main_region_Function_Selected(handle);
+	handle->stateConfVector[0] = Default_main_region_Function_Selected;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state Function Ready */
+static void enseq_r1_Function_Ready_default(Default* handle)
+{
+	/* 'default' enter sequence for state Function Ready */
+	enact_r1_Function_Ready(handle);
+	handle->stateConfVector[1] = Default_r1_Function_Ready;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* 'default' enter sequence for state Function Active */
+static void enseq_r1_Function_Active_default(Default* handle)
+{
+	/* 'default' enter sequence for state Function Active */
+	enact_r1_Function_Active(handle);
+	handle->stateConfVector[1] = Default_r1_Function_Active;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* 'default' enter sequence for state Alarm */
+static void enseq_r1_Alarm_default(Default* handle)
+{
+	/* 'default' enter sequence for state Alarm */
+	enact_r1_Alarm(handle);
+	handle->stateConfVector[1] = Default_r1_Alarm;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* 'default' enter sequence for state Move Down */
+static void enseq_r1_Move_Down_default(Default* handle)
+{
+	/* 'default' enter sequence for state Move Down */
+	enact_r1_Move_Down(handle);
+	handle->stateConfVector[1] = Default_r1_Move_Down;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* 'default' enter sequence for state Move Up */
+static void enseq_r1_Move_Up_default(Default* handle)
+{
+	/* 'default' enter sequence for state Move Up */
+	enact_r1_Move_Up(handle);
+	handle->stateConfVector[1] = Default_r1_Move_Up;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* 'default' enter sequence for region main region */
+static void enseq_main_region_default(Default* handle)
+{
+	/* 'default' enter sequence for region main region */
+	react_main_region__entry_Default(handle);
+}
+
+/* 'default' enter sequence for region r1 */
+static void enseq_r1_default(Default* handle)
+{
+	/* 'default' enter sequence for region r1 */
+	react_r1__entry_Default(handle);
+}
+
+/* Default exit sequence for state Functions */
+static void exseq_main_region_Functions(Default* handle)
+{
+	/* Default exit sequence for state Functions */
+	handle->stateConfVector[0] = Default_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state Menu */
+static void exseq_main_region_Menu(Default* handle)
+{
+	/* Default exit sequence for state Menu */
+	handle->stateConfVector[0] = Default_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state Ready */
+static void exseq_main_region_Ready(Default* handle)
+{
+	/* Default exit sequence for state Ready */
+	handle->stateConfVector[0] = Default_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state Function Selected */
+static void exseq_main_region_Function_Selected(Default* handle)
+{
+	/* Default exit sequence for state Function Selected */
+	handle->stateConfVector[0] = Default_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state Function Ready */
+static void exseq_r1_Function_Ready(Default* handle)
+{
+	/* Default exit sequence for state Function Ready */
+	handle->stateConfVector[1] = Default_last_state;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* Default exit sequence for state Function Active */
+static void exseq_r1_Function_Active(Default* handle)
+{
+	/* Default exit sequence for state Function Active */
+	handle->stateConfVector[1] = Default_last_state;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* Default exit sequence for state Alarm */
+static void exseq_r1_Alarm(Default* handle)
+{
+	/* Default exit sequence for state Alarm */
+	handle->stateConfVector[1] = Default_last_state;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* Default exit sequence for state Move Down */
+static void exseq_r1_Move_Down(Default* handle)
+{
+	/* Default exit sequence for state Move Down */
+	handle->stateConfVector[1] = Default_last_state;
+	handle->stateConfVectorPosition = 1;
+	exact_r1_Move_Down(handle);
+}
+
+/* Default exit sequence for state Move Up */
+static void exseq_r1_Move_Up(Default* handle)
+{
+	/* Default exit sequence for state Move Up */
+	handle->stateConfVector[1] = Default_last_state;
+	handle->stateConfVectorPosition = 1;
+	exact_r1_Move_Up(handle);
+}
+
+/* Default exit sequence for region main region */
+static void exseq_main_region(Default* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of default.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case Default_main_region_Functions :
+		{
+			exseq_main_region_Functions(handle);
+			break;
+		}
+		case Default_main_region_Menu :
+		{
+			exseq_main_region_Menu(handle);
+			break;
+		}
+		case Default_main_region_Ready :
+		{
+			exseq_main_region_Ready(handle);
+			break;
+		}
+		case Default_main_region_Function_Selected :
+		{
+			exseq_main_region_Function_Selected(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r1 */
+static void exseq_r1(Default* handle)
+{
+	/* Default exit sequence for region r1 */
+	/* Handle exit of all possible states (of default.r1) at position 1... */
+	switch(handle->stateConfVector[ 1 ])
+	{
+		case Default_r1_Function_Ready :
+		{
+			exseq_r1_Function_Ready(handle);
+			break;
+		}
+		case Default_r1_Function_Active :
+		{
+			exseq_r1_Function_Active(handle);
+			break;
+		}
+		case Default_r1_Alarm :
+		{
+			exseq_r1_Alarm(handle);
+			break;
+		}
+		case Default_r1_Move_Down :
+		{
+			exseq_r1_Move_Down(handle);
+			break;
+		}
+		case Default_r1_Move_Up :
+		{
+			exseq_r1_Move_Up(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state Functions. */
+static void react_main_region_Functions(Default* handle)
+{
+	/* The reactions of state Functions. */
+	if (check_main_region_Functions_tr0_tr0(handle) == bool_true)
+	{ 
+		effect_main_region_Functions_tr0(handle);
+	}  else
+	{
+		if (check_main_region_Functions_tr1_tr1(handle) == bool_true)
+		{ 
+			effect_main_region_Functions_tr1(handle);
+		}  else
+		{
+			if (check_main_region_Functions_tr2_tr2(handle) == bool_true)
+			{ 
+				effect_main_region_Functions_tr2(handle);
+			}  else
+			{
+				if (check_main_region_Functions_tr3_tr3(handle) == bool_true)
+				{ 
+					effect_main_region_Functions_tr3(handle);
+				}  else
+				{
+					if (check_main_region_Functions_tr4_tr4(handle) == bool_true)
+					{ 
+						effect_main_region_Functions_tr4(handle);
+					} 
+				}
+			}
+		}
+	}
+}
+
+/* The reactions of state Menu. */
+static void react_main_region_Menu(Default* handle)
+{
+	/* The reactions of state Menu. */
+	if (check_main_region_Menu_tr0_tr0(handle) == bool_true)
+	{ 
+		effect_main_region_Menu_tr0(handle);
+	}  else
+	{
+		if (check_main_region_Menu_tr1_tr1(handle) == bool_true)
+		{ 
+			effect_main_region_Menu_tr1(handle);
+		}  else
+		{
+			if (check_main_region_Menu_tr2_tr2(handle) == bool_true)
+			{ 
+				effect_main_region_Menu_tr2(handle);
+			}  else
+			{
+				if (check_main_region_Menu_tr3_tr3(handle) == bool_true)
+				{ 
+					effect_main_region_Menu_tr3(handle);
+				} 
+			}
+		}
+	}
+}
+
+/* The reactions of state Ready. */
+static void react_main_region_Ready(Default* handle)
+{
+	/* The reactions of state Ready. */
+	if (check_main_region_Ready_tr0_tr0(handle) == bool_true)
+	{ 
+		effect_main_region_Ready_tr0(handle);
+	} 
+}
+
+/* The reactions of state Function Selected. */
+static void react_main_region_Function_Selected(Default* handle)
+{
+	/* The reactions of state Function Selected. */
+	if (check_main_region_Function_Selected_tr0_tr0(handle) == bool_true)
+	{ 
+		effect_main_region_Function_Selected_tr0(handle);
+	}  else
+	{
+		if (check_main_region_Function_Selected_tr1_tr1(handle) == bool_true)
+		{ 
+			effect_main_region_Function_Selected_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state Function Ready. */
+static void react_r1_Function_Ready(Default* handle)
+{
+	/* The reactions of state Function Ready. */
+	if (check_r1_Function_Ready_tr0_tr0(handle) == bool_true)
+	{ 
+		effect_r1_Function_Ready_tr0(handle);
+	} 
+}
+
+/* The reactions of state Function Active. */
+static void react_r1_Function_Active(Default* handle)
+{
+	/* The reactions of state Function Active. */
+	if (check_r1_Function_Active_tr0_tr0(handle) == bool_true)
+	{ 
+		effect_r1_Function_Active_tr0(handle);
+	}  else
+	{
+		if (check_r1_Function_Active_tr1_tr1(handle) == bool_true)
+		{ 
+			effect_r1_Function_Active_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state Alarm. */
+static void react_r1_Alarm(Default* handle)
+{
+	/* The reactions of state Alarm. */
+	if (check_r1_Alarm_tr0_tr0(handle) == bool_true)
+	{ 
+		effect_r1_Alarm_tr0(handle);
+	}  else
+	{
+		if (check_r1_Alarm_tr1_tr1(handle) == bool_true)
+		{ 
+			effect_r1_Alarm_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state Move Down. */
+static void react_r1_Move_Down(Default* handle)
+{
+	/* The reactions of state Move Down. */
+	if (check_r1_Move_Down_tr0_tr0(handle) == bool_true)
+	{ 
+		effect_r1_Move_Down_tr0(handle);
+	}  else
+	{
+		if (check_r1_Move_Down_tr1_tr1(handle) == bool_true)
+		{ 
+			effect_r1_Move_Down_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state Move Up. */
+static void react_r1_Move_Up(Default* handle)
+{
+	/* The reactions of state Move Up. */
+	if (check_r1_Move_Up_tr0_tr0(handle) == bool_true)
+	{ 
+		effect_r1_Move_Up_tr0(handle);
+	}  else
+	{
+		if (check_r1_Move_Up_tr1_tr1(handle) == bool_true)
+		{ 
+			effect_r1_Move_Up_tr1(handle);
+		} 
+	}
+}
+
+/* Default react sequence for initial entry  */
+static void react_main_region__entry_Default(Default* handle)
+{
+	/* Default react sequence for initial entry  */
+	enseq_main_region_Ready_default(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void react_r1__entry_Default(Default* handle)
+{
+	/* Default react sequence for initial entry  */
+	enseq_r1_Function_Ready_default(handle);
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Default.h	Tue May 08 13:45:42 2018 +0000
@@ -0,0 +1,173 @@
+
+#ifndef DEFAULT_H_
+#define DEFAULT_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'default'.
+*/
+
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	Default_last_state,
+	Default_main_region_Functions,
+	Default_main_region_Menu,
+	Default_main_region_Ready,
+	Default_main_region_Function_Selected,
+	Default_r1_Function_Ready,
+	Default_r1_Function_Active,
+	Default_r1_Alarm,
+	Default_r1_Move_Down,
+	Default_r1_Move_Up
+} DefaultStates;
+
+/*! Type definition of the data structure for the DefaultIface interface scope. */
+typedef struct
+{
+	sc_boolean mode_raised;
+	sc_boolean down_raised;
+	sc_boolean up_raised;
+	sc_boolean back_raised;
+	sc_boolean home_raised;
+	sc_integer select1;
+	sc_integer select2;
+} DefaultIface;
+
+/*! Type definition of the data structure for the DefaultIfaceFunc interface scope. */
+typedef struct
+{
+	sc_boolean Selected_raised;
+	sc_boolean Deselect_raised;
+	sc_boolean Alarmset_raised;
+	sc_boolean MoveDown_raised;
+	sc_boolean MoveUp_raised;
+	sc_integer t;
+} DefaultIfaceFunc;
+
+/*! Type definition of the data structure for the DefaultTimeEvents interface scope. */
+typedef struct
+{
+	sc_boolean default_r1_Move_Down_tev0_raised;
+	sc_boolean default_r1_Move_Up_tev0_raised;
+} DefaultTimeEvents;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define DEFAULT_MAX_ORTHOGONAL_STATES 2
+
+/*! Define maximum number of time events that can be active at once */
+#define DEFAULT_MAX_PARALLEL_TIME_EVENTS 1
+
+/*! Define indices of states in the StateConfVector */
+#define SCVI_DEFAULT_MAIN_REGION_FUNCTIONS 0
+#define SCVI_DEFAULT_MAIN_REGION_MENU 0
+#define SCVI_DEFAULT_MAIN_REGION_READY 0
+#define SCVI_DEFAULT_MAIN_REGION_FUNCTION_SELECTED 0
+#define SCVI_DEFAULT_R1_FUNCTION_READY 1
+#define SCVI_DEFAULT_R1_FUNCTION_ACTIVE 1
+#define SCVI_DEFAULT_R1_ALARM 1
+#define SCVI_DEFAULT_R1_MOVE_DOWN 1
+#define SCVI_DEFAULT_R1_MOVE_UP 1
+
+/*! 
+ * Type definition of the data structure for the Default state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	DefaultStates stateConfVector[DEFAULT_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	DefaultIface iface;
+	DefaultIfaceFunc ifaceFunc;
+	DefaultTimeEvents timeEvents;
+} Default;
+
+
+/*! Initializes the Default state machine data structures. Must be called before first usage.*/
+extern void default_init(Default* handle);
+
+/*! Activates the state machine */
+extern void default_enter(Default* handle);
+
+/*! Deactivates the state machine */
+extern void default_exit(Default* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void default_runCycle(Default* handle);
+
+/*! Raises a time event. */
+extern void default_raiseTimeEvent(const Default* handle, sc_eventid evid);
+
+/*! Raises the in event 'mode' that is defined in the default interface scope. */ 
+extern void defaultIface_raise_mode(Default* handle);
+
+/*! Raises the in event 'down' that is defined in the default interface scope. */ 
+extern void defaultIface_raise_down(Default* handle);
+
+/*! Raises the in event 'up' that is defined in the default interface scope. */ 
+extern void defaultIface_raise_up(Default* handle);
+
+/*! Raises the in event 'back' that is defined in the default interface scope. */ 
+extern void defaultIface_raise_back(Default* handle);
+
+/*! Raises the in event 'home' that is defined in the default interface scope. */ 
+extern void defaultIface_raise_home(Default* handle);
+
+/*! Gets the value of the variable 'select1' that is defined in the default interface scope. */ 
+extern sc_integer defaultIface_get_select1(const Default* handle);
+/*! Sets the value of the variable 'select1' that is defined in the default interface scope. */ 
+extern void defaultIface_set_select1(Default* handle, sc_integer value);
+/*! Gets the value of the variable 'select2' that is defined in the default interface scope. */ 
+extern sc_integer defaultIface_get_select2(const Default* handle);
+/*! Sets the value of the variable 'select2' that is defined in the default interface scope. */ 
+extern void defaultIface_set_select2(Default* handle, sc_integer value);
+/*! Raises the in event 'Selected' that is defined in the interface scope 'Func'. */ 
+extern void defaultIfaceFunc_raise_selected(Default* handle);
+
+/*! Raises the in event 'Deselect' that is defined in the interface scope 'Func'. */ 
+extern void defaultIfaceFunc_raise_deselect(Default* handle);
+
+/*! Raises the in event 'Alarmset' that is defined in the interface scope 'Func'. */ 
+extern void defaultIfaceFunc_raise_alarmset(Default* handle);
+
+/*! Raises the in event 'MoveDown' that is defined in the interface scope 'Func'. */ 
+extern void defaultIfaceFunc_raise_moveDown(Default* handle);
+
+/*! Raises the in event 'MoveUp' that is defined in the interface scope 'Func'. */ 
+extern void defaultIfaceFunc_raise_moveUp(Default* handle);
+
+/*! Gets the value of the variable 't' that is defined in the interface scope 'Func'. */ 
+extern sc_integer defaultIfaceFunc_get_t(const Default* handle);
+/*! Sets the value of the variable 't' that is defined in the interface scope 'Func'. */ 
+extern void defaultIfaceFunc_set_t(Default* handle, sc_integer value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * A state machine is active if it was entered. It is inactive if it has not been entered at all or if it has been exited.
+ */
+extern sc_boolean default_isActive(const Default* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean default_isFinal(const Default* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean default_isStateActive(const Default* handle, DefaultStates state);
+
+
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* DEFAULT_H_ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/DefaultRequired.h	Tue May 08 13:45:42 2018 +0000
@@ -0,0 +1,77 @@
+
+#ifndef DEFAULTREQUIRED_H_
+#define DEFAULTREQUIRED_H_
+
+#include "sc_types.h"
+#include "Default.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+/*! \file This header defines prototypes for all functions that are required by the state machine implementation.
+
+This is a state machine uses time events which require access to a timing service. Thus the function prototypes:
+	- default_setTimer and
+	- default_unsetTimer
+are defined.
+
+This state machine makes use of operations declared in the state machines interface or internal scopes. Thus the function prototypes:
+	- defaultIface_menu
+	- defaultIface_function
+	- defaultIface_execute
+	- defaultIfaceFunc_ready
+	- defaultIfaceFunc_active
+	- defaultIfaceFunc_alarm
+	- defaultIfaceFunc_moveDownAct
+	- defaultIfaceFunc_moveUpAct
+	- defaultIfaceFunc_return
+are defined.
+
+These functions will be called during a 'run to completion step' (runCycle) of the statechart. 
+There are some constraints that have to be considered for the implementation of these functions:
+	- never call the statechart API functions from within these functions.
+	- make sure that the execution time is as short as possible.
+ 
+*/
+extern void defaultIface_menu(const Default* handle, const sc_integer select1);
+extern void defaultIface_function(const Default* handle, const sc_integer select2);
+extern void defaultIface_execute(const Default* handle);
+
+extern void defaultIfaceFunc_ready(const Default* handle);
+extern void defaultIfaceFunc_active(const Default* handle);
+extern void defaultIfaceFunc_alarm(const Default* handle);
+extern void defaultIfaceFunc_moveDownAct(const Default* handle);
+extern void defaultIfaceFunc_moveUpAct(const Default* handle);
+extern void defaultIfaceFunc_return(const Default* handle);
+
+
+/*!
+ * This is a timed state machine that requires timer services
+ */ 
+
+/*! This function has to set up timers for the time events that are required by the state machine. */
+/*! 
+	This function will be called for each time event that is relevant for a state when a state will be entered.
+	\param evid An unique identifier of the event.
+	\time_ms The time in milli seconds
+	\periodic Indicates the the time event must be raised periodically until the timer is unset 
+*/
+extern void default_setTimer(Default* handle, const sc_eventid evid, const sc_integer time_ms, const sc_boolean periodic);
+
+/*! This function has to unset timers for the time events that are required by the state machine. */
+/*! 
+	This function will be called for each time event taht is relevant for a state when a state will be left.
+	\param evid An unique identifier of the event.
+*/
+extern void default_unsetTimer(Default* handle, const sc_eventid evid);
+
+
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* DEFAULTREQUIRED_H_ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Functions.cpp	Tue May 08 13:45:42 2018 +0000
@@ -0,0 +1,52 @@
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "Default.h"
+#include "DefaultRequired.h"
+#include "main.h"
+
+extern void defaultIface_menu(const Default* handle, const sc_integer select1)
+{
+    PrintStatus_Serial(1);
+}
+extern void defaultIface_function(const Default* handle, const sc_integer select2)
+{
+    PrintStatus_Serial(2);
+}
+extern void defaultIface_execute(const Default* handle)
+{
+    PrintStatus_Serial(3);
+}
+extern void defaultIfaceFunc_ready(const Default* handle)
+{
+PrintStatus_Serial(4);
+}
+extern void defaultIfaceFunc_active(const Default* handle)
+{
+    PrintStatus_Serial(5);
+}
+extern void defaultIfaceFunc_alarm(const Default* handle)
+{
+    PrintStatus_Serial(6);
+}
+extern void defaultIfaceFunc_moveDownAct(const Default* handle)
+{
+    PrintStatus_Serial(7);
+}
+
+extern void defaultIfaceFunc_moveUpAct(const Default* handle)
+{
+    PrintStatus_Serial(8);
+}
+extern void defaultIfaceFunc_return(const Default* handle)
+{
+    PrintStatus_Serial(9);
+}
+extern void default_setTimer(Default* handle, const sc_eventid evid, const sc_integer time_ms, const sc_boolean periodic)
+{
+    
+}
+
+extern void default_unsetTimer(Default* handle, const sc_eventid evid)
+{
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/sc_types.h	Tue May 08 13:45:42 2018 +0000
@@ -0,0 +1,43 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */
+