Topics | |
DoorLockEvents | |
Data Structures | |
struct | cc_door_lock_capabilities_report_t |
struct | cc_door_lock_configuration_t |
struct | cc_door_lock_data_t |
struct | _door_lock_hw_data_t |
Macros | |
#define | DOOR_LOCK_OPERATION_SET_TIMEOUT_NOT_SUPPORTED 0xFE |
Typedefs | |
typedef struct _door_lock_hw_data_t | door_lock_hw_data_t |
Enumerations | |
enum | door_lock_mode_t { DOOR_MODE_UNSECURE = DOOR_LOCK_OPERATION_SET_DOOR_UNSECURED_V2 , DOOR_MODE_UNSECURE_TIMEOUT = DOOR_LOCK_OPERATION_SET_DOOR_UNSECURED_WITH_TIMEOUT_V2 , DOOR_MODE_UNSECURE_INSIDE = DOOR_LOCK_OPERATION_SET_DOOR_UNSECURED_FOR_INSIDE_DOOR_HANDLES_V2 , DOOR_MODE_UNSECURE_INSIDE_TIMEOUT = DOOR_LOCK_OPERATION_SET_DOOR_UNSECURED_FOR_INSIDE_DOOR_HANDLES_WITH_TIMEOUT_V2 , DOOR_MODE_UNSECURE_OUTSIDE = DOOR_LOCK_OPERATION_SET_DOOR_UNSECURED_FOR_OUTSIDE_DOOR_HANDLES_V2 , DOOR_MODE_UNSECURE_OUTSIDE_TIMEOUT = DOOR_LOCK_OPERATION_SET_DOOR_UNSECURED_FOR_OUTSIDE_DOOR_HANDLES_WITH_TIMEOUT_V2 , DOOR_MODE_UNKNOWN = DOOR_LOCK_OPERATION_REPORT_DOOR_MODE_UNKNOWN_V4 , DOOR_MODE_SECURED = DOOR_LOCK_OPERATION_SET_DOOR_SECURED_V2 } |
enum | cc_door_lock_operation_type_t { DOOR_OPERATION_CONST = 0x01 , DOOR_OPERATION_TIMED = 0x02 , DOOR_OPERATION_RESERVED = 0x03 } |
enum | cc_door_lock_door_component_t { DOOR_COMPONENT_DOOR = 0x01 , DOOR_COMPONENT_BOLT = 0x02 , DOOR_COMPONENT_LATCH = 0x04 } |
enum | cc_door_lock_handle_t { DOOR_HANDLE_DISABLED = 0x00 , DOOR_HANDLE_1 = 0x01 , DOOR_HANDLE_2 = 0x02 , DOOR_HANDLE_3 = 0x04 , DOOR_HANDLE_4 = 0x08 } |
Functions | |
void | cc_door_lock_latch_set (bool opened) |
void | cc_door_lock_handle_set (bool opened) |
void | cc_door_lock_bolt_set (bool locked) |
void | CC_DoorLock_SetOutsideDoorHandleState (cc_door_lock_handle_t handle) |
void | CC_DoorLock_ClearOutsideDoorHandleState (cc_door_lock_handle_t handle) |
uint8_t | cc_door_lock_mode_hw_change (door_lock_mode_t mode) |
bool | door_lock_hw_bolt_is_unlocked (void) |
bool | door_lock_hw_latch_is_closed (void) |
bool | door_lock_hw_handle_is_pressed (void) |
cc_door_lock_operation_type_t | cc_door_lock_get_operation_type (void) |
cc_door_lock_handle_t | cc_door_lock_get_supported_inside_handles (void) |
cc_door_lock_handle_t | cc_door_lock_get_supported_outside_handles (void) |
uint8_t | cc_door_lock_get_options_flags (void) |
uint16_t | cc_door_lock_get_max_auto_relock_time (void) |
uint16_t | cc_door_lock_get_max_hold_and_release_time (void) |
bool | cc_door_lock_write (cc_door_lock_data_t *door_lock_data) |
bool | cc_door_lock_read (cc_door_lock_data_t *door_lock_data) |
void | cc_door_lock_migrate (void) |
#define DOOR_LOCK_OPERATION_SET_TIMEOUT_NOT_SUPPORTED 0xFE |
Disabling Lock timeout minutes and seconds.
typedef struct _door_lock_hw_data_t door_lock_hw_data_t |
Physical components of Door Lock. Structure follows but it's not limited to requirement CC:0062.04.03.11.006 Structure can be expanded with additional HW components.
Operation mode (1byte). The Operation Type field can be set to either constant or timed operation. When timed operation is set, the Lock Timer Minutes and Lock Timer Seconds fields MUST be set to valid values.
Enumerator | |
---|---|
DOOR_OPERATION_CONST | Constant operation |
DOOR_OPERATION_TIMED | Timed operation |
DOOR_OPERATION_RESERVED | 0X03..0XFF Reserved |
enum door_lock_mode_t |
Door Lock Mode (8 bit) will set the door lock device in unsecured or secured mode as well as other peripheral settings.
1) Constant mode. Door will be unsecured until set back to secured mode by Command. 2) Timeout mode. Fallback to secured mode after timeout has expired (set by Door Lock Configuration Set). 3) This is Read Only State, i.e. Bolt is not fully retracted/engaged
void cc_door_lock_bolt_set | ( | bool | locked | ) |
Bolt status handler. Called when bolt status is changed.
[in] | locked | Bolt status. True if bolt is locked, false if unlocked. |
uint16_t cc_door_lock_get_max_auto_relock_time | ( | void | ) |
uint16_t cc_door_lock_get_max_hold_and_release_time | ( | void | ) |
cc_door_lock_operation_type_t cc_door_lock_get_operation_type | ( | void | ) |
uint8_t cc_door_lock_get_options_flags | ( | void | ) |
cc_door_lock_handle_t cc_door_lock_get_supported_inside_handles | ( | void | ) |
cc_door_lock_handle_t cc_door_lock_get_supported_outside_handles | ( | void | ) |
void cc_door_lock_handle_set | ( | bool | opened | ) |
opened |
void cc_door_lock_latch_set | ( | bool | opened | ) |
Latch status handler. Called when latch status is changed.
[in] | opened | Latch status. True if latch is opened, false if closed. |
void cc_door_lock_migrate | ( | void | ) |
|
extern |
Initiates change on the hardware that changes door lock mode. Can be called after operation has been triggered locally, or valid Operation Set command was received
mode | Door Lock Mode to be set |
bool cc_door_lock_read | ( | cc_door_lock_data_t * | door_lock_data | ) |
bool cc_door_lock_write | ( | cc_door_lock_data_t * | door_lock_data | ) |
void CC_DoorLock_ClearOutsideDoorHandleState | ( | cc_door_lock_handle_t | handle | ) |
Clears the Outside Door Handle State for a specific handle
handle | handle to be cleared |
void CC_DoorLock_SetOutsideDoorHandleState | ( | cc_door_lock_handle_t | handle | ) |
Sets the Outside Door Handle State for a specific handle
handle | handle to be set |
|
extern |
Returns bolt state.
|
extern |
|
extern |