Download 58 Building an Application
Transcript
Chapter 58 Building an Application Introduction The Basic Idea An application generated with the Cadvanced SDL to C Compiler can be viewed as having three parts: • The SDL system • The physical environment of the system • The environment functions, where you connect the SDL system with the environment of the system In the SDL system process transitions are executed in priority order, signals are sent from one process to another initiating new transitions, timer signals are sent, and so on. These are examples of internal actions that only affect the execution of the SDL system. An SDL system communicates with its environment by sending signals to the environment and by receiving signals from the environment. The physical environment of an application consists of an operating system, a file system, the hardware, a network of computers, and so on. In this world other actions than just signal sending are required. Examples of actions that an application wants to perform are: • • • • To read or to write on a file To send or receive messages over a network To respond on interrupts To read and to write information on hardware ports or on sockets The environment functions are the place where the two worlds, the SDL system and the physical environment, meet. Here signals sent from the SDL system to the environment can induce all kinds of events in the physical environment, and events in the environment might cause signals to be sent into the SDL system. You have to provide the environment functions, as the Cadvanced SDL to C Compiler has no knowledge of the actions that should be performed. 2696 ,um-st1 Telelogic Tau 4.5 User’s Manual July 2003