Question

67. nt TickFct BlinkLed (int state) 68. /YARIABLES MUST BE DECLARED STATIC/ 69. /e.g, static int x0/ 70. /Def ine user variables for this state sachine here 2. This code vas aut onat ically ene rated using the Riverside-Irvine State nachine Bui l der tool 3. Version 2.5 10/18/2012 10:2:14 PST 6. tinclude rins.h sitch(state) II case1 break; case BL Ledoff: 9. /*This code vill be shared beteen state machines./ 10. typedef struct task 1 int state: 12. unsigned long period; 13. unsined long elapsedTine 14. int (TickFct)(int) 15. 1 task: 75 76 state BL LedOn; break; if (1) 78 79 case BL Ledon: state BL Ledoff: break: state-1: 17. task tasks(21: 19. const unsigned char tasksNun 2; 20. const unsigned long periodBl inkLed 1500; 21 cnst unsigned long period default ThreeLeds 500; I I Transitions 23. const unsi gned long tasksPeriodGCD 500; 89. sritch(state) I/ case BL LedOff: 25. int TickFct BlinkLed (int state) 26. int Tickfct ThreeLeds (int state); 27 28. unsigned char process insRdyTasks 0; 29. void TISR 30 unsi aned chari; 3 (processin RdyTasks) BO-0; break case BL Ledon 94. break: default: /i break: printf( Period too short to complete tasksVn) 34. processi ngRdy Tasks1; 35. for (i 0; i tasksNun; ++i) 36 98. /I State actions 99. BL State state; 100 return state; if (tasks[i].elapsedTie tasksi].period) I tasks[il.state tasks[il.TickFct (t asks[i].state); 102 38 tasks [i].elapsedT ine0; 104. enum TL States TL TO, TLTI, TL T2 TL State; 105. int TickFet Threeleds(int state) 106 VARIABLES MUST BE DECLARED STATIC/ 107. e-., static int x0; 108. /Define user variables for this state nachine here. 109 sritch state) II tasks [i].elapsedTine tasksPeriodGCD 42. pracessi naRdy Tasks 0; 44. int ain) I 45. I/ Priority assined to lover position tasks in array 46. unsigned char iD; 47. tasks[i].state1 48. taskslil.period periodBl inkLed 4 tasks[i].elapsedTi netasks [i].period; 50, tasks[i].rickFet=&Tickfct_BI inkLed; case -1: reak: case TL TO: state TL TI break: case TL TI: 52. Hi 53 tasks[i].state1 54. tasks[i].period periodThreeleds 55 tasks[i].elapsedinetasksi.period 56. tasks[i].TickFctTickFct ThreeLeds; 120 121 122 123 124 state TL T2: break case TL T2: 58 ; 59. Tineret (tasksPer i odGCD) 60 TinerOn) 62. while(I) Sleep: 64. return 0 Text I: Program Listing

0 0
Add a comment Improve this question Transcribed image text
Answer #1

34.

b)Rear

new values updated in back of the queue

35.

d)Oldest

first entered value got deleted first

36.

b) circular buffer

37.

b)stack

38.)

c)true

Add a comment
Know the answer?
Add Answer to:
67. nt TickFct BlinkLed (int state) 68. /YARIABLES MUST BE DECLARED STATIC/ 69. /e.g, static int...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • must provide the following public interface: public static void insertSort(int [] arr); public static void selectSort(int...

    must provide the following public interface: public static void insertSort(int [] arr); public static void selectSort(int [] arr); public static void quickSort(int [] arr); public static void mergeSort(int [] arr); The quick sort and merge sort must be implemented by using recursive thinking. So the students may provide the following private static methods: //merge method //merge two sorted portions of given array arr, namely, from start to middle //and from middle + 1 to end into one sorted portion, namely,...

  • #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> int main(void) { /* Type your code here....

    #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> int main(void) { /* Type your code here. */ int GetNumOfNonWSCharacters(const char usrStr[]) { int length; int i; int count = 0; char c; length=strlen(usrStr); for (i = 0; i < length; i++) { c=usrStr[i]; if ( c!=' ' ) { count++; } }    return count; } int GetNumOfWords(const char usrStr[]) { int counted = 0; // result // state: const char* it = usrStr; int inword = 0; do switch(*it)...

  • I need help with this method (public static int computer_move(int board[][])) . When I run it...

    I need help with this method (public static int computer_move(int board[][])) . When I run it and play the compute.The computer enters the 'O' in a location that the user has all ready enter it sometimes. I need to fix it where the computer enters the 'O' in a location the user has not enter the "X' already package tictactoe; import java.util.Scanner; public class TicTacToeGame { static final int EMPTY = 0; static final int NONE = 0; static final...

  • -can you change the program that I attached to make 3 file songmain.cpp , song.cpp ,...

    -can you change the program that I attached to make 3 file songmain.cpp , song.cpp , and song.h -I attached my program and the example out put. -Must use Cstring not string -Use strcpy - use strcpy when you use Cstring: instead of this->name=name .... use strcpy ( this->name, name) - the readdata, printalltasks, printtasksindaterange, complitetasks, addtasks must be in the Taskmain.cpp - I also attached some requirements below as a picture #include <iostream> #include <iomanip> #include <cstring> #include <fstream>...

  • Overload the output stream operator << and the assignment operator =. Any time cout << task;...

    Overload the output stream operator << and the assignment operator =. Any time cout << task; is used the code should output a task, any time task1 = task2 is copied there must be a deep copy if there are pointers. Use the operators in the following code as suggested above. DO NOT simply overload them! Do so on the following code: //Project 4 Main function #include "functions.h" #include <stdlib.h> #include <stdio.h> //main int main(){    TaskList column("tasks.txt");    char...

  • The provided code is my solution, stripped of the details needed to make it work. It...

    The provided code is my solution, stripped of the details needed to make it work. It is not a “good” program. It lives in a single file, does not use classes, and it has those evil global variables. That is by design. I want to to craft code. Use my code as a guide to help you put together the needed parts. #include #include #include // defaults const int MAX_STEPS = 100; // how long do we run the simulation...

  • *** Tasks to be completed *** Task 1: Define structures to hold bids Task 2: Initialize...

    *** Tasks to be completed *** Task 1: Define structures to hold bids Task 2: Initialize the structures used to hold bids Task 3: Implement logic to free storage when class is destroyed Task 4: Implement logic to calculate a hash value using the bid Id as the source for calculating the key Task 5: Implement logic to insert a bid Be sure to check for key collisions and use the chaining technique with a linked list to store the...

  • Can I get some help with this question for c++ if you can add some comments...

    Can I get some help with this question for c++ if you can add some comments too to help understand that will be much appreciated. Code: #include <cstdlib> #include <getopt.h> #include <iostream> #include <string> using namespace std; static long comparisons = 0; static long swaps = 0; void swap(int *a, int *b) {     // add code here } void selectionSort(int *first, int *last) {     // add code here } void insertionSort(int *first, int *last) {     // add code here }...

  • In C++: Please help me correct this code .... All parts with (FIX ME) #include <algorithm> #include <climits&gt...

    In C++: Please help me correct this code .... All parts with (FIX ME) #include <algorithm> #include <climits> #include <iostream> #include <string> // atoi #include <time.h> #include "CSVparser.hpp" using namespace std; //============================================================================ // Global definitions visible to all methods and classes //============================================================================ const unsigned int DEFAULT_SIZE = 179; // forward declarations double strToDouble(string str, char ch); // define a structure to hold bid information struct Bid { string bidId; // unique identifier string title; string fund; double amount; Bid() {...

  • You've been hired by Rugged Robots to complete a C++ console application that controls a robotic...

    You've been hired by Rugged Robots to complete a C++ console application that controls a robotic floor vacuum. Wayne State software engineers have already developed the following three files: File Description Lab20-01-Key.cpp This is the user application. RuggedRobotLibrary.h This is the library header file. It contains constant declarations and function prototypes. It is included by the other two files. RuggedRobotLibrary.cpp This is the library file. It contains functions that may be used in any user application. This is considered an...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT