TTLock class

Constructors

TTLock()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

isListenEvent bool
read / write
isOnPremise bool
read / write
printLog bool
read / write
scanCommandList List<String>
read / write

Static Methods

activateLift(String floors, String lockData, TTLiftCallback callback, TTFailedCallback failedCallback) → void
addCard(List<TTCycleModel> cycleList, int startDate, int endDate, String lockData, TTAddCardProgressCallback progressCallback, TTAddCardCallback callback, TTFailedCallback failedCallback) → void
Add a card [...]
addFingerprint(List<TTCycleModel> cycleList, int startDate, int endDate, String lockData, TTAddFingerprintProgressCallback progressCallback, TTAddFingerprintCallback callback, TTFailedCallback failedCallback) → void
Add a fingerprint [...]
addPassageMode(TTPassageModeType type, List<int> weekly, List<int> monthly, int startTime, int endTime, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Config the lock passage mode. If config succeed,the lock will always be unlocked [...]
clearAllCards(String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Clear all cards [...]
clearAllFingerprints(String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Clear all fingerprints [...]
clearAllPassageModes(String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Clear all passage modes [...]
controlLock(String lockData, TTControlAction controlAction, TTControlLockCallback callback, TTFailedCallback failedCallback) → void
Lock or unlock the lock
createCustomPasscode(String passcode, int startDate, int endDate, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Create custom passcode [...]
deleteCard(String cardNumber, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Delete the card [...]
deleteFingerprint(String fingerprintNumber, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Delete the fingerprint [...]
deletePasscode(String passcode, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Delete passcode [...]
getAllValidCards(String lockData, TTGetAllCardsCallback callback, TTFailedCallback failedCallback) → void
Get all valid cards [...]
getAllValidFingerprints(String lockData, TTGetAllFingerprintsCallback callback, TTFailedCallback failedCallback) → void
Get all valid fingerprints [...]
getAllValidPasscode(String lockData, TTGetAllPasscodeCallback callback, TTFailedCallback failedCallback) → void
Get all valid cards [...]
getBluetoothState(TTBluetoothStateCallback stateCallback) → void
Current Phone/Pad Bluetooth state
getDoorSensorLockingSwitchState(String lockData, TTGetSwitchStateCallback callback, TTFailedCallback failedCallback) → void
getDoorSensorState(String lockData, TTGetSwitchStateCallback callback, TTFailedCallback failedCallback) → void
getLockAutomaticLockingPeriodicTime(String lockData, TTGetLockAutomaticLockingPeriodicTimeCallback callback, TTFailedCallback failedCallback) → void
Get the lock automatic locking periodic time [...]
getLockConfig(TTLockConfig config, String lockData, TTGetSwitchStateCallback callback, TTFailedCallback failedCallback) → void
getLockOperateRecord(TTOperateRecordType type, String lockData, TTGetLockOperateRecordCallback callback, TTFailedCallback failedCallback) → void
Get the lock operate record [...]
getLockPower(String lockData, TTGetLockElectricQuantityCallback callback, TTFailedCallback failedCallback) → void
Get the lock power [...]
getLockRemoteUnlockSwitchState(String lockData, TTGetSwitchStateCallback callback, TTFailedCallback failedCallback) → void
Set the lock remote unlock switch [...]
getLockSwitchState(String lockData, TTGetLockStatusCallback callback, TTFailedCallback failedCallback) → void
Get the lock switch state [...]
getLockTime(String lockData, TTGetLockTimeCallback callback, TTFailedCallback failedCallback) → void
Get the lock time [...]
initLock(Map map, TTLockDataCallback callback, TTFailedCallback failedCallback) → void
Initialize the lock map {"lockMac": string, "lockVersion": string, "isInited": bool}
invoke(String command, Object parameter, Object success, {Object progress, Object fail}) → void
modifyAdminPasscode(String adminPasscode, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Modify admin passcode [...]
modifyCardValidityPeriod(String cardNumber, List<TTCycleModel> cycleList, int startDate, int endDate, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Modify the card valid date [...]
modifyFingerprintValidityPeriod(String fingerprintNumber, List<TTCycleModel> cycleList, int startDate, int endDate, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Modify the fingerprint valid date [...]
modifyPasscode(String passcodeOrigin, String passcodeNew, int startDate, int endDate, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Moddify passcode or passcode valid date [...]
resetEkey(String lockData, TTLockDataCallback callback, TTFailedCallback failedCallback) → void
Reset all eKeys
resetLock(String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Reset the lock
resetPasscode(String lockData, TTLockDataCallback callback, TTFailedCallback failedCallback) → void
All passcodes will be invalid except admin passcode
setDoorSensorLockingSwitchState(bool isOn, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
setHotel(String hotelInfo, int buildingNumber, int floorNumber, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
setHotelCardSector(String sector, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
setLiftControlable(String floors, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
setLiftWorkMode(TTLiftWorkActivateType type, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
setLockAutomaticLockingPeriodicTime(int time, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Set the lock automatic locking periodic time [...]
setLockConfig(TTLockConfig config, bool isOn, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
setLockRemoteUnlockSwitchState(bool isOn, String lockData, TTLockDataCallback callback, TTFailedCallback failedCallback) → void
Get the lock remote unlock switch state [...]
setLockTime(int timestamp, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
Set the lock time [...]
setPowerSaverControlableLock(String lockMac, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
setPowerSaverWorkMode(TTPowerSaverWorkType type, String lockData, TTSuccessCallback callback, TTFailedCallback failedCallback) → void
startScanLock(TTLockScanCallback scanCallback) → void
Scan the smart lock being broadcast
stopScanLock() → void
Stop scan the smart lock being broadcast
supportFunction(TTLockFuction fuction, String lockData, TTFunctionSupportCallback callback) → void
Function support

Constants

CALLBACK_FAIL → const String
"callback_fail"
CALLBACK_PROGRESS → const String
"callback_progress"
CALLBACK_SUCCESS → const String
"callback_success"
COMMAND_ACTIVE_LIFT_FLOORS → const String
"activateLiftFloors"
COMMAND_ADD_CARD → const String
"addCard"
COMMAND_ADD_FINGERPRINT → const String
"addFingerprint"
COMMAND_ADD_PASSAGE_MODE → const String
"addPassageMode"
COMMAND_CLEAR_ALL_CARD → const String
"clearAllIcCard"
COMMAND_CLEAR_ALL_FINGERPRINT → const String
"clearAllFingerprint"
COMMAND_CLEAR_ALL_PASSAGE_MODE → const String
"clearAllPassageModes"
COMMAND_CONTROL_LOCK → const String
"controlLock"
COMMAND_CREATE_CUSTOM_PASSCODE → const String
"createCustomPasscode"
COMMAND_DELETE_CARD → const String
"deleteIcCard"
COMMAND_DELETE_FINGERPRINT → const String
"deleteFingerprint"
COMMAND_DELETE_PASSCODE → const String
"deletePasscode"
COMMAND_FUNCTION_SUPPORT → const String
"functionSupport"
COMMAND_GET_ALL_VALID_CARD → const String
"getAllValidIcCard"
COMMAND_GET_ALL_VALID_FINGERPRINT → const String
"getAllValidFingerprint"
COMMAND_GET_ALL_VALID_PASSCODE → const String
"getAllValidPasscode"
COMMAND_GET_AUTOMATIC_LOCK_PERIODIC_TIME → const String
"getLockAutomaticLockingPeriodicTime"
COMMAND_GET_BLUETOOTH_STATE → const String
"getBluetoothState"
COMMAND_GET_DOOR_SENSOR_STATE → const String
"getDoorSensorState"
COMMAND_GET_DOOR_SENSOR_SWITCH → const String
"getDoorSensorSwitch"
COMMAND_GET_LOCK_CONFIG → const String
"getLockConfig"
COMMAND_GET_LOCK_OPERATE_RECORD → const String
"getLockOperateRecord"
COMMAND_GET_LOCK_POWER → const String
"getLockPower"
COMMAND_GET_LOCK_REMOTE_UNLOCK_SWITCH_STATE → const String
"getLockRemoteUnlockSwitchState"
COMMAND_GET_LOCK_SWITCH_STATE → const String
"getLockSwitchState"
COMMAND_GET_LOCK_TIME → const String
"getLockTime"
COMMAND_GET_NB_AWAKE_MODES → const String
"getNBAwakeModes"
COMMAND_GET_NB_AWAKE_TIMES → const String
"getNBAwakeTimes"
COMMAND_INIT_LOCK → const String
"initLock"
COMMAND_MODIFY_ADMIN_PASSCODE → const String
"modifyAdminPasscode"
COMMAND_MODIFY_CARD → const String
"modifyIcCard"
COMMAND_MODIFY_FINGERPRINT → const String
"modifyFingerprint"
COMMAND_MODIFY_PASSCODE → const String
"modifyPasscode"
COMMAND_RESET_EKEY → const String
"resetEkey"
COMMAND_RESET_LOCK → const String
"resetLock"
COMMAND_RESET_PASSCODE → const String
"resetPasscodes"
COMMAND_SET_AUTOMATIC_LOCK_PERIODIC_TIME → const String
"setLockAutomaticLockingPeriodicTime"
COMMAND_SET_DOOR_SENSOR_SWITCH → const String
"setDoorSensorSwitch"
COMMAND_SET_HOTLE_CARD_SECTOR → const String
"setHotelCardSector"
COMMAND_SET_HOTLE_INOF → const String
"setHotelInfo"
COMMAND_SET_LIFT_CONTROLABLE_FLOORS → const String
"setLiftControlableFloors"
COMMAND_SET_LIFT_WORK_MODE → const String
"setLiftWorkMode"
COMMAND_SET_LOCK_CONFIG → const String
"setLockConfig"
COMMAND_SET_LOCK_REMOTE_UNLOCK_SWITCH_STATE → const String
"setLockRemoteUnlockSwitchState"
COMMAND_SET_LOCK_TIME → const String
"setLockTime"
COMMAND_SET_NB_AWAKE_MODES → const String
"setNBAwakeModes"
COMMAND_SET_NB_AWAKE_TIMES → const String
"setNBAwakeTimes"
COMMAND_SET_POWSER_SAVER_CONTROLABLE → const String
"setPowerSaverControlable"
COMMAND_SET_POWSER_SAVER_WORK_MODE → const String
"setPowerSaverWorkMode"
COMMAND_START_SCAN_LOCK → const String
"startScanLock"
COMMAND_STOP_SCAN_LOCK → const String
"stopScanLock"