A. TL_State B. BL_state C All the same D. main 66. enum BL States BL LedOff, BL
ID: 3908438 • Letter: A
Question
A. TL_State
B. BL_state
C All the same
D. main
66. enum BL States BL LedOff, BL Led0n BL State; 67. nt TickFct _BlinkLed (int state) I 68 VARIABLES MUST BE DECLARED STATIC/ 69-/te.g., static int x 03/ 70. Def ine user variables for this state nachine here 71. svitch state) // 2. This code vas aut onat i cally generated using the Riverside Irvine State machine Builder tool 3. Version 2.5 10/18/2012 10:2:14 PST 6·#include "rimsh" case: state = BL-Led0ff; 9. /This code ill be shared betven state nachines.* 10. typedef struct task I case BL Ledoff: int state; state BL LedOn: 12. unsizned lon per i od: 13. unsizned lon elapsedT i ne; 14 int (TickFct) (int); break; case BL Ledon 80 17. task tasks[21: state BL LedOff: 84 re 19. const unsigned char tasksNum = 2; 20. const unsigned long periodBlinkLed = 1500; 21. const unsigned long periodThreeLeds = 500; default: state1 Transitions 23. const unsi gned long tasksPeriodGCD 500; 89. svitch(state) // case BL_Ledoff 25. int TickFct BlinkLed (int state); 26. int TickFct ThreeLeds (int state): BO-0; break; case BLLedon: 28. unsigned char process ineRdyTasks = 0; 29. void TierISR 30 unsi gned chari 31 if (processinRdyTasks) 32 94 default: // break; print f ("Period too short to complete taskstn"); 34. 35. 36 98. // State actions 99. BL State st ate; 100 return state; process i n2RdyTasks=1; for (i = 0; iExplanation / Answer
Which state machine in text 1 has the greates WCET(worst case execution time) is the state action.
D.main
Comparing to TL_state and BL_state, main will have the worst case execution time, because both TL_State and BL_state, has more or less same execution time in action.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.