MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ parse_hid_report()

InputValue MayaFlux::Core::HIDBackend::parse_hid_report ( uint32_t  device_id,
std::span< const uint8_t >  report 
)
private

Definition at line 463 of file HIDBackend.cpp.

464{
465 InputValue value;
466 value.type = InputValue::Type::BYTES;
467 value.data = std::vector<uint8_t>(report.begin(), report.end());
468 value.timestamp_ns = static_cast<uint64_t>(
469 std::chrono::steady_clock::now().time_since_epoch().count());
470 value.device_id = device_id;
471 value.source_type = InputType::HID;
472 return value;
473}
@ HID
Generic HID devices (game controllers, custom hardware)
@ BYTES
Raw byte data (HID reports, sysex)

References MayaFlux::Core::InputValue::BYTES, MayaFlux::Core::InputValue::data, MayaFlux::Core::InputValue::device_id, MayaFlux::Core::HID, MayaFlux::Core::InputValue::source_type, MayaFlux::Core::InputValue::timestamp_ns, and MayaFlux::Core::InputValue::type.

Referenced by poll_device().

+ Here is the caller graph for this function: