Door Control API > BS2_TimedLockDoor
[+ 2.9.12] Locks the door for a specified time, and when the time elapses (timeout), the door restores to its previous state (normalize).
This feature is useful for preventing administrators from omitting door state restoration.
Time can be set in seconds from 1 second to 86,400 seconds (24 hours), and except for the time setting, it is identical to BS2_LockDoor.
#include "BS_API.h" int BS2_TimedLockDoor(void* context, BS2_DEVICE_ID deviceId, BS2_DOOR_FLAG flag, BS2_DOOR_ID* doorIds, uint32_t doorIdCount, uint32_t timeout);
context : ContextdeviceId : Device IDflag : Door closed state to adddoorIds : door id listdoorIdCount : Number of door ids in the listtimeout : Lock time (seconds)
Returns BS_SDK_SUCCESS when performed successfully, and returns the corresponding error code when an error occurs.