|
GamepadCodec Arduino Lib 1.0.1
|
Decoder class responsible for parsing gamepad input frames from a byte stream and updating the state tracker. More...
#include <gamepad_codec_decoder.h>
Public Member Functions | |
| Decoder (Stream &stream) noexcept | |
| Constructor. | |
| const gamepad::input::Tracker & | Update () noexcept |
| Update, need to be called in Loop. | |
| const gamepad::input::Tracker & | input_tracker () const noexcept |
| Get the input tracker object. | |
Decoder class responsible for parsing gamepad input frames from a byte stream and updating the state tracker.
Binds to a Stream (e.g., Serial) object. When Update() is called, it reads all available data, uses RobustFrame::Parser to synchronize frame boundaries, identifies the payload type (0x01), deserializes data into gamepad::input::State, and finally updates the internal Tracker.
Definition at line 31 of file gamepad_codec_decoder.h.
|
noexcept |
Constructor.
| [in] | stream | Reference to a Stream object for reading data byte stream. |
Definition at line 12 of file gamepad_codec_decoder.cpp.
|
inlinenoexcept |
Get the input tracker object.
This function returns a reference to the internal input tracker object.
Definition at line 67 of file gamepad_codec_decoder.h.
|
noexcept |
Update, need to be called in Loop.
Definition at line 14 of file gamepad_codec_decoder.cpp.