Trait hid_io_protocol::commands::Commands[][src]

pub trait Commands<H: ArrayLength<u8>, ID: ArrayLength<HidIoCommandId> + ArrayLength<u8>> where
    H: Debug + Sub<B1> + Sub<U4>, 
{ fn tx_packetbuffer_send(
        &mut self,
        buf: &mut HidIoPacketBuffer<H>
    ) -> Result<(), CommandError>; fn supported_id(&self, _id: HidIoCommandId) -> bool { ... }
fn default_packet_chunk(&self) -> u32 { ... }
fn empty_ack(&mut self, id: HidIoCommandId) -> Result<(), CommandError> { ... }
fn empty_nak(&mut self, id: HidIoCommandId) -> Result<(), CommandError> { ... }
fn byte_ack(
        &mut self,
        id: HidIoCommandId,
        byte: u8
    ) -> Result<(), CommandError> { ... }
fn byte_nak(
        &mut self,
        id: HidIoCommandId,
        byte: u8
    ) -> Result<(), CommandError> { ... }
fn short_ack(
        &mut self,
        id: HidIoCommandId,
        val: u16
    ) -> Result<(), CommandError> { ... }
fn short_nak(
        &mut self,
        id: HidIoCommandId,
        val: u16
    ) -> Result<(), CommandError> { ... }
fn rx_message_handling(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError>
    where
        <H as Sub<B1>>::Output: ArrayLength<u8>,
        <H as Sub<U4>>::Output: ArrayLength<u8>
, { ... }
fn h0000_supported_ids(&mut self, _data: Cmd) -> Result<(), CommandError> { ... }
fn h0000_supported_ids_cmd(&mut self, _data: Cmd) -> Result<Ack<ID>, Nak> { ... }
fn h0000_supported_ids_ack(
        &mut self,
        _data: Ack<ID>
    ) -> Result<(), CommandError> { ... }
fn h0000_supported_ids_nak(
        &mut self,
        _data: Nak
    ) -> Result<(), CommandError> { ... }
fn h0000_supported_ids_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h0001_info(&mut self, data: Cmd) -> Result<(), CommandError> { ... }
fn h0001_info_cmd(&mut self, _data: Cmd) -> Result<Ack<Sub1<H>>, Nak>
    where
        <H as Sub<B1>>::Output: ArrayLength<u8>
, { ... }
fn h0001_info_ack(
        &mut self,
        _data: Ack<Sub1<H>>
    ) -> Result<(), CommandError>
    where
        <H as Sub<B1>>::Output: ArrayLength<u8>
, { ... }
fn h0001_info_nak(&mut self, _data: Nak) -> Result<(), CommandError> { ... }
fn h0001_info_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError>
    where
        <H as Sub<B1>>::Output: ArrayLength<u8>
, { ... }
fn h0002_test(&mut self, data: Cmd<H>, na: bool) -> Result<(), CommandError> { ... }
fn h0002_test_cmd(&mut self, _data: Cmd<H>) -> Result<Ack<H>, Nak> { ... }
fn h0002_test_nacmd(&mut self, _data: Cmd<H>) -> Result<(), CommandError> { ... }
fn h0002_test_ack(&mut self, _data: Ack<H>) -> Result<(), CommandError> { ... }
fn h0002_test_nak(&mut self, _data: Nak) -> Result<(), CommandError> { ... }
fn h0002_test_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h0003_resethidio(&mut self, _data: Cmd) -> Result<(), CommandError> { ... }
fn h0003_resethidio_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak> { ... }
fn h0003_resethidio_ack(&mut self, _data: Ack) -> Result<(), CommandError> { ... }
fn h0003_resethidio_nak(&mut self, _data: Nak) -> Result<(), CommandError> { ... }
fn h0003_resethidio_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h0016_flashmode(&mut self, _data: Cmd) -> Result<(), CommandError> { ... }
fn h0016_flashmode_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak> { ... }
fn h0016_flashmode_ack(&mut self, _data: Ack) -> Result<(), CommandError> { ... }
fn h0016_flashmode_nak(&mut self, _data: Nak) -> Result<(), CommandError> { ... }
fn h0016_flashmode_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h0017_unicodetext(
        &mut self,
        data: Cmd<H>,
        na: bool
    ) -> Result<(), CommandError> { ... }
fn h0017_unicodetext_cmd(&mut self, _data: Cmd<H>) -> Result<Ack, Nak> { ... }
fn h0017_unicodetext_nacmd(
        &mut self,
        _data: Cmd<H>
    ) -> Result<(), CommandError> { ... }
fn h0017_unicodetext_ack(&mut self, _data: Ack) -> Result<(), CommandError> { ... }
fn h0017_unicodetext_nak(&mut self, _data: Nak) -> Result<(), CommandError> { ... }
fn h0017_unicodetext_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h0018_unicodestate(
        &mut self,
        data: Cmd<H>,
        na: bool
    ) -> Result<(), CommandError> { ... }
fn h0018_unicodestate_cmd(&mut self, _data: Cmd<H>) -> Result<Ack, Nak> { ... }
fn h0018_unicodestate_nacmd(
        &mut self,
        _data: Cmd<H>
    ) -> Result<(), CommandError> { ... }
fn h0018_unicodestate_ack(&mut self, _data: Ack) -> Result<(), CommandError> { ... }
fn h0018_unicodestate_nak(&mut self, _data: Nak) -> Result<(), CommandError> { ... }
fn h0018_unicodestate_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h001a_sleepmode(&mut self, _data: Cmd) -> Result<(), CommandError> { ... }
fn h001a_sleepmode_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak> { ... }
fn h001a_sleepmode_ack(&mut self, _data: Ack) -> Result<(), CommandError> { ... }
fn h001a_sleepmode_nak(&mut self, _data: Nak) -> Result<(), CommandError> { ... }
fn h001a_sleepmode_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h0031_terminalcmd(
        &mut self,
        data: Cmd<H>,
        na: bool
    ) -> Result<(), CommandError> { ... }
fn h0031_terminalcmd_cmd(&mut self, _data: Cmd<H>) -> Result<Ack, Nak> { ... }
fn h0031_terminalcmd_nacmd(
        &mut self,
        _data: Cmd<H>
    ) -> Result<(), CommandError> { ... }
fn h0031_terminalcmd_ack(&mut self, _data: Ack) -> Result<(), CommandError> { ... }
fn h0031_terminalcmd_nak(&mut self, _data: Nak) -> Result<(), CommandError> { ... }
fn h0031_terminalcmd_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h0034_terminalout(
        &mut self,
        data: Cmd<H>,
        na: bool
    ) -> Result<(), CommandError> { ... }
fn h0034_terminalout_cmd(&mut self, _data: Cmd<H>) -> Result<Ack, Nak> { ... }
fn h0034_terminalout_nacmd(
        &mut self,
        _data: Cmd<H>
    ) -> Result<(), CommandError> { ... }
fn h0034_terminalout_ack(&mut self, _data: Ack) -> Result<(), CommandError> { ... }
fn h0034_terminalout_nak(&mut self, _data: Nak) -> Result<(), CommandError> { ... }
fn h0034_terminalout_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h0050_manufacturing(&mut self, data: Cmd) -> Result<(), CommandError> { ... }
fn h0050_manufacturing_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak> { ... }
fn h0050_manufacturing_ack(
        &mut self,
        _data: Ack
    ) -> Result<(), CommandError> { ... }
fn h0050_manufacturing_nak(
        &mut self,
        _data: Nak
    ) -> Result<(), CommandError> { ... }
fn h0050_manufacturing_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError> { ... }
fn h0051_manufacturingres(
        &mut self,
        data: Cmd<Diff<H, U4>>
    ) -> Result<(), CommandError>
    where
        <H as Sub<U4>>::Output: ArrayLength<u8>
, { ... }
fn h0051_manufacturingres_cmd(
        &mut self,
        _data: Cmd<Diff<H, U4>>
    ) -> Result<Ack, Nak>
    where
        <H as Sub<U4>>::Output: ArrayLength<u8>
, { ... }
fn h0051_manufacturingres_ack(
        &mut self,
        _data: Ack
    ) -> Result<(), CommandError> { ... }
fn h0051_manufacturingres_nak(
        &mut self,
        _data: Nak
    ) -> Result<(), CommandError> { ... }
fn h0051_manufacturingres_handler(
        &mut self,
        buf: HidIoPacketBuffer<H>
    ) -> Result<(), CommandError>
    where
        <H as Sub<U4>>::Output: ArrayLength<u8>
, { ... } }

HID-IO Command Interface H - Max data payload length (HidIoPacketBuffer) ID - Max number of HidIoCommandIds

Required methods

fn tx_packetbuffer_send(
    &mut self,
    buf: &mut HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

Given a HidIoPacketBuffer serialize (and resulting send bytes)

Loading content...

Provided methods

fn supported_id(&self, _id: HidIoCommandId) -> bool[src]

Check if id is valid for this interface (By default support all ids)

fn default_packet_chunk(&self) -> u32[src]

Default packet chunk (Usual chunk sizes are 63 or 64)

fn empty_ack(&mut self, id: HidIoCommandId) -> Result<(), CommandError>[src]

Simple empty ack

fn empty_nak(&mut self, id: HidIoCommandId) -> Result<(), CommandError>[src]

Simple empty nak

fn byte_ack(&mut self, id: HidIoCommandId, byte: u8) -> Result<(), CommandError>[src]

Simple byte ack

fn byte_nak(&mut self, id: HidIoCommandId, byte: u8) -> Result<(), CommandError>[src]

Simple byte nak

fn short_ack(
    &mut self,
    id: HidIoCommandId,
    val: u16
) -> Result<(), CommandError>
[src]

Simple short ack (16-bit)

fn short_nak(
    &mut self,
    id: HidIoCommandId,
    val: u16
) -> Result<(), CommandError>
[src]

Simple short nak (16-bit)

fn rx_message_handling(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError> where
    <H as Sub<B1>>::Output: ArrayLength<u8>,
    <H as Sub<U4>>::Output: ArrayLength<u8>, 
[src]

Process specific packet types Handles matching to interface functions

fn h0000_supported_ids(&mut self, _data: Cmd) -> Result<(), CommandError>[src]

fn h0000_supported_ids_cmd(&mut self, _data: Cmd) -> Result<Ack<ID>, Nak>[src]

fn h0000_supported_ids_ack(
    &mut self,
    _data: Ack<ID>
) -> Result<(), CommandError>
[src]

fn h0000_supported_ids_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0000_supported_ids_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h0001_info(&mut self, data: Cmd) -> Result<(), CommandError>[src]

fn h0001_info_cmd(&mut self, _data: Cmd) -> Result<Ack<Sub1<H>>, Nak> where
    <H as Sub<B1>>::Output: ArrayLength<u8>, 
[src]

fn h0001_info_ack(&mut self, _data: Ack<Sub1<H>>) -> Result<(), CommandError> where
    <H as Sub<B1>>::Output: ArrayLength<u8>, 
[src]

fn h0001_info_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0001_info_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError> where
    <H as Sub<B1>>::Output: ArrayLength<u8>, 
[src]

fn h0002_test(&mut self, data: Cmd<H>, na: bool) -> Result<(), CommandError>[src]

fn h0002_test_cmd(&mut self, _data: Cmd<H>) -> Result<Ack<H>, Nak>[src]

fn h0002_test_nacmd(&mut self, _data: Cmd<H>) -> Result<(), CommandError>[src]

fn h0002_test_ack(&mut self, _data: Ack<H>) -> Result<(), CommandError>[src]

fn h0002_test_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0002_test_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h0003_resethidio(&mut self, _data: Cmd) -> Result<(), CommandError>[src]

fn h0003_resethidio_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak>[src]

fn h0003_resethidio_ack(&mut self, _data: Ack) -> Result<(), CommandError>[src]

fn h0003_resethidio_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0003_resethidio_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h0016_flashmode(&mut self, _data: Cmd) -> Result<(), CommandError>[src]

fn h0016_flashmode_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak>[src]

fn h0016_flashmode_ack(&mut self, _data: Ack) -> Result<(), CommandError>[src]

fn h0016_flashmode_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0016_flashmode_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h0017_unicodetext(
    &mut self,
    data: Cmd<H>,
    na: bool
) -> Result<(), CommandError>
[src]

fn h0017_unicodetext_cmd(&mut self, _data: Cmd<H>) -> Result<Ack, Nak>[src]

fn h0017_unicodetext_nacmd(&mut self, _data: Cmd<H>) -> Result<(), CommandError>[src]

fn h0017_unicodetext_ack(&mut self, _data: Ack) -> Result<(), CommandError>[src]

fn h0017_unicodetext_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0017_unicodetext_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h0018_unicodestate(
    &mut self,
    data: Cmd<H>,
    na: bool
) -> Result<(), CommandError>
[src]

fn h0018_unicodestate_cmd(&mut self, _data: Cmd<H>) -> Result<Ack, Nak>[src]

fn h0018_unicodestate_nacmd(
    &mut self,
    _data: Cmd<H>
) -> Result<(), CommandError>
[src]

fn h0018_unicodestate_ack(&mut self, _data: Ack) -> Result<(), CommandError>[src]

fn h0018_unicodestate_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0018_unicodestate_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h001a_sleepmode(&mut self, _data: Cmd) -> Result<(), CommandError>[src]

fn h001a_sleepmode_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak>[src]

fn h001a_sleepmode_ack(&mut self, _data: Ack) -> Result<(), CommandError>[src]

fn h001a_sleepmode_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h001a_sleepmode_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h0031_terminalcmd(
    &mut self,
    data: Cmd<H>,
    na: bool
) -> Result<(), CommandError>
[src]

fn h0031_terminalcmd_cmd(&mut self, _data: Cmd<H>) -> Result<Ack, Nak>[src]

fn h0031_terminalcmd_nacmd(&mut self, _data: Cmd<H>) -> Result<(), CommandError>[src]

fn h0031_terminalcmd_ack(&mut self, _data: Ack) -> Result<(), CommandError>[src]

fn h0031_terminalcmd_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0031_terminalcmd_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h0034_terminalout(
    &mut self,
    data: Cmd<H>,
    na: bool
) -> Result<(), CommandError>
[src]

fn h0034_terminalout_cmd(&mut self, _data: Cmd<H>) -> Result<Ack, Nak>[src]

fn h0034_terminalout_nacmd(&mut self, _data: Cmd<H>) -> Result<(), CommandError>[src]

fn h0034_terminalout_ack(&mut self, _data: Ack) -> Result<(), CommandError>[src]

fn h0034_terminalout_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0034_terminalout_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h0050_manufacturing(&mut self, data: Cmd) -> Result<(), CommandError>[src]

fn h0050_manufacturing_cmd(&mut self, _data: Cmd) -> Result<Ack, Nak>[src]

fn h0050_manufacturing_ack(&mut self, _data: Ack) -> Result<(), CommandError>[src]

fn h0050_manufacturing_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0050_manufacturing_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError>
[src]

fn h0051_manufacturingres(
    &mut self,
    data: Cmd<Diff<H, U4>>
) -> Result<(), CommandError> where
    <H as Sub<U4>>::Output: ArrayLength<u8>, 
[src]

fn h0051_manufacturingres_cmd(
    &mut self,
    _data: Cmd<Diff<H, U4>>
) -> Result<Ack, Nak> where
    <H as Sub<U4>>::Output: ArrayLength<u8>, 
[src]

fn h0051_manufacturingres_ack(&mut self, _data: Ack) -> Result<(), CommandError>[src]

fn h0051_manufacturingres_nak(&mut self, _data: Nak) -> Result<(), CommandError>[src]

fn h0051_manufacturingres_handler(
    &mut self,
    buf: HidIoPacketBuffer<H>
) -> Result<(), CommandError> where
    <H as Sub<U4>>::Output: ArrayLength<u8>, 
[src]

Loading content...

Implementors

Loading content...