23.08.2013 Views

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

390 Case Study<br />

The specification <strong>of</strong> the Feeder Controller cluster is as easy as the specification <strong>of</strong> the<br />

Feeder Station cluster and is not presented here. Instead we will take a closer look at the<br />

Product Input Handler, the Product Info Keeper and the Transporter Image classes.<br />

The first part <strong>of</strong> the Product Input Handler class is defined as follows:<br />

process class<br />

Product Input Handler myId,productDistance ¡<br />

instance variables<br />

myId<br />

productDistance<br />

productInfo<br />

initialPosition<br />

piKeeperId<br />

: ProductInputHandlerId<br />

: PositionDelta<br />

: PI<br />

: InitialPosition<br />

: PIKeeperId<br />

A Product Input Handler has an identifier myId which is <strong>of</strong> type ProductInputHandlerId 17 .<br />

The variable is assigned a fixed value when the process is instantiated. The same<br />

holds for the instance variable productDistance. This variable models the minimum<br />

distance between two successive mailing products. The distance is expressed in terms<br />

<strong>of</strong> a PositionDelta. The variables productInfo and initialPosition and store the PI and the<br />

InitialPosition <strong>of</strong> the most recently received mailing product. Variable piKeeperId holds<br />

the identifier <strong>of</strong> the Product Info Keeper in which the current PI is stored.<br />

In the next part <strong>of</strong> the process class specification the channels and the message interface<br />

must be described. The channels <strong>of</strong> the class are found in the Instance Structure Diagram<br />

<strong>of</strong> Figure 12.8. The message interface can be written by combining the channels <strong>of</strong> the<br />

Instance Structure Diagram <strong>of</strong> Figure 12.8 with the messages and parameter types <strong>of</strong> the<br />

Message Flow Diagram <strong>of</strong> Figure 12.6.<br />

communication channels<br />

i piti wake pihs pihp<br />

message interface<br />

i?accept(PI)<br />

piti?productArrived<br />

piti?currentPosition(InitialPosition)<br />

wake!wakeAt(Position,ProductInputHandlerId)<br />

wake?wakeup(Id)<br />

pihs!schedule(PIKeeperId,InitialPosition)<br />

pihp?free(PIKeeperId)<br />

pihp!store(PIKeeperId,PI)<br />

The behaviour <strong>of</strong> a Product Input Handler instance consists <strong>of</strong> an infinite non-terminating<br />

loop modelled by method loopForever. Upon instantiation <strong>of</strong> a Product Input Handler it<br />

17 Although the language POOSL is formally not typed yet, variables are assigned a type to clarify the<br />

specifications.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!