Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A. 34 B. 37 C. 35 D. 42 In text 1 which line would have all task in the ready st

ID: 3908430 • Letter: A

Question

A. 34

B. 37

C. 35

D. 42

In text 1 which line would have all task in the ready status

A. 34

B. 42

C. 36

D. 40

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; i

Explanation / Answer

solution:

1) B) line 37 would have one task in executing state

tasks[i].state = tasks[i].Tickfct(tasks[i].state);

2) D) line 40 would have all tasks in the ready status

tasks[i].elapsedTime += tasksPeriodGCD;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote