Modules#

EmberAfPluginDoorLockServerLogEntry

EmberAfPluginDoorLockServerUser

EmberAfPluginDoorLockServerWeekdayScheduleEntry

EmberAfPluginDoorLockServerYeardayScheduleEntry

EmberAfPluginDoorLockServerHolidayScheduleEntry

EmberAfPluginDoorLockServerDisposableScheduleEntry

Door Lock Server#

API and Callbacks for the Door Lock Cluster Server Component.

Silicon Labs implementation of the Door Lock server cluster. This is an incomplete component implementation. It does all of the mandatory and optional behavior in the Door Lock cluster needed to pass the Door Lock cluster tests. It does not store user and schedule tables in persistent memory, check user pin activation against user status or user schedule, or offer callbacks and component options to the application for further customization of functionality.

API#

bool
emberAfPluginDoorLockServerAddLogEntry(EmberAfDoorLockEventType eventType, EmberAfDoorLockEventSource source, uint8_t eventId, uint16_t userId, uint8_t pinLength, uint8_t *pin)

Add a log entry. Returns true if the entry was added. Note that the eventId parameter should be of type EmberAfDoorLockOperationEventCode or EmberAfDoorLockProgrammingEventCode.

bool
emberAfPluginDoorLockServerGetLogEntry(uint16_t *entryId, EmberAfPluginDoorLockServerLogEntry *entry)

Get a log entry associated with the entry ID. If the entry ID does not exist, the most recent entry is returned and the entryId parameter is updated. The entryId is a 1-based index into an array of log entries in order to match GetLogRecord ZCL command. This will return true if the entry was successfully returned.

emberAfPluginDoorLockServerApplyPin(uint8_t *pin, uint8_t pinLength)

Unlocks the door with a pin.

emberAfPluginDoorLockServerApplyRfid(uint8_t *rfid, uint8_t rfidLength)

Unlocks the door with RFID.

Macros#

#define
EMBER_AF_PLUGIN_DOOR_LOCK_SERVER_PIN_USER_TABLE_SIZE 8
#define
EMBER_AF_PLUGIN_DOOR_LOCK_SERVER_RFID_USER_TABLE_SIZE 8
#define
EMBER_AF_PLUGIN_DOOR_LOCK_SERVER_MAX_PIN_LENGTH 8
#define
EMBER_AF_PLUGIN_DOOR_LOCK_SERVER_MAX_RFID_LENGTH 8
#define
EMBER_AF_PLUGIN_DOOR_LOCK_SERVER_WEEKDAY_SCHEDULE_TABLE_SIZE 4
#define
EMBER_AF_PLUGIN_DOOR_LOCK_SERVER_YEARDAY_SCHEDULE_TABLE_SIZE 8
#define
EMBER_AF_PLUGIN_DOOR_LOCK_SERVER_HOLIDAY_SCHEDULE_TABLE_SIZE 8
#define
DOOR_LOCK_SERVER_ENDPOINT 1
#define
EMBER_AF_PLUGIN_DOOR_LOCK_SERVER_MAX_LOG_ENTRIES 16
#define
SEND_COMMAND_UNICAST_TO_BINDINGS ()
#define
EmberAfDoorLockScheduleEntry EmberAfPluginDoorLockServerWeekdayScheduleEntry
#define
EmberAfDoorLockUser EmberAfPluginDoorLockServerUser

API Documentation#

emberAfPluginDoorLockServerAddLogEntry#

bool emberAfPluginDoorLockServerAddLogEntry (EmberAfDoorLockEventType eventType, EmberAfDoorLockEventSource source, uint8_t eventId, uint16_t userId, uint8_t pinLength, uint8_t * pin)

Add a log entry. Returns true if the entry was added. Note that the eventId parameter should be of type EmberAfDoorLockOperationEventCode or EmberAfDoorLockProgrammingEventCode.

Parameters
TypeDirectionArgument NameDescription
EmberAfDoorLockEventTypeN/AeventType

Event type Ver.: always

EmberAfDoorLockEventSourceN/Asource

Event source Ver.: always

uint8_tN/AeventId

Ver.: always

uint16_tN/AuserId

Ver.: always

uint8_tN/ApinLength

Ver.: always

uint8_t *N/Apin

Ver.: always

Returns

  • bool true if success


emberAfPluginDoorLockServerGetLogEntry#

bool emberAfPluginDoorLockServerGetLogEntry (uint16_t * entryId, EmberAfPluginDoorLockServerLogEntry * entry)

Get a log entry associated with the entry ID. If the entry ID does not exist, the most recent entry is returned and the entryId parameter is updated. The entryId is a 1-based index into an array of log entries in order to match GetLogRecord ZCL command. This will return true if the entry was successfully returned.

Parameters
TypeDirectionArgument NameDescription
uint16_t *N/AentryId

Ver.: always

EmberAfPluginDoorLockServerLogEntry *N/Aentry

pointer to log entry struct Ver.: always

Returns

  • bool true if success


emberAfPluginDoorLockServerApplyPin#

EmberAfStatus emberAfPluginDoorLockServerApplyPin (uint8_t * pin, uint8_t pinLength)

Unlocks the door with a pin.

Parameters
TypeDirectionArgument NameDescription
uint8_t *N/Apin

Ver.: always

uint8_tN/ApinLength

Ver.: always

Returns

  • EmberAfStatus status code


emberAfPluginDoorLockServerApplyRfid#

EmberAfStatus emberAfPluginDoorLockServerApplyRfid (uint8_t * rfid, uint8_t rfidLength)

Unlocks the door with RFID.

Parameters
TypeDirectionArgument NameDescription
uint8_t *N/Arfid

Ver.: always

uint8_tN/ArfidLength

Ver.: always

Returns

  • EmberAfStatus status code