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_
LEAS T8_ MAX - INT_
LEAS T8_ MIN - INT_
LEAS T16_ MAX - INT_
LEAS T16_ MIN - INT_
LEAS T32_ MAX - INT_
LEAS T32_ 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_
LEAS T8_ MAX - UINT_
LEAS T16_ MAX - UINT_
LEAS T32_ 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_ TIMEVA L64 - __
LDOUBLE_ REDIRECTS_ TO_ FLOA T128_ ABI - __
OFF_ T_ MATCHES_ OFF64_ T - __
RLIM_ T_ MATCHES_ RLIM64_ T - __
STATFS_ MATCHES_ STATF S64 - __
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_ POSI X2 - __
USE_ POSI X199309 - __
USE_ POSI X199506 - __
USE_ POSIX_ IMPLICITLY - __
USE_ XOPE N2K - __
USE_ XOPE N2K8 - __
WORDSIZE - __
WORDSIZE_ TIME64_ COMPA T32 - __
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