Documentation

PD Info

osdp_pd_info_t is a user-provided structure that describes how the PD is tobe set up. In CP mode, the app describes the PDs it wants to communicate withusing an array of osdp_pd_info_t structures.

structosdp_pd_info_t

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

Members
const char * name
User provided name for this PD (log messages include this name)
int baud_rate
Can be one of 9600/19200/38400/57600/115200/230400
int address
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
int flags
Used to modify the way the context is setup. See OSDP_FLAG_* macros.
struct osdp_pd_id 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.
const struct osdp_pd_cap * 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
const uint8_t * scbk
Pointer to 16 bytes of Secure Channel Base Key for the PD. If non-null, this is used to set-up the secure channel.

Setup Flags

OSDP setup in CP or PD mode can be influenced by the following flags (set inosdp_pd_info_t::flags). Some are effective only in CP or PD mode — seeindividual flag documentation below.

defineOSDP_FLAG_ENFORCE_SECURE
0x00010000

OSDP setup flags. See osdp_pd_info_t::flags.

defineOSDP_FLAG_INSTALL_MODE
0x00020000

When set, the PD would allow one session of secure channel to be setup with SCBK-D.

defineOSDP_FLAG_IGN_UNSOLICITED
0x00040000

When set, CP will not error and fail when the PD sends an unknown, unsolicited response (in response to osdp_POLL command).

defineOSDP_FLAG_ENABLE_NOTIFICATION
0x00080000

Enable LibOSDP-synthesized notifications - osdp_notification - to be reported to the application.

defineOSDP_FLAG_CAPTURE_PACKETS
0x00100000

Capture raw osdp packets as seen by this device to a pcap file. LibOSDP must be built with OPT_OSDP_PACKET_TRACE or OPT_OSDP_DATA_TRACE for this flag to be in effect.

defineOSDP_FLAG_ALLOW_EMPTY_ENCRYPTED_DATA_BLOCK
0x00200000

Allow an empty encrypted data block(SCS_17 and SCS_18 packets). This is non-conforming to the standard. If there is no data to be transferred, the CP should instead use the SCS_15/SCS_16 messages. Some OSDP implementations are buggy and send a 0-length data block with the SCS_17 and SCS_18 messages, this flag accepts that buggy behavior.

Doxygen entry not found: define::OSDP_FLAG_APP_OWNED_CMD_EVENT_DATA
Info

OSDP_FLAG_APP_OWNED_CMD_EVENT_DATA is effective only when LibOSDP is usedwith app-owned queue payload semantics (the default behavior).