Skip to main content

jacdac_rs/service/
packet_type.rs

1use alloc::vec::Vec;
2
3use super::reports::{ActionReport, EventReport};
4
5#[derive(Debug)]
6pub enum PacketType {
7    Command(CommandType),
8    Report(ReportType),
9}
10
11#[derive(Debug)]
12pub enum CommandType {
13    Action(u16),
14    ReadRegister(u16),
15    WriteRegister(u16, Vec<u8>),
16}
17
18#[derive(Debug)]
19pub enum ReportType {
20    Register(u16, Vec<u8>),
21    Actions(ActionReport),
22    Events(EventReport),
23}