Documentation
Application Commands
LibOSDP exposes the following structures through osdp.h. The following unionwrapper is used for all commands:
struct osdp_cmd {
enum osdp_cmd_e id; // Command ID. Used to select specific command in union
union {
struct osdp_cmd_led led;
struct osdp_cmd_buzzer buzzer;
struct osdp_cmd_text text;
struct osdp_cmd_output output;
struct osdp_cmd_comset comset;
struct osdp_cmd_keyset keyset;
struct osdp_cmd_mfg mfg;
struct osdp_cmd_file_tx file_tx;
struct osdp_status_report status;
};
};
Below are the structures for each command type.
LED Command
LED params sub-structure. Part of LED command. See osdp_cmd_led.
uint8_t control_codeuint8_t on_countuint8_t off_countuint8_t on_coloruint8_t off_coloruint16_t timer_countSent from CP to PD to control the behaviour of it's on-board LEDs.
uint8_t readeruint8_t led_numberstruct osdp_cmd_led_params temporarystruct osdp_cmd_led_params permanentBuzzer Command
Sent from CP to control the behaviour of a buzzer in the PD.
uint8_t readeruint8_t control_codeuint8_t on_countuint8_t off_countuint8_t rep_countText Command
Command to manipulate any display units that the PD supports.
uint8_t readeruint8_t control_codeuint8_t temp_timeuint8_t offset_rowuint8_t offset_coluint8_t lengthuint8_t dataOutput Command
Command sent from CP to Control digital output of PD.
uint8_t output_nouint8_t control_codeuint16_t timer_countComset Command
Sent in response to a COMSET command. Set communication parameters to PD. Must be stored in PD non-volatile memory.
uint8_t addressuint32_t baud_rateKeyset Command
This command transfers an encryption key from the CP to a PD.
uint8_t typeuint8_t lengthuint8_t dataManufacturer Specific Command
Manufacturer Specific Commands.
uint32_t vendor_codeuint8_t datauint8_t lengthFile Transfer Command
File transfer start command.
int iduint32_t flagsStatus Report Command
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