From be48720773b38e76630cb6c2ad3f2dac922b4406 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Fri, 20 Sep 2024 17:34:44 -0700 Subject: [PATCH] Remove mistakenly commited test --- test/C/src/zephyr/threaded copy/ScheduleAt.lf | 87 ------------------- 1 file changed, 87 deletions(-) delete mode 100644 test/C/src/zephyr/threaded copy/ScheduleAt.lf diff --git a/test/C/src/zephyr/threaded copy/ScheduleAt.lf b/test/C/src/zephyr/threaded copy/ScheduleAt.lf deleted file mode 100644 index 7caf03b0fe..0000000000 --- a/test/C/src/zephyr/threaded copy/ScheduleAt.lf +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Test _lf_schedule_at_tag which is an internal API function not meant to be used in user code. - * - * @author Soroush Bateni - */ -target C { - timeout: 1 sec, - keepalive: true, - platform: "Zephyr" -} - -reactor Scheduler { - preamble {= - #ifdef __cplusplus - extern "C" { - #endif - #include "include/core/reactor_common.h" - #ifdef __cplusplus - } - #endif - =} - logical action act - // List of microsteps. Size = 16 - state microstep_delay_list: uint32_t[] = {0, 1, 1, 2, 2, 0, 0, 1, 1, 0, 2, 3, 3, 4, 4, 5} - - state times: int[] = { - 0, - 0, - 0, - 0, - 0, - 400 msec, - 400 msec, - 400 msec, - 400 msec, // List of the corresponding times. Size = 16 - 800 msec, - 800 msec, - 800 msec, - 800 msec, - 900 msec, - 900 msec, - 900 msec} - // Size = 9 - state action_hit_list_microstep: int[] = {1, 2, 0, 1, 0, 2, 3, 4, 5} - state action_hit_list_times: int[] = { - 0, - 0, - 400 msec, - 400 msec, - 800 msec, - 800 msec, - 800 msec, - 900 msec, - 900 msec} - // Size = 9 - state action_hit_list_index: int = 0 - - reaction(startup) -> act {= - for (int i=0; i < 16; i++) { - _lf_schedule_at_tag(self->base.environment, act->_base.trigger, - (tag_t) { .time = self->times[i] + lf_time_logical(), .microstep = self->microstep_delay_list[i]}, - NULL); - } - =} - - reaction(act) {= - microstep_t microstep = lf_tag().microstep; - instant_t elapsed_time = lf_time_logical_elapsed(); - if (elapsed_time == self->action_hit_list_times[self->action_hit_list_index] && - microstep == self->action_hit_list_microstep[self->action_hit_list_index]) { - self->action_hit_list_index++; - } - printf("Triggered at tag (" PRINTF_TIME ", %u).\n", elapsed_time, microstep); - =} - - reaction(shutdown) {= - if (self->action_hit_list_index != 9) { - fprintf(stderr, "ERROR: incorrect number of actions were correctly scheduled: %d.", self->action_hit_list_index); - exit(1); - } - printf("SUCCESS: successfully scheduled all the events.\n"); - =} -} - -main reactor ScheduleAt { - sender = new Scheduler() -}