3#ifndef _GAMEPAD_CODEC_DECODER_H_
4#define _GAMEPAD_CODEC_DECODER_H_
9#include "gamepad_input_tracker.h"
10#include "robust_frame.h"
16namespace gamepad::codec {
43 Decoder(Stream &stream)
noexcept;
53 const gamepad::input::Tracker &
Update()
noexcept;
67 const gamepad::input::Tracker &
input_tracker() const noexcept {
return input_tracker_; }
73 void OnFrame(
const uint8_t *data,
size_t data_length);
76 robust_frame::Parser parser_;
77 gamepad::input::Tracker input_tracker_;
Decoder class responsible for parsing gamepad input frames from a byte stream and updating the state ...
Decoder(Stream &stream) noexcept
Constructor.
const gamepad::input::Tracker & input_tracker() const noexcept
Get the input tracker object.
const gamepad::input::Tracker & Update() noexcept
Update, need to be called in Loop.