本文へスキップ

Door Control API

API that configures whether the device is set as entrance/exit of the door, how the device will control the door, and the APB settings.



Structure​

BS2DoorRelay​

typedef struct {
uint32_t deviceID;
uint8_t port;
uint8_t reserved[3];
} BS2DoorRelay;
  1. deviceID

    Device ID.

  2. port

    Relay port number.

  3. reserved

    Reserved space.

BS2DoorSensor​

typedef struct {
uint32_t deviceID;
uint8_t port;
uint8_t switchType;
uint8_t apbUseDoorSensor;​
uint8_t reserved[1];
} BS2DoorSensor ;
  1. deviceID

    Device ID.

  2. port

    Input port number.

  3. switchType

    Type of the switch.

    ValueDescription
    0Normally open
    1Normally closed
  4. ​apbUseDoorSensor

    Decides whether to use a door sensor for APB.

  5. *reserved`

    Reserved space.

BS2ExitButton​

typedef struct {
uint32_t deviceID;
uint8_t port;
uint8_t switchType;
uint8_t reserved[2];
} BS2ExitButton ;
  1. deviceID

    Device ID.

  2. port

    Input port number.

  3. switchType

    Type of the switch.

    ValueDescription
    0Normally open
    1Normally closed
  4. reserved

    Reserved space.

BS2DoorStatus​

typedef struct {
uint32_t id;
uint8_t opened;
uint8_t unlocked;
uint8_t heldOpened;
uint8_t unlockFlags;
uint8_t lockFlags;
uint8_t alarmFlags;
uint8_t reserved[2];
uint32_t lastOpenTime;
} BS2DoorStatus;
  1. id

    Door ID.

  2. opened

    Determines whether the door is opened.

  3. unlocked

    Determines whether the door is unlocked.

  4. heldOpened

    Determines whether the door's status is held open.

  5. unlockFlags

    The priority of when the door gets unlocked, which will not operate if the priority is lower than the lock's priority. For example, if the door is locked with the operator priority, all users entry will not be allowed. The unlockFlags and lockFlags cannot have the same priority besides the default priority NONE.

    ValueDescriptionPriority
    0NoneNormal
    1ScheduledHigh
    4OperatorVery high
    2EmergencyHighest
  6. lockFlags

    The priority of when the door gets locked, which will not operate if the priority is lower than the unlock's priority.

    ValueDescriptionPriority
    0NoneNormal
    1ScheduledHigh
    4OperatorVery high
    2EmergencyHighest
  7. alarmFlags

    Status of the door alarm.

    ValueDescription
    0No alarm
    1Forced open
    4Held open
    2APB violation
    8Lock override
    16Fire alarm
  8. reserved

    Reserved space.

  9. lastOpenTime

    The last time of when the door was open.

BS2Door​

typedef struct {
uint32_t doorID;
char name[BS2_MAX_DOOR_NAME_LEN];
uint32_t entryDeviceID;
uint32_t exitDeviceID;
BS2DoorRelay relay;
BS2DoorSensor sensor;
BS2ExitButton button;
uint32_t autoLockTimeout;
uint32_t heldOpenTimeout;
uint8_t instantLock;
uint8_t unlockFlags;
uint8_t lockFlags;
uint8_t unconditionalLock;
BS2Action forcedOpenAlarm[BS2_MAX_FORCED_OPEN_ALARM_ACTION];
BS2Action heldOpenAlarm[BS2_MAX_HELD_OPEN_ALARM_ACTION];
uint32_t dualAuthScheduleID;
uint8_t dualAuthDevice;
uint8_t dualAuthApprovalType;
uint16_t extendedAutoLockTimeout;
uint32_t dualAuthTimeout;
uint8_t numDualAuthApprovalGroups;
uint8_t unused[2];
uint8_t reserved2[1];
uint32_t dualAuthApprovalGroupID[BS2_MAX_DUAL_AUTH_APPROVAL_GROUP];
BS2AntiPassbackZone apbZone;
} BS2Door;
  1. doorID

    Door ID. For V1 devices, ID should be defined less than 65535.

  2. name

    Name of the door that will be displayed on the BioStar application. For V1 devices, name can't be defined.

  3. entryDeviceID

    Entry device ID.

  4. exitDeviceID

    Exit device ID.

  5. relay

    Door relay.

  6. sensor

    Sensor that detects the open/closed status of the door.

  7. button

    Exit button.

  8. autoLockTimeout

    Time for the door to lock after it has been opened. The unit is seconds.

  9. heldOpenTimeout

    Time for the door to be determined as held open. The unit is seconds.

  10. instantLock

    Decides whether to immediately lock the door when the sensor detects the door as closed.

  11. unlockFlags

    The priority of when the door gets unlocked, which will not operate if the priority is lower than the lock's priority. For example, if the door is locked with the operator priority, all users entry will not be allowed. The unlockFlags and lockFlags cannot have the same priority besides the default priority NONE.

    ValueDescriptionPriority
    0NoneNormal
    1ScheduledHigh
    4OperatorVery high
    2EmergencyHighest
  12. lockFlags

    The priority of when the door gets locked, which will not operate if the priority is lower than the unlock's priority.

    ValueDescriptionPriority
    0NoneNormal
    1ScheduledHigh
    4OperatorVery high
    2EmergencyHighest
  13. unconditionalLock

    Flag that decides whether to lock the door after autoLock timeout.

    ValueDescription
    0Locks the door only when the door is closed after the autoLockTimeout.
    1Locks the door regardless if the door is opened or closed.
  14. forcedOpenAlarm

    Alarm that gets triggered when the door is forced open, which can be configured up to 5 alarms.

  15. heldOpenAlarm

    Alarm that gets triggered when the door is held open, which can be configured up to 5 alarms.

  16. dualAuthScheduleID

    Schedule for the dual authentication. Set the value as 0 for disable, 1 for enable, or set a schedule ID.

  17. dualAuthDevice

    Decides which device should perform a dual authentication.

    ValueDescription
    0None
    1Only on entry device
    2Only on exit device
    3Both
  18. dualAuthApprovalType

    Decides whether to distinguish if the user belongs to an access group having authority when accessing the door .

    ValueDescription
    0None
    1Check the last user's authority
  19. extendedAutoLockTimeout

    + v2.9.12 Sets the extended access granted time in seconds. The default value is 10 seconds.

  20. dualAuthTimeout

    After the first user completes authentication, this is the time to wait until the second user attempts authentication. (Unit: seconds)

  21. numDualAuthApprovalGroups

    Total number of groups with dual access authorization.

  22. unused

    Reserved space.

  23. reserved2

    Reserved space.

  24. dualAuthApprovalGroupID

    List of access groups having dual authentication authority, which can be configured up to 16 access groups.

  25. apbZone

    Configures Anti Passback on the door. The Anti Passback zone ID and door ID is equivalent. Refer zone_control_apifor further information.

このページは役に立ちましたか?