Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
osdp.h File Reference
#include <zephyr.h>
#include <stdint.h>
#include <sys/slist.h>

Go to the source code of this file.

Data Structures

struct  osdp_cmd_output
 Command sent from CP to Control digital output of PD. More...
 
struct  osdp_cmd_led_params
 LED params sub-structure. Part of LED command. See struct osdp_cmd_led. More...
 
struct  osdp_cmd_led
 Sent from CP to PD to control the behaviour of it's on-board LEDs. More...
 
struct  osdp_cmd_buzzer
 Sent from CP to control the behaviour of a buzzer in the PD. More...
 
struct  osdp_cmd_text
 Command to manuplate any display units that the PD supports. More...
 
struct  osdp_cmd_comset
 Sent in response to a COMSET command. Set communication parameters to PD. Must be stored in PD non-volatile memory. More...
 
struct  osdp_cmd_keyset
 This command transfers an encryption key from the CP to a PD. More...
 
struct  osdp_cmd
 OSDP Command Structure. This is a wrapper for all individual OSDP commands. More...
 

Macros

#define OSDP_CMD_TEXT_MAX_LEN   32
 
#define OSDP_CMD_KEYSET_KEY_MAX_LEN   32
 

Enumerations

enum  osdp_card_formats_e { OSDP_CARD_FMT_RAW_UNSPECIFIED , OSDP_CARD_FMT_RAW_WIEGAND , OSDP_CARD_FMT_ASCII , OSDP_CARD_FMT_SENTINEL }
 Various card formats that a PD can support. This is sent to CP when a PD must report a card read. More...
 
enum  osdp_led_color_e {
  OSDP_LED_COLOR_NONE , OSDP_LED_COLOR_RED , OSDP_LED_COLOR_GREEN , OSDP_LED_COLOR_AMBER ,
  OSDP_LED_COLOR_BLUE , OSDP_LED_COLOR_SENTINEL
}
 LED Colors as specified in OSDP for the on_color/off_color parameters. More...
 
enum  osdp_cmd_e {
  OSDP_CMD_OUTPUT = 1 , OSDP_CMD_LED , OSDP_CMD_BUZZER , OSDP_CMD_TEXT ,
  OSDP_CMD_KEYSET , OSDP_CMD_COMSET , OSDP_CMD_SENTINEL
}
 OSDP application exposed commands. More...
 

Functions

int osdp_cp_set_callback_key_press (int(*cb)(int address, uint8_t key))
 
int osdp_cp_set_callback_card_read (int(*cb)(int address, int format, uint8_t *data, int len))
 
int osdp_cp_send_command (int pd, struct osdp_cmd *cmd)
 

Macro Definition Documentation

◆ OSDP_CMD_KEYSET_KEY_MAX_LEN

#define OSDP_CMD_KEYSET_KEY_MAX_LEN   32

◆ OSDP_CMD_TEXT_MAX_LEN

#define OSDP_CMD_TEXT_MAX_LEN   32

Enumeration Type Documentation

◆ osdp_card_formats_e

Various card formats that a PD can support. This is sent to CP when a PD must report a card read.

Enumerator
OSDP_CARD_FMT_RAW_UNSPECIFIED 
OSDP_CARD_FMT_RAW_WIEGAND 
OSDP_CARD_FMT_ASCII 
OSDP_CARD_FMT_SENTINEL 

◆ osdp_cmd_e

enum osdp_cmd_e

OSDP application exposed commands.

Enumerator
OSDP_CMD_OUTPUT 
OSDP_CMD_LED 
OSDP_CMD_BUZZER 
OSDP_CMD_TEXT 
OSDP_CMD_KEYSET 
OSDP_CMD_COMSET 
OSDP_CMD_SENTINEL 

◆ osdp_led_color_e

LED Colors as specified in OSDP for the on_color/off_color parameters.

Enumerator
OSDP_LED_COLOR_NONE 
OSDP_LED_COLOR_RED 
OSDP_LED_COLOR_GREEN 
OSDP_LED_COLOR_AMBER 
OSDP_LED_COLOR_BLUE 
OSDP_LED_COLOR_SENTINEL 

Function Documentation

◆ osdp_cp_send_command()

int osdp_cp_send_command ( int  pd,
struct osdp_cmd cmd 
)

◆ osdp_cp_set_callback_card_read()

int osdp_cp_set_callback_card_read ( int(*)(int address, int format, uint8_t *data, int len)  cb)

◆ osdp_cp_set_callback_key_press()

int osdp_cp_set_callback_key_press ( int(*)(int address, uint8_t key cb)