Copyright | Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell98 |
Tested with: GHC 8.0.1
This module defines the GPSS Facility entity.
- data Facility a
- data FacilityPreemptMode a = FacilityPreemptMode {}
- type FacilityPreemptTransfer a = Transact a -> Maybe Double -> Process ()
- newFacility :: Event (Facility a)
- facilityCount :: Facility a -> Event Int
- facilityCountStats :: Facility a -> Event (TimingStats Int)
- facilityCaptureCount :: Facility a -> Event Int
- facilityUtilisationCount :: Facility a -> Event Int
- facilityUtilisationCountStats :: Facility a -> Event (TimingStats Int)
- facilityQueueCount :: Facility a -> Event Int
- facilityQueueCountStats :: Facility a -> Event (TimingStats Int)
- facilityTotalWaitTime :: Facility a -> Event Double
- facilityWaitTime :: Facility a -> Event (SamplingStats Double)
- facilityTotalHoldingTime :: Facility a -> Event Double
- facilityHoldingTime :: Facility a -> Event (SamplingStats Double)
- facilityInterrupted :: Facility a -> Event Bool
- seizeFacility :: Facility a -> Transact a -> Process ()
- releaseFacility :: Facility a -> Transact a -> Process ()
- preemptFacility :: Facility a -> Transact a -> FacilityPreemptMode a -> Process ()
- returnFacility :: Facility a -> Transact a -> Process ()
- resetFacility :: Facility a -> Event ()
- facilityCountChanged :: Facility a -> Signal Int
- facilityCountChanged_ :: Facility a -> Signal ()
- facilityCaptureCountChanged :: Facility a -> Signal Int
- facilityCaptureCountChanged_ :: Facility a -> Signal ()
- facilityUtilisationCountChanged :: Facility a -> Signal Int
- facilityUtilisationCountChanged_ :: Facility a -> Signal ()
- facilityQueueCountChanged :: Facility a -> Signal Int
- facilityQueueCountChanged_ :: Facility a -> Signal ()
- facilityWaitTimeChanged :: Facility a -> Signal (SamplingStats Double)
- facilityWaitTimeChanged_ :: Facility a -> Signal ()
- facilityHoldingTimeChanged :: Facility a -> Signal (SamplingStats Double)
- facilityHoldingTimeChanged_ :: Facility a -> Signal ()
- facilityChanged_ :: Facility a -> Signal ()
Facility Type
data FacilityPreemptMode a Source #
The facility preemption mode.
FacilityPreemptMode | |
|
type FacilityPreemptTransfer a = Transact a -> Maybe Double -> Process () Source #
Proceed with the computation by the specified preempted transact and remaining time from the process holding computation such as the ADVANCE block.
Creating Facility
newFacility :: Event (Facility a) Source #
Create a new facility.
Facility Properties
facilityCount :: Facility a -> Event Int Source #
Return the current available count of the facility.
facilityCountStats :: Facility a -> Event (TimingStats Int) Source #
Return the statistics for the available count of the facility.
facilityCaptureCount :: Facility a -> Event Int Source #
Return the current capture count of the facility.
facilityUtilisationCount :: Facility a -> Event Int Source #
Return the current utilisation count of the facility.
facilityUtilisationCountStats :: Facility a -> Event (TimingStats Int) Source #
Return the statistics for the utilisation count of the facility.
facilityQueueCount :: Facility a -> Event Int Source #
Return the current queue length of the facility.
facilityQueueCountStats :: Facility a -> Event (TimingStats Int) Source #
Return the statistics for the queue length of the facility.
facilityTotalWaitTime :: Facility a -> Event Double Source #
Return the total wait time of the facility.
facilityWaitTime :: Facility a -> Event (SamplingStats Double) Source #
Return the statistics for the wait time of the facility.
facilityTotalHoldingTime :: Facility a -> Event Double Source #
Return the total holding time of the facility.
facilityHoldingTime :: Facility a -> Event (SamplingStats Double) Source #
Return the statistics for the holding time of the facility.
facilityInterrupted :: Facility a -> Event Bool Source #
Whether the facility is currently interrupted.
Seizing-Releasing and Preempting-Returning Facility
:: Facility a | the requested facility |
-> Transact a | the transact that tries to seize the facility |
-> Process () |
Seize the facility.
:: Facility a | the facility to release |
-> Transact a | the active transact that tries to release the facility |
-> Process () |
Release the facility by the active transact.
:: Facility a | the requested facility |
-> Transact a | the transact that tries to preempt the facility |
-> FacilityPreemptMode a | the Preempt mode |
-> Process () |
Preempt the facility.
:: Facility a | the facility to return |
-> Transact a | the active transact that tries to return the facility |
-> Process () |
Return the facility by the active transact.
Statistics Reset
resetFacility :: Facility a -> Event () Source #
Reset the statistics.
Signals
facilityCountChanged :: Facility a -> Signal Int Source #
Signal triggered when the facilityCount
property changes.
facilityCountChanged_ :: Facility a -> Signal () Source #
Signal triggered when the facilityCount
property changes.
facilityCaptureCountChanged :: Facility a -> Signal Int Source #
Signal triggered when the facilityCaptureCount
property changes.
facilityCaptureCountChanged_ :: Facility a -> Signal () Source #
Signal triggered when the facilityCaptureCount
property changes.
facilityUtilisationCountChanged :: Facility a -> Signal Int Source #
Signal triggered when the facilityUtilisationCount
property changes.
facilityUtilisationCountChanged_ :: Facility a -> Signal () Source #
Signal triggered when the facilityUtilisationCount
property changes.
facilityQueueCountChanged :: Facility a -> Signal Int Source #
Signal triggered when the facilityQueueCount
property changes.
facilityQueueCountChanged_ :: Facility a -> Signal () Source #
Signal triggered when the facilityQueueCount
property changes.
facilityWaitTimeChanged :: Facility a -> Signal (SamplingStats Double) Source #
Signal triggered when the facilityTotalWaitTime
and facilityWaitTime
properties change.
facilityWaitTimeChanged_ :: Facility a -> Signal () Source #
Signal triggered when the facilityTotalWaitTime
and facilityWaitTime
properties change.
facilityHoldingTimeChanged :: Facility a -> Signal (SamplingStats Double) Source #
Signal triggered when the facilityTotalHoldingTime
and facilityHoldingTime
properties change.
facilityHoldingTimeChanged_ :: Facility a -> Signal () Source #
Signal triggered when the facilityTotalHoldingTime
and facilityHoldingTime
properties change.
facilityChanged_ :: Facility a -> Signal () Source #
Signal triggered when one of the facility counters changes.