kafka-device-joystick-1.0.0.0: Linux joystick events via a Kafka message broker

Copyright(c) 2016-19 Brian W Bush
LicenseMIT
MaintainerBrian W Bush <code@functionally.io>
StabilityProduction
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

System.Hardware.Linux.Joystick

Contents

Description

Interpret events from a Linux joystick, which must conform to the Linux Joystick API <https://www.kernel.org/doc/Documentation/input/joystick-api.txt>.

Synopsis

Types and values

data Joystick Source #

Constructors

Joystick 

Fields

Instances

Eq Joystick Source # 
Ord Joystick Source # 
Read Joystick Source # 
Show Joystick Source # 
Generic Joystick Source # 

Associated Types

type Rep Joystick :: * -> * #

Methods

from :: Joystick -> Rep Joystick x #

to :: Rep Joystick x -> Joystick #

ToJSON Joystick Source # 
FromJSON Joystick Source # 
Binary Joystick Source # 

Methods

put :: Joystick -> Put #

get :: Get Joystick #

putList :: [Joystick] -> Put #

Serialize Joystick Source # 
type Rep Joystick Source # 

minValue :: Int Source #

The minimum for value.

maxValue :: Int Source #

The maximum for value.

byteLength :: Integral a => a Source #

The number of bytes in a joystick event.

Event handling

interpretJoystick Source #

Arguments

:: ByteString

The eight bytes.

-> Joystick

The corresponding joystick data.

Interpret Linux Joystick bytes accoding to <https://www.kernel.org/doc/Documentation/input/joystick-api.txt>.

readJoystick Source #

Arguments

:: FilePath

The joystick device, e.g., "/dev/input/js0".

-> IO [Joystick]

Action to read the joystick data.

Read a stream of joystick data.