pub struct ProtocolPacketHandler<'a> { /* private fields */ }Implementations§
Source§impl<'a> ProtocolPacketHandler<'a>
impl<'a> ProtocolPacketHandler<'a>
pub fn new(port_handler: &'a mut PortHandler) -> Self
pub fn sts_makeword(&self, a: u8, b: u8) -> u16
pub fn sts_makedword(&self, a: u16, b: u16) -> u32
pub fn sts_lobyte(&self, w: u16) -> u8
pub fn sts_hibyte(&self, w: u16) -> u8
pub fn sts_loword(&self, l: u32) -> u16
pub fn sts_hiword(&self, h: u32) -> u16
pub fn sts_tohost(&self, a: u16, b: u8) -> i16
pub fn tx_packet(&mut self, txpacket: &mut Vec<u8>) -> CommResult
pub fn rx_packet(&mut self) -> (Vec<u8>, CommResult)
pub fn tx_rx_packet( &mut self, txpacket: &mut Vec<u8>, ) -> (Option<Vec<u8>>, CommResult, u8)
pub fn ping(&mut self, sts_id: u8) -> (u16, CommResult, u8)
pub fn read_tx_rx( &mut self, sts_id: u8, address: u8, length: u8, ) -> (Vec<u8>, CommResult, u8)
pub fn read_1byte_tx_rx( &mut self, sts_id: u8, address: u8, ) -> (u8, CommResult, u8)
pub fn read_2byte_tx_rx( &mut self, sts_id: u8, address: u8, ) -> (u16, CommResult, u8)
pub fn write_tx_rx( &mut self, sts_id: u8, address: u8, data: &[u8], ) -> (CommResult, u8)
pub fn write_tx_only( &mut self, sts_id: u8, address: u8, data: &[u8], ) -> CommResult
pub fn write_1byte_tx_only( &mut self, sts_id: u8, address: u8, data: u8, ) -> CommResult
pub fn write_1byte_tx_rx( &mut self, sts_id: u8, address: u8, data: u8, ) -> (CommResult, u8)
pub fn write_2byte_tx_only( &mut self, sts_id: u8, address: u8, data: u16, ) -> CommResult
pub fn write_2byte_tx_rx( &mut self, sts_id: u8, address: u8, data: u16, ) -> (CommResult, u8)
pub fn sync_write_tx_only( &mut self, start_address: u8, data_length: u8, param: &[u8], ) -> CommResult
pub fn sync_read_tx( &mut self, start_address: u8, data_length: u8, param: &[u8], ) -> CommResult
pub fn sync_read_rx( &mut self, data_length: usize, param_length: usize, ) -> (CommResult, Vec<u8>)
Auto Trait Implementations§
impl<'a> Freeze for ProtocolPacketHandler<'a>
impl<'a> !RefUnwindSafe for ProtocolPacketHandler<'a>
impl<'a> Send for ProtocolPacketHandler<'a>
impl<'a> !Sync for ProtocolPacketHandler<'a>
impl<'a> Unpin for ProtocolPacketHandler<'a>
impl<'a> !UnwindSafe for ProtocolPacketHandler<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more