Go to the source code of this file.
|
| 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...
|
| |
| enum | osdp_event_cardread_format_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. More...
|
| |
| enum | osdp_event_type { OSDP_EVENT_CARDREAD
, OSDP_EVENT_KEYPRESS
, OSDP_EVENT_SENTINEL
} |
| | OSDP PD Events. More...
|
| |
◆ 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 |
◆ OSDP_EVENT_MAX_DATALEN
| #define OSDP_EVENT_MAX_DATALEN 64 |
◆ cp_event_callback_t
| typedef int(* cp_event_callback_t) (void *arg, int pd, struct osdp_event *ev) |
Callback for CP event notifications.
After it has been registered with osdp_cp_set_event_callback, this method is invoked when the CP receives an event from the PD.
- Parameters
-
| arg | Opaque pointer provided by the application during callback registration. |
| pd | the offset (0-indexed) of this PD in kconfig OSDP_PD_ADDRESS_LIST |
| ev | pointer to osdp_event struct (filled by libosdp). |
- Return values
-
| 0 | on handling the event successfully. |
| -ve | on errors. |
◆ pd_command_callback_t
| typedef int(* pd_command_callback_t) (void *arg, struct osdp_cmd *cmd) |
Callback for PD command notifications.
After it has been registered with osdp_pd_set_command_callback, this method is invoked when the PD receives a command from the CP.
- Parameters
-
| arg | pointer that will was passed to the arg param of osdp_pd_set_command_callback. |
| cmd | pointer to the received command. |
- Return values
-
| 0 | if LibOSDP must send a osdp_ACK response |
| -ve | if LibOSDP must send a osdp_NAK response |
| +ve | and modify the passed struct osdp_cmd *cmd if LibOSDP must send a specific response. This is useful for sending manufacturer specific reply osdp_MFGREP. |
◆ 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_event_cardread_format_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_event_type
OSDP PD Events.
| Enumerator |
|---|
| OSDP_EVENT_CARDREAD | |
| OSDP_EVENT_KEYPRESS | |
| OSDP_EVENT_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 | |
◆ osdp_cp_send_command()
| int osdp_cp_send_command |
( |
int |
pd, |
|
|
struct osdp_cmd * |
cmd |
|
) |
| |
Generic command enqueue API.
- Parameters
-
| pd | the offset (0-indexed) of this PD in kconfig OSDP_PD_ADDRESS_LIST |
| cmd | command pointer. Must be filled by application. |
- Return values
-
- Note
- This method only adds the command on to a particular PD's command queue. The command itself can fail due to various reasons.
◆ osdp_cp_set_event_callback()
Set callback method for CP event notification.
This callback is invoked when the CP receives an event from the PD.
- Parameters
-
| cb | The callback function's pointer |
| arg | A pointer that will be passed as the first argument of cb |