CS 193
My internship began as a part-time student assistant in the TCFI (the Tested Center for Interoperability) lab of CALTRANS (Transportation Department of California). My work focuses on the analysis of TSCP (Traffic Signal Control Program) code in C language, which is one major application installed on the Model 2070 controller. Also I maintain their web site www.tcfi.ucsb.edu.
TopTo identify what's the feature of 2070, let's compare it with the previous version 170 controller first. The Model 170 is outdated by current standards, since it's application is severely constrained by its limited memory, processing speed, input/output, and front panel user interface. Additionally, its support of only assembly language programs complicates software development and maintenance. Furthermore, because the Model 170 does not adhere to industry standard internal interfaces, it is limited to only be able to make use of those externally-connected low-speed devices as the off-the-shelf commercial extension. The Model 170 can not support the high-speed data communication rates commonly present in modern ATMS (Advanced Traffic Management Systems) networks.
The Model 2070 overcomes these limitations. It utilizes modern 32-bit microprocessor technology. Its memory is expansible, and is adherent to the VME bus standard as its internal interface. These features assure its capabilities and flexibility in addressing current and future traffic management needs. Another benefit of the Model 2070 is that it provides a significantly improved software environment by containing the OS-9 real-time operating. This multi-tasking OS handles low level system tasks and allows multiple applications to run concurrently on a single controller. Under this environment, applications running on the 2070 controller can be developed with high-level programming languages such as "C" and "C++". Supporting high-level languages allows easier application development and maintenance, as well as improved coding structure and an overall reduction in software complexity and cost. In addition, it enables different application software to be moved between different controllers without modification. As an example, TSCP can be implemented on Model 2070 in C language. The input from field I/Os indicating current traffic status is fed into TSCP processing module, which computes the corresponding control information on the basis of predefined protocol. This control information is then sent out to guide the operation of the whole system.
Because the controller can be used for more than one application at a time, resource management software is required to manage the controller and coordinate the operation of various applications. For example, the primary method to access the TSCP is through the front panel display and keyboard, rather than being controlled by the application directly. In the 2070 controller, there are four resource managers:
Except Startup manager, all the others need user configuration. The Front Panel manager needs user interfaces, so selections can be entered through it. Before each application begins to run on the controller, it must obtain the resources of the front panel and keyboards first through the Front Panel. Once an application has been selected, the Front Panel will release all its control to the application program selected. That is to say, all input and output to the controller through the Front Panel is governed by the application. The Field I/O and Serial Comm managers start operation when the power is on. They do not need the user interfaces and are accessed only through application programs.
TopThere are 8 main operations of the TSCP:
My work is to analyze the code of TSCP program, Version 226. On the basis of this analysis, TSCP will be translated into the UML (The Unified Modeling Language).
UML is a language for specifying, visualizing,
constructing, and documenting the artifacts of software systems, as well as for business
modeling and other non-software systems. Its goals are:
TSCP consists of three independent but interactive tasks. The most frequently triggered task is the low-level control, which interacts with outside world. It takes data from primary inputs such as Field I/O, then puts the data into input buffer. After that, it executes the control logic based on current system settings, and fills the output buffer with updated data. Finally, it forces the data in output buffer to appear on the primary outputs. Built on this low-level control, high level part determines the current system behavior. This behavior is defined by some system variables. The control extracts the input information directly from input buffer, and updates the system settings based on predefined control protocol. It also generates output data, which is to be sent to primary output by low level control. Besides these two controls, auxiliary control part performs some tasks like updating clock strategies, parameter file loading and saving.
Fig 2. the Flowchart of Initialization Module
When time.trigger is multiple of TRGGER_20HZ, TRIGGER_10HZ and TRIGGER_1HZ, three group of executions will be performed one by one.
Fig 3. the Flowchart of Execution Module
Mainly, the termination module consists of the executions which are functioned reversedly to initialization.
Ying Yan, CS193@ UCSB, Spring 2001 Last updated on June 10, 2001