libosdp_sys

Struct osdp_pd_info_t

Source
#[repr(C)]
pub struct osdp_pd_info_t { pub name: *const c_char, pub baud_rate: c_int, pub address: c_int, pub flags: c_int, pub id: osdp_pd_id, pub cap: *const osdp_pd_cap, pub channel: osdp_channel, pub scbk: *const u8, }
Expand description

@brief OSDP PD Information. This struct is used to describe a PD to LibOSDP.

Fields§

§name: *const c_char

User provided name for this PD (log messages include this name)

§baud_rate: c_int

Can be one of 9600/19200/38400/57600/115200/230400

§address: c_int

7 bit PD address. the rest of the bits are ignored. The special address 0x7F is used for broadcast. So there can be 2^7-1 devices on a multi-drop channel

§flags: c_int

Used to modify the way the context is setup. See OSDP_FLAG_* macros.

§id: osdp_pd_id

Static information that the PD reports to the CP when it received a CMD_ID. These information must be populated by a PD application.

§cap: *const osdp_pd_cap

This is a pointer to an array of structures containing the PD’ capabilities. Use { -1, 0, 0 } to terminate the array. This is used only PD mode of operation

§channel: osdp_channel

Communication channel ops structure, containing send/recv function pointers

§scbk: *const u8

Pointer to 16 bytes of Secure Channel Base Key for the PD. If non-null, this is used to set-up the secure channel.

Trait Implementations§

Source§

impl Clone for osdp_pd_info_t

Source§

fn clone(&self) -> osdp_pd_info_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for osdp_pd_info_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for osdp_pd_info_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.