| Copyright | (c) 2016-17 Brian W Bush |
|---|---|
| License | MIT |
| Maintainer | Brian W Bush <consult@brianwbush.info> |
| Stability | Experimental |
| Portability | Stable |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.UI.Kafka.Interpretation
Description
Interpret user-interfaces events on Kafka topics.
- data Interpretation a = TrackInterpretation {
- kafka :: TopicConnection
- sensor :: Sensor
- path :: FilePath
- xAxis :: AxisInterpretation a
- yAxis :: AxisInterpretation a
- zAxis :: AxisInterpretation a
- phiAxis :: AxisInterpretation a
- thetaAxis :: AxisInterpretation a
- psiAxis :: AxisInterpretation a
- location :: V3 a
- orientation :: V3 a
- flying :: Bool
- resetButton :: Maybe Int
- data AxisInterpretation a = AxisInterpretation {
- axisNumber :: Int
- threshold :: Maybe a
- increment :: a
- lowerBound :: Maybe a
- upperBound :: Maybe a
- type AnalogHandler a b = b -> Maybe (Int, a)
- type ButtonHandler a b = b -> Maybe (Int, Bool)
- interpretationLoop :: (Conjugate a, Epsilon a, Num a, Ord a, RealFloat a) => AnalogHandler a b -> ButtonHandler a b -> Interpretation a -> IO b -> IO (ExitAction, LoopAction)
Types
data Interpretation a Source #
Instructions for interpreting user-interface events from Kafka.
Constructors
| TrackInterpretation | |
Fields
| |
Instances
| Eq a => Eq (Interpretation a) Source # | |
| Read a => Read (Interpretation a) Source # | |
| Show a => Show (Interpretation a) Source # | |
| Generic (Interpretation a) Source # | |
| ToJSON a => ToJSON (Interpretation a) Source # | |
| FromJSON a => FromJSON (Interpretation a) Source # | |
| type Rep (Interpretation a) Source # | |
data AxisInterpretation a Source #
Instructions for interpreting an axis.
Constructors
| AxisInterpretation | |
Fields
| |
Instances
| Eq a => Eq (AxisInterpretation a) Source # | |
| Read a => Read (AxisInterpretation a) Source # | |
| Show a => Show (AxisInterpretation a) Source # | |
| Generic (AxisInterpretation a) Source # | |
| ToJSON a => ToJSON (AxisInterpretation a) Source # | |
| FromJSON a => FromJSON (AxisInterpretation a) Source # | |
| type Rep (AxisInterpretation a) Source # | |
type AnalogHandler a b = b -> Maybe (Int, a) Source #
How to handle raw analog events.
Event handling
Arguments
| :: (Conjugate a, Epsilon a, Num a, Ord a, RealFloat a) | |
| => AnalogHandler a b | How to handle raw analog events. |
| -> ButtonHandler a b | How to handle raw button events. |
| -> Interpretation a | The interpretation. |
| -> IO b | Action for getting the next raw event. |
| -> IO (ExitAction, LoopAction) | Action to create the exit and loop actions. |
Repeatedly interpret events.