OSEK OSEK {

OS	ExampleOS {
	STATUS = CT_STATUS;
	PRETASKHOOK = FALSE;
	POSTTASKHOOK = FALSE;
   STARTUPHOOK = FALSE;
   ERRORHOOK = FALSE;
   SHUTDOWNHOOK = FALSE;
	MEMMAP = FALSE;
	USERESSCHEDULER = FALSE;
};

TASK Task1 {
   PRIORITY = 1;
   SCHEDULE = CT_SCHEDULING_TASK1;
   ACTIVATION = 1;
   AUTOSTART = TRUE {
		APPMODE = AppMode1;
	};
	STACK = 256;
	TYPE = BASIC;
};

TASK Task2 {
   PRIORITY = 2;
   SCHEDULE = CT_SCHEDULING_TASK2;
   ACTIVATION = 1;
   AUTOSTART = TRUE {
		APPMODE = AppMode1;
	};
	STACK = 256;
	TYPE = EXTENDED;
	EVENT Event2;
};

COUNTER Counter1 {
	MAXALLOWEDVALUE = 16;
	TICKSPERBASE = 1;
	MINCYCLE = 1;
	TYPE = SOFTWARE;
};

ALARM Alarm1 {
	COUNTER = Counter1;
	ACTION = SETEVENT {
		TASK = Task2;
		EVENT = Event2;
	};
	AUTOSTART = FALSE;
};

COUNTER HardwareCounter {
   MAXALLOWEDVALUE = 100;
   TICKSPERBASE = 1;
   MINCYCLE = 1;
   TYPE = HARDWARE;
   COUNTER = HWCOUNTER0;
};

ALARM IncrementSWCounter {
   COUNTER = HardwareCounter;
   ACTION = INCREMENT {
      COUNTER = Counter1;
   };
   AUTOSTART = TRUE {
      APPMODE = AppMode1;
      ALARMTIME = 1;
      CYCLETIME = 1;
   };
};

APPMODE AppMode1;

EVENT Event2;

};
