Copyright | Copyright (c) 2009-2015, David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Tested with: GHC 7.10.1
The module defines a gate which can be either opened or closed.
- data Gate m
- newGate :: MonadDES m => Bool -> Simulation m (Gate m)
- newGateOpened :: MonadDES m => Simulation m (Gate m)
- newGateClosed :: MonadDES m => Simulation m (Gate m)
- openGate :: MonadDES m => Gate m -> Event m ()
- closeGate :: MonadDES m => Gate m -> Event m ()
- gateOpened :: MonadDES m => Gate m -> Event m Bool
- gateClosed :: MonadDES m => Gate m -> Event m Bool
- awaitGateOpened :: MonadDES m => Gate m -> Process m ()
- awaitGateClosed :: MonadDES m => Gate m -> Process m ()
- gateChanged_ :: MonadDES m => Gate m -> Signal m ()
Documentation
newGate :: MonadDES m => Bool -> Simulation m (Gate m) Source
Create a new gate, specifying whether the gate is initially open.
newGateOpened :: MonadDES m => Simulation m (Gate m) Source
Create a new initially open gate.
newGateClosed :: MonadDES m => Simulation m (Gate m) Source
Create a new initially close gate.
awaitGateOpened :: MonadDES m => Gate m -> Process m () Source
Await the gate to be opened if required. If the gate is already open then the computation returns immediately.
awaitGateClosed :: MonadDES m => Gate m -> Process m () Source
Await the gate to be closed if required. If the gate is already closed then the computation returns immediately.
gateChanged_ :: MonadDES m => Gate m -> Signal m () Source
Signal triggered when the state of the gate changes.