Skip to main content
. 2010 Sep 15;10(9):8585–8603. doi: 10.3390/s100908585

Listing 5.

Creation of the kernel and task in EJS.

1 // Initialize the Embedded System
2 RTenv.setReflectionContext (this);
3 kernel =new Kernel ( );
4 kernel.setSchedule (true);
5 kernel.setScheduleWindow (0.5);
6 task =new Task ( );
7 task.setPeriod (0.012);
8 task.addCode (“taskcode”);
9 kernel.addTask (task);
10 RTenv.addKernel (kernel);