DoorLockCommands

interface DoorLockCommands

Known direct subclasses
DoorLock

API for the DoorLock trait.


Summary

Public functions

suspend Unit
suspend Unit

Clear a single credential, one type of credential, or all credentials except ProgrammingPIN credentials.

suspend Unit
clearHolidaySchedule(holidayIndex: UByte)

Clear the specified holiday schedule, or all holiday schedules.

suspend Unit
clearUser(userIndex: UShort)

Clear the specified user.

suspend Unit
clearWeekDaySchedule(weekDayIndex: UByte, userIndex: UShort)

Clear the specified week day schedule or all week day schedules for the specific user.

suspend Unit
clearYearDaySchedule(yearDayIndex: UByte, userIndex: UShort)

Clear the specified year day schedule, or all year day schedules for the specific user.

suspend DoorLockTrait.GetCredentialStatusCommand.Response

Retrieve the status of the specified credential.

suspend DoorLockTrait.GetHolidayScheduleCommand.Response
getHolidaySchedule(holidayIndex: UByte)

Get the holiday schedule for the specified holiday index.

suspend DoorLockTrait.GetUserCommand.Response
getUser(userIndex: UShort)

Retrieve the user type for a specific user.

suspend DoorLockTrait.GetWeekDayScheduleCommand.Response
getWeekDaySchedule(weekDayIndex: UByte, userIndex: UShort)

Retrieve the weekly schedule for the specified user.

suspend DoorLockTrait.GetYearDayScheduleCommand.Response
getYearDaySchedule(yearDayIndex: UByte, userIndex: UShort)

Retrieve the specified year day schedule for the specified user.

suspend Unit

Lock the door.

suspend Unit
setAliroReaderConfig(
    signingKey: ByteArray,
    verificationKey: ByteArray,
    groupIdentifier: ByteArray,
    optionalArgs: DoorLockTrait.SetAliroReaderConfigCommand.OptionalArgs.() -> Unit
)
suspend DoorLockTrait.SetCredentialCommand.Response
setCredential(
    operationType: DoorLockTrait.DataOperationTypeEnum,
    credential: DoorLockTrait.CredentialStruct,
    credentialData: ByteArray,
    userIndex: UShort?,
    userStatus: DoorLockTrait.UserStatusEnum?,
    userType: DoorLockTrait.UserTypeEnum?
)

Set a credential into the lock for a new or existing user, or for a programming user.

suspend Unit
setHolidaySchedule(
    holidayIndex: UByte,
    localStartTime: UInt,
    localEndTime: UInt,
    operatingMode: DoorLockTrait.OperatingModeEnum
)

Set the holiday schedule by specifying the local start and end time with respect to a specific lock operating mode.

suspend Unit
setUser(
    operationType: DoorLockTrait.DataOperationTypeEnum,
    userIndex: UShort,
    userName: String?,
    userUniqueId: UInt?,
    userStatus: DoorLockTrait.UserStatusEnum?,
    userType: DoorLockTrait.UserTypeEnum?,
    credentialRule: DoorLockTrait.CredentialRuleEnum?
)

Set the user on the lock.

suspend Unit
setWeekDaySchedule(
    weekDayIndex: UByte,
    userIndex: UShort,
    daysMask: DoorLockTrait.DaysMaskMap,
    startHour: UByte,
    startMinute: UByte,
    endHour: UByte,
    endMinute: UByte
)

Set a weekly repeating schedule for the specified user.

suspend Unit
setYearDaySchedule(
    yearDayIndex: UByte,
    userIndex: UShort,
    localStartTime: UInt,
    localEndTime: UInt
)

Set a time-specific schedule ID for a specified user.

suspend Unit

Disengage the deadbolt.

suspend Unit

Unlock the door.

suspend Unit

Unlock the door with a timeout parameter.

Public functions

clearAliroReaderConfig

suspend fun clearAliroReaderConfig(): Unit

clearCredential

suspend fun clearCredential(credential: DoorLockTrait.CredentialStruct?): Unit

Clear a single credential, one type of credential, or all credentials except ProgrammingPIN credentials.

Parameters
credential: DoorLockTrait.CredentialStruct?

The credential to be cleared.

clearHolidaySchedule

suspend fun clearHolidaySchedule(holidayIndex: UByte): Unit

Clear the specified holiday schedule, or all holiday schedules.

Parameters
holidayIndex: UByte

The unique identifier for the holiday schedule to clear. 0xFE clears all holiday schedules.

clearUser

suspend fun clearUser(userIndex: UShort): Unit

Clear the specified user.

Parameters
userIndex: UShort

The unique identifier for the user to clear. 0xFFFE clears all users.

clearWeekDaySchedule

suspend fun clearWeekDaySchedule(weekDayIndex: UByte, userIndex: UShort): Unit

Clear the specified week day schedule or all week day schedules for the specific user.

Week day schedules are used to restrict access to a specified time window on certain days of the week. The schedule is repeated each week.

Parameters
weekDayIndex: UByte

The unique identifier for the week day schedule to clear. 0xFE clears all week day schedules for the specified user.

userIndex: UShort

The unique identifier for the user whose schedule is to be cleared.

clearYearDaySchedule

suspend fun clearYearDaySchedule(yearDayIndex: UByte, userIndex: UShort): Unit

Clear the specified year day schedule, or all year day schedules for the specific user.

Year day schedules are used to restrict access to a specified date and time window.

Parameters
yearDayIndex: UByte

The unique identifier for the year day schedule to clear. 0xFE clears all year day schedules for the specified user.

userIndex: UShort

The unique identifier for the user whose year day schedule is to be cleared.

getCredentialStatus

suspend fun getCredentialStatus(credential: DoorLockTrait.CredentialStruct): DoorLockTrait.GetCredentialStatusCommand.Response

Retrieve the status of the specified credential.

Parameters
credential: DoorLockTrait.CredentialStruct

The credential whose status is to be retrieved.

Returns
DoorLockTrait.GetCredentialStatusCommand.Response

Returns the status for the specified credential.

getHolidaySchedule

suspend fun getHolidaySchedule(holidayIndex: UByte): DoorLockTrait.GetHolidayScheduleCommand.Response

Get the holiday schedule for the specified holiday index.

Parameters
holidayIndex: UByte

The unique identifier for the holiday schedule to retrieve.

Returns
DoorLockTrait.GetHolidayScheduleCommand.Response

Returns the holiday schedule entry for the specified holiday ID.

getUser

suspend fun getUser(userIndex: UShort): DoorLockTrait.GetUserCommand.Response

Retrieve the user type for a specific user.

Parameters
userIndex: UShort

The unique identifier for the user whose type is to be retrieved.

Returns
DoorLockTrait.GetUserCommand.Response

Returns the user for the specified userIndex.

getWeekDaySchedule

suspend fun getWeekDaySchedule(weekDayIndex: UByte, userIndex: UShort): DoorLockTrait.GetWeekDayScheduleCommand.Response

Retrieve the weekly schedule for the specified user.

Week day schedules are used to restrict access to a specified time window on certain days of the week. The schedule is repeated each week.

Parameters
weekDayIndex: UByte

The unique identifier for the week day schedule to retrieve.

userIndex: UShort

The unique identifier for the user whose week day schedule is to be retrieved.

Returns
DoorLockTrait.GetWeekDayScheduleCommand.Response

Returns the weekly repeating schedule data for the specified schedule index.

getYearDaySchedule

suspend fun getYearDaySchedule(yearDayIndex: UByte, userIndex: UShort): DoorLockTrait.GetYearDayScheduleCommand.Response

Retrieve the specified year day schedule for the specified user.

Year day schedules are used to restrict access to a specified date and time window.

Parameters
yearDayIndex: UByte

The unique identifier for the year day schedule to be retrieved.

userIndex: UShort

The unique identifier for the user whose year day schedule is to be retrieved.

Returns
DoorLockTrait.GetYearDayScheduleCommand.Response

Returns the year day schedule data for the specified schedule and user indexes.

lockDoor

suspend fun lockDoor(optionalArgs: DoorLockTrait.LockDoorCommand.OptionalArgs.() -> Unit = {}): Unit

Lock the door.

Parameters
optionalArgs: DoorLockTrait.LockDoorCommand.OptionalArgs.() -> Unit = {}

Receiver for the optional arguments of this command

setAliroReaderConfig

suspend fun setAliroReaderConfig(
    signingKey: ByteArray,
    verificationKey: ByteArray,
    groupIdentifier: ByteArray,
    optionalArgs: DoorLockTrait.SetAliroReaderConfigCommand.OptionalArgs.() -> Unit = {}
): Unit

setCredential

suspend fun setCredential(
    operationType: DoorLockTrait.DataOperationTypeEnum,
    credential: DoorLockTrait.CredentialStruct,
    credentialData: ByteArray,
    userIndex: UShort?,
    userStatus: DoorLockTrait.UserStatusEnum?,
    userType: DoorLockTrait.UserTypeEnum?
): DoorLockTrait.SetCredentialCommand.Response

Set a credential into the lock for a new or existing user, or for a programming user.

Parameters
operationType: DoorLockTrait.DataOperationTypeEnum

The operation to be performed.

credential: DoorLockTrait.CredentialStruct

The credential to be set.

credentialData: ByteArray

The credential data to set for the credential being added or modified.

userIndex: UShort?

The unique identifier for the user record that corresponds to the credential being added or modified.

userStatus: DoorLockTrait.UserStatusEnum?

The user status to use in the new user record if a new user is being created. Valid values are defined by UserStatusEnum.

userType: DoorLockTrait.UserTypeEnum?

The user type to use in the new user record if a new user is being created. Valid values are defined by UserTypeEnum.

Returns
DoorLockTrait.SetCredentialCommand.Response

The status for setting the specified credential.

setHolidaySchedule

suspend fun setHolidaySchedule(
    holidayIndex: UByte,
    localStartTime: UInt,
    localEndTime: UInt,
    operatingMode: DoorLockTrait.OperatingModeEnum
): Unit

Set the holiday schedule by specifying the local start and end time with respect to a specific lock operating mode.

Parameters
holidayIndex: UByte

The unique identifier for the holiday whose schedule is to be set.

localStartTime: UInt

The starting time for the holiday schedule in Epoch Time in seconds with local time offset based on the local timezone and DST offset on the day represented by the value.

localEndTime: UInt

The ending time for the holiday schedule in Epoch Time in seconds with local time offset based on the local timezone and DST offset on the day represented by the value.

operatingMode: DoorLockTrait.OperatingModeEnum

The operating mode to use for the specified holiday schedule start and end time. Valid values are defined by OperatingModeEnum.

setUser

suspend fun setUser(
    operationType: DoorLockTrait.DataOperationTypeEnum,
    userIndex: UShort,
    userName: String?,
    userUniqueId: UInt?,
    userStatus: DoorLockTrait.UserStatusEnum?,
    userType: DoorLockTrait.UserTypeEnum?,
    credentialRule: DoorLockTrait.CredentialRuleEnum?
): Unit

Set the user on the lock.

Parameters
operationType: DoorLockTrait.DataOperationTypeEnum

The operation to perform. Valid values are defined by DataOperationTypeEnum.

userIndex: UShort

The unique identifier for the user to set on the lock.

userName: String?

The user name of the user to set on the lock.

userStatus: DoorLockTrait.UserStatusEnum?

The status of the user to set on the lock. Valid values are defined by UserStatusEnum.

userType: DoorLockTrait.UserTypeEnum?

The type of the user. Valid values are defined by UserTypeEnum.

credentialRule: DoorLockTrait.CredentialRuleEnum?

The credential rule. Valid values are defined by CredentialRuleEnum.

setWeekDaySchedule

suspend fun setWeekDaySchedule(
    weekDayIndex: UByte,
    userIndex: UShort,
    daysMask: DoorLockTrait.DaysMaskMap,
    startHour: UByte,
    startMinute: UByte,
    endHour: UByte,
    endMinute: UByte
): Unit

Set a weekly repeating schedule for the specified user.

Parameters
weekDayIndex: UByte

The unique identifier for the week day.

userIndex: UShort

The unique identifier for the user for whom the repeating schedule is being set.

daysMask: DoorLockTrait.DaysMaskMap

The days that constitute the repeating schedule. Valid values are defined by DaysMaskMap.

startHour: UByte

The start hour of the repeating event.

startMinute: UByte

The start minute of the repeating event.

endHour: UByte

The end hour of the repeating event.

endMinute: UByte

The end minute of the repeating event.

setYearDaySchedule

suspend fun setYearDaySchedule(
    yearDayIndex: UByte,
    userIndex: UShort,
    localStartTime: UInt,
    localEndTime: UInt
): Unit

Set a time-specific schedule ID for a specified user.

Parameters
yearDayIndex: UByte

The unique identifier for the year day schedule.

userIndex: UShort

The unique identifier for the user for whom the repeating schedule is being set.

localStartTime: UInt

The starting time for the year day schedule in Epoch Time in seconds with local time offset based on the local timezone and DST offset on the day represented by the value.

localEndTime: UInt

The ending time for the year day schedule in Epoch Time in seconds with local time offset based on the local timezone and DST offset on the day represented by the value.

unboltDoor

suspend fun unboltDoor(optionalArgs: DoorLockTrait.UnboltDoorCommand.OptionalArgs.() -> Unit = {}): Unit

Disengage the deadbolt.

Parameters
optionalArgs: DoorLockTrait.UnboltDoorCommand.OptionalArgs.() -> Unit = {}

Receiver for the optional arguments of this command

unlockDoor

suspend fun unlockDoor(optionalArgs: DoorLockTrait.UnlockDoorCommand.OptionalArgs.() -> Unit = {}): Unit

Unlock the door.

Parameters
optionalArgs: DoorLockTrait.UnlockDoorCommand.OptionalArgs.() -> Unit = {}

Receiver for the optional arguments of this command

unlockWithTimeout

suspend fun unlockWithTimeout(timeout: UShort, optionalArgs: DoorLockTrait.UnlockWithTimeoutCommand.OptionalArgs.() -> Unit = {}): Unit

Unlock the door with a timeout parameter. After the timeout, the door automatically relocks.

Parameters
timeout: UShort

The number of seconds to wait before relocking the door lock.

optionalArgs: DoorLockTrait.UnlockWithTimeoutCommand.OptionalArgs.() -> Unit = {}

Receiver for the optional arguments of this command