Type Alias libosdp_sys::pd_command_callback_t
source · pub type pd_command_callback_t = Option<unsafe extern "C" fn(arg: *mut c_void, cmd: *mut osdp_cmd) -> c_int>;Expand description
@brief Callback for PD command notifications. After it has been registered
with osdp_pd_set_command_callback, this method is invoked when the PD
receives a command from the CP.
@param arg pointer that will was passed to the arg param of
osdp_pd_set_command_callback.
@param cmd pointer to the received command.
@retval 0 if LibOSDP must send a osdp_ACK response
@retval -ve if LibOSDP must send a osdp_NAK response
@retval +ve and modify the passed struct osdp_cmd *cmd if LibOSDP must
send a specific response. This is useful for sending manufacturer specific
reply osdp_MFGREP.
Aliased Type§
enum pd_command_callback_t {
None,
Some(unsafe extern "C" fn(_: *mut c_void, _: *mut osdp_cmd) -> i32),
}