Struct libosdp_sys::osdp_channel
source · #[repr(C)]pub struct osdp_channel {
pub data: *mut c_void,
pub id: c_int,
pub recv: osdp_read_fn_t,
pub send: osdp_write_fn_t,
pub flush: osdp_flush_fn_t,
}Expand description
@brief User defined communication channel abstraction for OSDP devices. The methods for read/write/flush are expected to be non-blocking.
Fields§
§data: *mut c_voidpointer to a block of memory that will be passed to the send/receive/flush method. This is optional (can be set to NULL)
id: c_intchannel_id; On multi-drop networks, more than one PD can share the
same channel (read/write/flush pointers). On such networks, the
channel_id is used to lock a PD to a channel. On multi-drop
networks, this id must non-zero and be unique for each bus.
recv: osdp_read_fn_tPointer to function used to receive osdp packet data
send: osdp_write_fn_tPointer to function used to send osdp packet data
flush: osdp_flush_fn_tPointer to function used to flush the channel (optional)
Trait Implementations§
source§impl Clone for osdp_channel
impl Clone for osdp_channel
source§fn clone(&self) -> osdp_channel
fn clone(&self) -> osdp_channel
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for osdp_channel
impl Debug for osdp_channel
impl Copy for osdp_channel
Auto Trait Implementations§
impl Freeze for osdp_channel
impl RefUnwindSafe for osdp_channel
impl !Send for osdp_channel
impl !Sync for osdp_channel
impl Unpin for osdp_channel
impl UnwindSafe for osdp_channel
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