Control Flow

Cogent Tools Demo and Tutorials: Version 4.0
Prev | Chapter 1. Introduction | Next

# 1.3. Control Flow

There are three types of control in the demo:

- User-initiated start/stop of programs.

- Automatic start-up of programs.

- Command messages.

The control flow uses IPC, but unlike the data flow, it doesn't use the Cascade DataHub. It uses Gamma functions like `system`, `send`, and `send_string`. For C programs, the Cogent API offers a wide range of IPC functions.

User-initiated start/stop: Most programs are started and stopped with the Controller (`gtkcontrol.g` or `phcontrol.g`), a Gamma GUI program, started by user with the mini `demo.g` program from the command line. From the Controller you can press buttons to start or stop, in any combination or sequence, the Gamma programs PID Emulator, Monitor, Log, and History, as well as the DataHub Viewer (purple arrows in the diagram). From the Log GUI you can start or stop the Cascade TextLogger.

In Windows, you start the Cogent PID Demo for Windows executable (`PID_Demo.exe`).

Automatic startup: The Controller automatically starts the Cascade QueueServer and the Cascade NameServer (qserve and nserve) to establish interprocess communication, and then it starts the Cascade DataHub (blue arrows in the diagram). When you start the History program it automatically starts the Cascade Historian, which runs until you shut down the History program.

In Windows the `PID_Demo.exe` executable automatically starts Cascade Connect, which starts the Connect Server.

Command messages: The Log and History programs send commands directly to the Cascade TextLogger and the Cascade Historian respectively. The Monitor, Log, and History programs send commands via IPC to the Controller to have it display help/information messages in its text window (mainly in GTK). Control messages are shown as red arrows in the diagram.

Prev | Home | Next
Data Flow | Up | Demo Files and their Locations

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.