Door Control API > BS2_TimedUnlockDoor


[+ 2.9.12] Unlocks 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_UnlockDoor.

Declaration

#include "BS_API.h"
 
int BS2_TimedUnlockDoor(void* context, BS2_DEVICE_ID deviceId, BS2_DOOR_FLAG flag, BS2_DOOR_ID* doorIds, uint32_t doorIdCount, uint32_t timeout);

Parameters

  • [In] context : Context
  • [In] deviceId : Device ID
  • [In] flag : Door open state to add
  • [In] doorIds : door id list
  • [In] doorIdCount : Number of door ids in the list
  • [In] timeout : Unlock time (seconds)

Return Value

Returns BS_SDK_SUCCESS when performed successfully, and returns the corresponding error code when an error occurs.

See Also