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.
@param data pointer to a block of memory that will be passed to the
send/receive/flush method. This is optional (can be set to NULL)
@param 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.
@param recv Pointer to function used to receive osdp packet data
@param send Pointer to function used to send osdp packet data
@param flush Pointer to function used to flush the channel (optional)
Fields§
§data: *mut c_void§id: c_int§recv: osdp_read_fn_t§send: osdp_write_fn_t§flush: osdp_flush_fn_tTrait 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 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