The controller abstracts away over controller state at specific points and allows to detect when a button is pressed or released. It also combines the X and Y axis for each stick into a coordinate and turns the triggers into values in [0, 1].
A basic abstraction over the byte representation of the controller state. Allows accessing the state with the Button and Axis enums.
A trait that takes controller values and updates a state, sends them over a network or does whatever with them.
Takes a sink where controller updates will be put. Controller values are read from the HIDAPI. This function takes care of waiting for a controller to connect and automatically reconnects if the controller is disconnected.