pub type osdp_write_fn_t = Option<unsafe extern "C" fn(data: *mut c_void, buf: *mut u8, len: c_int) -> c_int>;Expand description
@brief pointer to function that sends byte array into some channel. This function should be non-blocking.
@param data for use by underlying layers. osdp_channel::data is passed
@param buf byte array to be sent
@param len number of bytes in buf
@retval +ve: number of bytes sent. must be <= len
@retval -ve on errors
@note For now, LibOSDP expects method to write/queue all or no bytes over the channel per-invocation; ie., it does not support partial writes and is a known limitation. Since an OSDP packet isn’t so large, and typical TX buffers are much larger than that, it’s not as bad as it sounds and hence not on the priority list to be fixed.
Aliased Type§
enum osdp_write_fn_t {
None,
Some(unsafe extern "C" fn(_: *mut c_void, _: *mut u8, _: i32) -> i32),
}