Crate libosdp_sys

Source
Expand description

Auto generated (bindgen) wrapper for LibOSDP C API exposed from osdp.h here.

Structs§

__fsid_t
osdp_channel
@brief User defined communication channel abstraction for OSDP devices. The methods for read/write/flush are expected to be non-blocking.
osdp_cmd
@brief OSDP Command Structure. This is a wrapper for all individual OSDP commands.
osdp_cmd_buzzer
@brief Sent from CP to control the behaviour of a buzzer in the PD.
osdp_cmd_comset
@brief Sent in response to a COMSET command. Set communication parameters to PD. Must be stored in PD non-volatile memory.
osdp_cmd_file_tx
@brief File transfer start command
osdp_cmd_keyset
@brief This command transfers an encryption key from the CP to a PD.
osdp_cmd_led
@brief Sent from CP to PD to control the behaviour of it’s on-board LEDs
osdp_cmd_led_params
@brief LED params sub-structure. Part of LED command. See @ref osdp_cmd_led.
osdp_cmd_mfg
@brief Manufacturer Specific Commands
osdp_cmd_output
@brief Command sent from CP to Control digital output of PD.
osdp_cmd_text
@brief Command to manipulate any display units that the PD supports.
osdp_event
@brief OSDP Event structure.
osdp_event_cardread
@brief OSDP event cardread
osdp_event_keypress
@brief OSDP Event Keypad
osdp_event_mfgrep
@brief OSDP Event Manufacturer Specific Command
osdp_event_notification
@brief LibOSDP event notification
osdp_file_ops
@brief OSDP File operations struct that needs to be filled by the CP/PD application and registered with LibOSDP using osdp_file_register_ops() before a file transfer command can be initiated.
osdp_pd_cap
@brief PD capability structure. Each PD capability has a 3 byte representation.
osdp_pd_id
@brief PD ID information advertised by the PD.
osdp_pd_info_t
@brief OSDP PD Information. This struct is used to describe a PD to LibOSDP.
osdp_status_report
@brief 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.

Constants§

INT8_MAX
INT8_MIN
INT16_MAX
INT16_MIN
INT32_MAX
INT32_MIN
INTPTR_MAX
INTPTR_MIN
INT_FAST8_MAX
INT_FAST8_MIN
INT_FAST16_MAX
INT_FAST16_MIN
INT_FAST32_MAX
INT_FAST32_MIN
INT_LEAST8_MAX
INT_LEAST8_MIN
INT_LEAST16_MAX
INT_LEAST16_MIN
INT_LEAST32_MAX
INT_LEAST32_MIN
OSDP_CMD_FILE_TX_FLAG_CANCEL
OSDP_CMD_KEYSET_KEY_MAX_LEN
OSDP_CMD_MFG_MAX_DATALEN
OSDP_CMD_TEXT_MAX_LEN
OSDP_EVENT_CARDREAD_MAX_DATALEN
OSDP_EVENT_KEYPRESS_MAX_DATALEN
OSDP_EVENT_MFGREP_MAX_DATALEN
OSDP_FLAG_ALLOW_EMPTY_ENCRYPTED_DATA_BLOCK
OSDP_FLAG_CAPTURE_PACKETS
OSDP_FLAG_ENABLE_NOTIFICATION
OSDP_FLAG_ENFORCE_SECURE
OSDP_FLAG_IGN_UNSOLICITED
OSDP_FLAG_INSTALL_MODE
PTRDIFF_MAX
PTRDIFF_MIN
SIG_ATOMIC_MAX
SIG_ATOMIC_MIN
SIZE_MAX
UINT8_MAX
UINT16_MAX
UINT32_MAX
UINTPTR_MAX
UINT_FAST8_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_LEAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
WINT_MAX
WINT_MIN
_ATFILE_SOURCE
_BITS_STDINT_INTN_H
_BITS_STDINT_LEAST_H
_BITS_STDINT_UINTN_H
_BITS_TIME64_H
_BITS_TYPESIZES_H
_BITS_TYPES_H
_BITS_WCHAR_H
_DEFAULT_SOURCE
_FEATURES_H
_POSIX_C_SOURCE
_POSIX_SOURCE
_STDC_PREDEF_H
_STDINT_H
_SYS_CDEFS_H
__FD_SETSIZE
__GLIBC_MINOR__
__GLIBC_USE_C2X_STRTOL
__GLIBC_USE_DEPRECATED_GETS
__GLIBC_USE_DEPRECATED_SCANF
__GLIBC_USE_IEC_60559_BFP_EXT
__GLIBC_USE_IEC_60559_BFP_EXT_C2X
__GLIBC_USE_IEC_60559_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
__GLIBC_USE_IEC_60559_TYPES_EXT
__GLIBC_USE_ISOC2X
__GLIBC_USE_LIB_EXT2
__GLIBC__
__GNU_LIBRARY__
__HAVE_GENERIC_SELECTION
__INO_T_MATCHES_INO64_T
__KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI
__OFF_T_MATCHES_OFF64_T
__RLIM_T_MATCHES_RLIM64_T
__STATFS_MATCHES_STATFS64
__STDC_IEC_559_COMPLEX__
__STDC_IEC_559__
__STDC_IEC_60559_BFP__
__STDC_IEC_60559_COMPLEX__
__STDC_ISO_10646__
__SYSCALL_WORDSIZE
__TIMESIZE
__USE_ATFILE
__USE_FORTIFY_LEVEL
__USE_ISOC11
__USE_ISOC95
__USE_ISOC99
__USE_MISC
__USE_POSIX
__USE_POSIX2
__USE_POSIX199309
__USE_POSIX199506
__USE_POSIX_IMPLICITLY
__USE_XOPEN2K
__USE_XOPEN2K8
__WORDSIZE
__WORDSIZE_TIME64_COMPAT32
__bool_true_false_are_defined
__glibc_c99_flexarr_available
false_
osdp_cmd_e_OSDP_CMD_BUZZER
< Reader buzzer control command
osdp_cmd_e_OSDP_CMD_COMSET
< PD communication configuration command
osdp_cmd_e_OSDP_CMD_FILE_TX
< File transfer command
osdp_cmd_e_OSDP_CMD_KEYSET
< Encryption Key Set Command
osdp_cmd_e_OSDP_CMD_LED
< Reader LED control command
osdp_cmd_e_OSDP_CMD_MFG
< Manufacturer specific command
osdp_cmd_e_OSDP_CMD_OUTPUT
< Output control command
osdp_cmd_e_OSDP_CMD_SENTINEL
< Max command value
osdp_cmd_e_OSDP_CMD_STATUS
< Status report command
osdp_cmd_e_OSDP_CMD_TEXT
< Reader text output command
osdp_event_cardread_format_e_OSDP_CARD_FMT_ASCII
< ASCII card format
osdp_event_cardread_format_e_OSDP_CARD_FMT_RAW_UNSPECIFIED
< Unspecified card format
osdp_event_cardread_format_e_OSDP_CARD_FMT_RAW_WIEGAND
< Wiegand card format
osdp_event_cardread_format_e_OSDP_CARD_FMT_SENTINEL
< Max card format value
osdp_event_notification_type_OSDP_EVENT_NOTIFICATION_COMMAND
Application command outcome report.
osdp_event_notification_type_OSDP_EVENT_NOTIFICATION_PD_STATUS
PD state change
osdp_event_notification_type_OSDP_EVENT_NOTIFICATION_SC_STATUS
Secure Channel state change
osdp_event_type_OSDP_EVENT_CARDREAD
< Card read event
osdp_event_type_OSDP_EVENT_KEYPRESS
< Keypad press event
osdp_event_type_OSDP_EVENT_MFGREP
< Manufacturer specific reply event
osdp_event_type_OSDP_EVENT_NOTIFICATION
< LibOSDP notification event
osdp_event_type_OSDP_EVENT_SENTINEL
< Max event value
osdp_event_type_OSDP_EVENT_STATUS
< Status event
osdp_led_color_e_OSDP_LED_COLOR_AMBER
< Amber
osdp_led_color_e_OSDP_LED_COLOR_BLUE
< Blue
osdp_led_color_e_OSDP_LED_COLOR_CYAN
< Cyan
osdp_led_color_e_OSDP_LED_COLOR_GREEN
< Green
osdp_led_color_e_OSDP_LED_COLOR_MAGENTA
< Magenta
osdp_led_color_e_OSDP_LED_COLOR_NONE
< No color
osdp_led_color_e_OSDP_LED_COLOR_RED
< Red
osdp_led_color_e_OSDP_LED_COLOR_SENTINEL
< Max value
osdp_led_color_e_OSDP_LED_COLOR_WHITE
< White
osdp_log_level_e_OSDP_LOG_ALERT
< Log level Alert
osdp_log_level_e_OSDP_LOG_CRIT
< Log level Critical
osdp_log_level_e_OSDP_LOG_DEBUG
< Log level Debug
osdp_log_level_e_OSDP_LOG_EMERG
< Log level Emergency
osdp_log_level_e_OSDP_LOG_ERROR
< Log level Error
osdp_log_level_e_OSDP_LOG_INFO
< Log level Info
osdp_log_level_e_OSDP_LOG_MAX_LEVEL
< Log level max value
osdp_log_level_e_OSDP_LOG_NOTICE
< Log level Notice
osdp_log_level_e_OSDP_LOG_WARNING
< Log level Warning
osdp_pd_cap_function_code_e_OSDP_PD_CAP_BIOMETRICS
This capability indicates the ability of the reader to handle biometric input
osdp_pd_cap_function_code_e_OSDP_PD_CAP_CARD_DATA_FORMAT
This capability indicates the form of the card data is presented to the Control Panel.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_CHECK_CHARACTER_SUPPORT
All PDs must be able to support the checksum mode. This capability indicates if the PD is capable of supporting CRC mode.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_COMMUNICATION_SECURITY
This capability indicates the extent to which the PD supports communication security (Secure Channel Communication)
osdp_pd_cap_function_code_e_OSDP_PD_CAP_CONTACT_STATUS_MONITORING
This function indicates the ability to monitor the status of a switch using a two-wire electrical connection between the PD and the switch. The on/off position of the switch indicates the state of an external device.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_LARGEST_COMBINED_MESSAGE_SIZE
This capability indicates the maximum size multi-part message which the PD can handle.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_OUTPUT_CONTROL
This function provides a switched output, typically in the form of a relay. The Output has two states: active or inactive. The Control Panel (CP) can directly set the Output’s state, or, if the PD supports timed operations, the CP can specify a time period for the activation of the Output.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_READERS
This capability indicates the number of credential reader devices present. Compliance levels are bit fields to be assigned as needed.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_READER_AUDIBLE_OUTPUT
This capability indicates the presence of and type of an Audible Annunciator (buzzer or similar tone generator)
osdp_pd_cap_function_code_e_OSDP_PD_CAP_READER_LED_CONTROL
This capability indicates the presence of and type of LEDs.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_READER_TEXT_OUTPUT
This capability indicates that the PD supports a text display emulating character-based display terminals.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_RECEIVE_BUFFERSIZE
This capability indicates the maximum size single message the PD can receive.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_SENTINEL
Capability Sentinel
osdp_pd_cap_function_code_e_OSDP_PD_CAP_SMART_CARD_SUPPORT
This capability indicates whether the PD supports the transparent mode used for communicating directly with a smart card.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_TIME_KEEPING
This capability indicates that the type of date and time awareness or time keeping ability of the PD.
osdp_pd_cap_function_code_e_OSDP_PD_CAP_UNUSED
Dummy.
osdp_pd_nak_code_e_OSDP_PD_NAK_BIO_FMT
< BIO_FORMAT not supported
osdp_pd_nak_code_e_OSDP_PD_NAK_BIO_TYPE
< BIO_TYPE not supported
osdp_pd_nak_code_e_OSDP_PD_NAK_CMD_LEN
< Command length error
osdp_pd_nak_code_e_OSDP_PD_NAK_CMD_UNKNOWN
< Unknown Command Code – Command not implemented by PD
osdp_pd_nak_code_e_OSDP_PD_NAK_MSG_CHK
< Message check character(s) error (bad cksum/crc)
osdp_pd_nak_code_e_OSDP_PD_NAK_NONE
< No error
osdp_pd_nak_code_e_OSDP_PD_NAK_RECORD
< Unable to process command record
osdp_pd_nak_code_e_OSDP_PD_NAK_SC_COND
< unsupported security block or security conditions not met
osdp_pd_nak_code_e_OSDP_PD_NAK_SC_UNSUP
< Secure Channel is not supported by PD
osdp_pd_nak_code_e_OSDP_PD_NAK_SENTINEL
< NAK codes max value
osdp_pd_nak_code_e_OSDP_PD_NAK_SEQ_NUM
< Sequence number error
osdp_status_report_type_OSDP_STATUS_REPORT_INPUT
@brief Status report of the inputs attached the PD
osdp_status_report_type_OSDP_STATUS_REPORT_LOCAL
@brief Local tamper and power status report
osdp_status_report_type_OSDP_STATUS_REPORT_OUTPUT
@brief Status report of the output attached the PD
osdp_status_report_type_OSDP_STATUS_REPORT_REMOTE
@brief Remote tamper and power status report
true_

Functions§

osdp_cp_flush_commands
@brief Deletes all commands queued for a give PD
osdp_cp_get_capability
@brief Get capability associated to a function_code that the PD reports in response to osdp_CAP(0x62) command. Calling this method before the CP has had a the chance to get this information will return invalid/stale results.
osdp_cp_get_pd_id
@brief Get PD ID information as reported by the PD. Calling this method before the CP has had a the chance to get this information will return invalid/stale results.
osdp_cp_modify_flag
@brief Set or clear OSDP public flags
osdp_cp_refresh
@brief Periodic refresh method. Must be called by the application at least once every 50ms to meet OSDP timing requirements.
osdp_cp_send_command
@brief Generic command enqueue API.
osdp_cp_set_event_callback
@brief Set callback method for CP event notification. This callback is invoked when the CP receives an event from the PD.
osdp_cp_setup
@brief This method is used to setup a device in CP mode. Application must store the returned context pointer and pass it back to all OSDP functions intact.
osdp_cp_teardown
@brief Cleanup all osdp resources. The context pointer is no longer valid after this call.
osdp_file_register_ops
@brief Register a global file operations struct with OSDP. Both CP and PD modes should have done so already before CP can sending a OSDP_CMD_FILE_TX.
osdp_get_file_tx_status
@brief Query file transfer status if one is in progress. Calling this method when there is no file transfer progressing will return error.
osdp_get_sc_status_mask
@brief Get a bit mask of number of PD that are online and have an active secure channel currently.
osdp_get_source_info
@brief Get LibOSDP source identifier as a const char *. This string has info about the source tree from which this version of LibOSDP was built. Used in diagnostics.
osdp_get_status_mask
@brief Get a bit mask of number of PD that are online currently.
osdp_get_version
@brief Get LibOSDP version as a const char *. Used in diagnostics.
osdp_logger_init
@brief Configure OSDP Logging.
osdp_pd_flush_events
@brief Deletes all events from the PD’s event queue.
osdp_pd_notify_event
@brief API to notify PD events to CP. These events are sent to the CP as an alternate response to a POLL command.
osdp_pd_refresh
@brief Periodic refresh method. Must be called by the application at least once every 50ms to meet OSDP timing requirements.
osdp_pd_set_capabilities
@brief Set PD’s capabilities
osdp_pd_set_command_callback
@brief Set callback method for PD command notification. This callback is invoked when the PD receives a command from the CP.
osdp_pd_setup
@brief This method is used to setup a device in PD mode. Application must store the returned context pointer and pass it back to all OSDP functions intact.
osdp_pd_teardown
@brief Cleanup all osdp resources. The context pointer is no longer valid after this call.
osdp_set_log_callback
@brief A callback function that gets called when LibOSDP wants to emit a log line. All messages (of all log levels) are passed on to this callback without any log formatting. This API is for users who may already have a logger configured in their application.

Type Aliases§

__blkcnt64_t
__blkcnt_t
__blksize_t
__caddr_t
__clock_t
__clockid_t
__daddr_t
__dev_t
__fsblkcnt64_t
__fsblkcnt_t
__fsfilcnt64_t
__fsfilcnt_t
__fsword_t
__gid_t
__id_t
__ino64_t
__ino_t
__int8_t
__int16_t
__int32_t
__int64_t
__int_least8_t
__int_least16_t
__int_least32_t
__int_least64_t
__intmax_t
__intptr_t
__key_t
__loff_t
__mode_t
__nlink_t
__off64_t
__off_t
__pid_t
__quad_t
__rlim64_t
__rlim_t
__sig_atomic_t
__socklen_t
__ssize_t
__suseconds64_t
__suseconds_t
__syscall_slong_t
__syscall_ulong_t
__time_t
__timer_t
__u_char
__u_int
__u_long
__u_quad_t
__u_short
__uid_t
__uint8_t
__uint16_t
__uint32_t
__uint64_t
__uint_least8_t
__uint_least16_t
__uint_least32_t
__uint_least64_t
__uintmax_t
__useconds_t
cp_event_callback_t
@brief 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.
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_least8_t
int_least16_t
int_least32_t
int_least64_t
intmax_t
osdp_cmd_e
@brief OSDP application exposed commands
osdp_event_cardread_format_e
@brief Various card formats that a PD can support. This is sent to CP when a PD must report a card read.
osdp_event_notification_type
@brief LibOSDP event notification type
osdp_event_type
@brief OSDP PD Events
osdp_file_close_fn_t
@brief Close file that corresponds to a given file descriptor
osdp_file_open_fn_t
@brief Open a pre-agreed file
osdp_file_read_fn_t
@brief Read a chunk of file data into buffer
osdp_file_write_fn_t
@brief Write a chunk of file data from buffer to disk.
osdp_flush_fn_t
@brief pointer to function that drops all bytes in TX/RX fifo. This function should be non-blocking.
osdp_led_color_e
@brief LED Colors as specified in OSDP for the on_color/off_color parameters.
osdp_log_callback_fn_t
@brief A callback function to be used with external loggers
osdp_log_level_e
@brief Different levels of log messages; based on importance of the message with LOG_EMERG being most critical to LOG_DEBUG being the least.
osdp_log_puts_fn_t
@brief Puts a string to the logging medium
osdp_pd_cap_function_code_e
@brief Various PD capability function codes.
osdp_pd_nak_code_e
@brief OSDP specified NAK codes
osdp_read_fn_t
@brief pointer to function that copies received bytes into buffer. This function should be non-blocking.
osdp_status_report_type
@brief OSDP Status report types
osdp_t
@brief To keep the OSDP internal data structures from polluting the exposed headers, they are typedefed to void before sending them to the upper layers. This level of abstraction looked reasonable as technically no one should attempt to modify it outside of the LibOSDP and their definition may change at any time.
osdp_write_fn_t
@brief pointer to function that sends byte array into some channel. This function should be non-blocking.
pd_command_callback_t
@brief 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.
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
uintmax_t

Unions§

osdp_cmd__bindgen_ty_1
Command
osdp_event__bindgen_ty_1
Event