Java Reference
In-Depth Information
In Chapter 10 (Mobile robot exploration) the onboard controller coordi-
nates the activities of the physical devices in order to perform complex tasks
such as obstacle avoidance. It receives commands from the remote controller,
decomposes complex tasks into sub-tasks, and delegates their execution to
the robot's devices. Each device performs its tasks autonomously.
In Chapter 11 (Car parking) the ticket dispenser interacts with both the
car and the controller by receiving commands and raising events.
Another case study that is relevant for our analysis was described in
Chapter 15 (Geographic information system). The data browser manages
the simultaneous access of multiple users to the same set of databases.
19.2.2
Multi-mode synchronization
Autonomous control modules communicate with one another in order to
cooperate. The need to cooperate induces synchronization requirements
among their activities.
In OO programming interactions between two objects are implemented as
operations on one of the two: the object that performs the operations is
called the “server”, while the object that requests an operation and uses its
results is called the “client”. The case studies described in previous chapters
exemplify a variety of interaction patterns among control modules playing
the role of server and those playing the role of client. We can classify client
-server interactions in three categories: synchronous , asynchronous and
deferred synchronous interactions .
In Chapter 13 (Supervisory control and data acquisition system) the
supervisory console allows the user to change the paint colour. When the
user sets the new tonality, the supervisory console issues a command to the
mixer controller, which performs a sequence of operations (e.g. close the
spray pump, open the drain pump, open the colour pumps, etc.). The super-
visory console is synchronized with the mixer controller since it remains in
the tonality setting state until the mixing process is completed. Similar
examples can be found in Chapter 14 (Supermarket operation support
system) and Chapter 15 (Geographic information system).
In Chapter 11 (Car parking) we structured the access control system as a
collection of software modules organized in a hierarchy of control layers. A
higher-level control module (the car, the controller), acting as a client, inte-
grates lower control modules, which act as servers (the physical devices). In
order to avoid visibility loops between control modules at different layers,
clients and servers communicate using two different mechanisms: the clients
send commands to the servers according to the caller
provider paradigm;
the servers notify clients of state changes according to the broadcaster
-
-
listener paradigm. This is an example of asynchronous interaction: the
controller issues the command that requests the stopping bar to rise and
continues its execution; when the stopping bar notifies that its current state
is “up”, the controller may be performing some other activities. A similar
example can be found in Chapter 9 (Manufacturing work cell).
 
Search WWH ::




Custom Search