software requirements

Anonymous
timer Asked: Nov 15th, 2016

Question description

An embedded computer controls two pairs of traffic lights at the intersection of a street and an avenue, one pair for each. The lights can be red or green, but both pairs can never be green at the same time (else the lights will cause car collisions!). Under normal processing, the lights change, via turn_red and turn_green commands, whenever the event change_lights occurs, say every 45 seconds; the changes are such that one pair is red while the other is green. When an ambulance nears the intersection, a sensor signals amb_enter road event, where road is either avenue or street depending on the location of the ambulance. The controller must then ensure that the lights on the ambulance road are green, while those on the other road are red. When the ambulance leaves the intersection area, signaled by an amb_exit event, the lights resume their normal sequencing. Draw a state machine this traffic light controller

Tutor Answer

(Top Tutor) Studypool Tutor
School: New York University
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors