ContentsIndex
Biphase
Synopsis
type Time = Double
data Params = Params {
tPeriod :: Time
tSettle :: Time
rScanMin :: Time
rScanMax :: Time
rSampMin :: Time
rSampMax :: Time
}
data TState
= SendFirst
| SendSecond
data Tx = Tx {
tstate :: TState
tsignal :: Bool
tbit :: Bool
changing :: Bool
tclk :: Time
}
data RState
= RcvFirst
| RcvSecond
data Rx = Rx {
rstate :: RState
rsignal :: Bool
rbit :: Bool
rclk :: Time
synch :: Bool
}
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 :: TimeTx's clock period.
tSettle :: TimeNominal signal settling time.
rScanMin :: TimeRx's min scan duration.
rScanMax :: TimeRx's max scan duration.
rSampMin :: TimeRx's min sampling duration.
rSampMax :: TimeRx's max sampling duration.
show/hide Instances
Eq Params
Show Params
data TState
Constructors
SendFirstSending the 1st datum;
SendSecondSending the 2nd.
show/hide Instances
Eq TState
Show TState
data Tx
Constructors
Tx
tstate :: TStateTx's state.
tsignal :: BoolSignal being sent.
tbit :: BoolEncoded bit to be sent.
changing :: BoolT: modulating the signal; F o/w.
tclk :: TimeTx's timeout.
show/hide Instances
Eq Tx
Show Tx
data RState
Constructors
RcvFirstExpecting the 1st datum;
RcvSecondExpecting the 2nd.
show/hide Instances
Eq RState
Show RState
data Rx
Constructors
Rx
rstate :: RStateRx's state.
rsignal :: BoolCurrent datum being received.
rbit :: BoolDecoded bit.
rclk :: TimeRx's timeout.
synch :: BoolRx just transitioned from RcvSecond to RcvFirst (capturing a bit).
show/hide Instances
Eq Rx
Show 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
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