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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

382 Case Study<br />

tends the functionality <strong>of</strong> the terminator with a number <strong>of</strong> powerful services. The<br />

Transporter Image translates the encoderPulse into a unity <strong>of</strong> Position. A Position is a data<br />

object recording the relative position <strong>of</strong> a physical mailing product. The difference between<br />

two Positions is a measure for the distance <strong>of</strong> product transport. This difference<br />

is represented by a data object <strong>of</strong> class PositionDelta 4 .<br />

If a physical mailing product is about to enter the feeder station, the<br />

Product Input Handler is being sent an accept(PI) message by its left neighbour station.<br />

A PI 5 is a data object that contains the required services <strong>of</strong> the corresponding mailing<br />

product. It also knows whether the required services have yet been performed<br />

to a correct result or not. If the feeder station can receive the mailing product, the<br />

Product Input Handler accepts the message accept(PI). If the rendezvous has occurred,<br />

the neighbour station knows that the feeder is willing to receive the corresponding<br />

physical mailing product, and the feeder station knows that a new product will enter<br />

the station soon. After reception <strong>of</strong> the accept(PI) message the Product Input Handler<br />

waits until it receives the message productArrived from the Transporter Image. Then it immediately<br />

reads the current product Position 6 and stores the corresponding PI in one <strong>of</strong><br />

the free Product Info Keepers. The multiple <strong>of</strong> Product Info Keepers is found naturally by<br />

realising that each PI entering the control station must be stored somewhere for further<br />

processing.<br />

Each instance <strong>of</strong> the multiple <strong>of</strong> Product Info Keepers has an identifier represented by<br />

a data object <strong>of</strong> class PIKeeperId. Whenever a Product Info Keeper is free, it sends its<br />

identifier to the Product Input Handler. After the PI object is stored, it remains inside the<br />

keeper until the corresponding mailing product leaves the feeder station again. After the<br />

PI object is stored, the Product Input Handler sends a message schedule(InitialPosition) to<br />

the Service Scheduler. Data class InitialPosition is a specialisation <strong>of</strong> class Position (see also<br />

Subsection 12.3.7). An InitialPosition records the relative entrance position 7 <strong>of</strong> a mailing<br />

product. After the message schedule(InitialPosition) is sent, the Product Input Handler<br />

calculates the Position at which a new product can safely enter the feeder station. Then<br />

it requests the Transporter Image to get woken up at this Position, after which it starts<br />

waiting for message wakeUp to arrive. Until then no new PI is accepted.<br />

The Service Scheduler takes care that all matching required services, that are recorded in<br />

the Product Info Keeper, are actually being provided. Within the Product Flow scenario<br />

only one service is <strong>of</strong>fered. This service deals with the handing over <strong>of</strong> the mailing<br />

product to the right-sided neighbour station. The hand over service is triggered when<br />

the Product Output Handler receives message handOver(InitialPosition). Upon reception<br />

<strong>of</strong> this message the Product Output Handler inspects the InitialPosition <strong>of</strong> the mailing<br />

product and calculates two other Positions. Then it requests the Transporter Image to<br />

get woken up at these Positions and consequently it starts waiting for the arrival <strong>of</strong><br />

4This data class is not shown as parameter type <strong>of</strong> any message in Figure 12.4.<br />

5PI is an abbreviation <strong>of</strong> Product Info.<br />

6Notice that this position can always be read immediately, since the flow currentPosition(Position) is<br />

continuous.<br />

7This position is relative to some fixed point <strong>of</strong> a transport belt.

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

Saved successfully!

Ooh no, something went wrong!