kafka-device-joystick-1.0.2.1: 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 # 
Instance details

Defined in System.Hardware.Linux.Joystick

Ord Joystick Source # 
Instance details

Defined in System.Hardware.Linux.Joystick

Read Joystick Source # 
Instance details

Defined in System.Hardware.Linux.Joystick

Show Joystick Source # 
Instance details

Defined in System.Hardware.Linux.Joystick

Generic Joystick Source # 
Instance details

Defined in System.Hardware.Linux.Joystick

Associated Types

type Rep Joystick :: Type -> Type #

Methods

from :: Joystick -> Rep Joystick x #

to :: Rep Joystick x -> Joystick #

ToJSON Joystick Source # 
Instance details

Defined in System.Hardware.Linux.Joystick

FromJSON Joystick Source # 
Instance details

Defined in System.Hardware.Linux.Joystick

Binary Joystick Source # 
Instance details

Defined in System.Hardware.Linux.Joystick

Methods

put :: Joystick -> Put #

get :: Get Joystick #

putList :: [Joystick] -> Put #

Serialize Joystick Source # 
Instance details

Defined in System.Hardware.Linux.Joystick

type Rep Joystick Source # 
Instance details

Defined in System.Hardware.Linux.Joystick

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.