|
|
|
|
| Synopsis |
|
| type Time = Double | | | data Params = Params {} | | | | | data Tx = Tx {} | | | | | data Rx = Rx {} | | | randomRng :: (Time, Time) -> IO Time | | | initTx :: Params -> IO Tx | | | initRclock :: Params -> IO Time | | | initRx :: Params -> IO Rx | | | tenv :: Tx -> IO Tx | | | tenc :: Tx -> IO Tx | | | tclock :: Params -> Tx -> Tx | | | txUpdate :: Params -> Tx -> IO Tx | | | rclock :: Params -> Rx -> IO Time | | | stable :: Params -> Rx -> Tx -> Bool | | | rdec :: Params -> Rx -> Tx -> Rx | | | rxUpdate :: Params -> Rx -> Tx -> IO Rx | | | transition :: Params -> (Rx, Tx) -> IO (Rx, Tx) | | | putLnState :: Integer -> (Rx, Tx) -> IO () | | | stopState :: Rx -> Bool | | | execToStopState :: Bool -> Params -> Integer -> (Rx, Tx) -> IO (Rx, Tx) | | | exec :: Bool -> Params -> Integer -> (Rx, Tx) -> IO (Rx, Tx) | | | startExec :: Bool -> Params -> Integer -> IO (Rx, Tx) | | | initState :: Params -> IO (Rx, Tx) |
|
|
| Documentation |
|
| type Time = Double |
|
| data Params |
| Realtime input parameters.
| | Constructors | | Params | | | tPeriod :: Time | Tx's clock period.
| | tSettle :: Time | Nominal signal settling time.
| | rScanMin :: Time | Rx's min scan duration.
| | rScanMax :: Time | Rx's max scan duration.
| | rSampMin :: Time | Rx's min sampling duration.
| | rSampMax :: Time | Rx's max sampling duration.
|
|
| Instances | |
|
|
| data TState |
| Constructors | | SendFirst | Sending the 1st datum;
| | SendSecond | Sending the 2nd.
|
| Instances | |
|
|
| data Tx |
| Constructors | | Tx | | | tstate :: TState | Tx's state.
| | tsignal :: Bool | Signal being sent.
| | tbit :: Bool | Encoded bit to be sent.
| | changing :: Bool | T: modulating the signal; F o/w.
| | tclk :: Time | Tx's timeout.
|
|
| Instances | |
|
|
| data RState |
| Constructors | | RcvFirst | Expecting the 1st datum;
| | RcvSecond | Expecting the 2nd.
|
| Instances | |
|
|
| data Rx |
| Constructors | | Rx | | | rstate :: RState | Rx's state.
| | rsignal :: Bool | Current datum being received.
| | rbit :: Bool | Decoded bit.
| | rclk :: Time | Rx's timeout.
| | synch :: Bool | Rx just transitioned from
RcvSecond to RcvFirst
(capturing a bit).
|
|
| Instances | |
|
|
| randomRng :: (Time, Time) -> IO Time |
|
| initTx :: Params -> IO Tx |
|
| initRclock :: Params -> IO Time |
|
| initRx :: Params -> IO Rx |
|
| tenv :: Tx -> IO Tx |
|
| tenc :: Tx -> IO Tx |
| The transmitter's encoder. Protocol-specific.
|
|
| tclock :: Params -> Tx -> Tx |
|
| txUpdate :: Params -> Tx -> IO Tx |
|
| rclock :: Params -> Rx -> IO Time |
| Correct update of rclk---helper
|
|
| stable :: Params -> Rx -> Tx -> Bool |
|
| rdec :: Params -> Rx -> Tx -> Rx |
| The receiver's decoder. Protocol-specific.
|
|
| rxUpdate :: Params -> Rx -> Tx -> IO Rx |
|
| transition :: Params -> (Rx, Tx) -> IO (Rx, Tx) |
| Full state transition.
|
|
| putLnState :: Integer -> (Rx, Tx) -> IO () |
|
| stopState :: Rx -> Bool |
| Defines a good stop state: tx has sent the 2nd
signal bit and rx has sampled it.
|
|
| execToStopState :: Bool -> Params -> Integer -> (Rx, Tx) -> IO (Rx, Tx) |
|
| exec :: Bool -> Params -> Integer -> (Rx, Tx) -> IO (Rx, Tx) |
| Exectuion of the protocol.
|
|
| startExec :: Bool -> Params -> Integer -> IO (Rx, Tx) |
| Begin a finite trace of length i from the initial
state. Either send one determined signal bit or a
series of nondeterministic signals.
|
|
| initState :: Params -> IO (Rx, Tx) |
| The initial state.
|
|
| Produced by Haddock version 2.4.2 |