Documentation
Application Events
LibOSDP event structure reference — the osdp_event data structures a peripheral device uses to report card reads, key presses, and status to the CP.
LibOSDP exposes the following structures through osdp.h. The following union wrapper is used for all events:
struct osdp_event {
enum osdp_event_type type; // Used to select specific event in union
union {
struct osdp_event_keypress keypress;
struct osdp_event_cardread cardread;
struct osdp_event_mfgrep mfgrep;
struct osdp_status_report status;
};
};
Below are the structures for each event type. They are delivered to the CP with osdp_pd_submit_event.
Key Press Event
OSDP Event Keypad.
int reader_noint lengthuint8_t dataCard Read Event
OSDP event cardread.
int reader_noenum osdp_event_cardread_format_e formatint directionint lengthuint8_t dataManufacturer Specific Reply Event
OSDP Event Manufacturer Specific Command.
uint32_t vendor_codeuint8_t lengthuint8_t dataStatus Report Request Event
Status report structure. Used by OSDP_CMD_STATUS and OSDP_EVENT_STATUS. In case of command, it is used to send a query to the PD while in the case of events, the PD responds back with this structure.
enum osdp_status_report_type typeint nr_entriesuint8_t reportOSDP Status report types.
OSDP_STATUS_REPORT_INPUTOSDP_STATUS_REPORT_OUTPUTOSDP_STATUS_REPORT_LOCALOSDP_STATUS_REPORT_REMOTE