Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:zone_control_api [2018/03/15 14:34]
yjjung
en:zone_control_api [2023/09/01 08:37] (current)
Line 1: Line 1:
 ====== Zone Control API ====== ====== Zone Control API ======
  
-API that configures the zone, which can control the entry device and door's operations. In BioStar, it is able to configure up to 4 types of zones. This feature will allow to divide one managing area to several zones for access control\\+API that configures the zone, which can control the entry device and door's operations. This feature will allow to divide one managing area into several zones for access control\\
  
 ---- ----
Line 16: Line 16:
   * [[BS2_ClearAntiPassbackZoneStatus]]:​ Updates selected users to be not violating against the Anti Passback zone rule.   * [[BS2_ClearAntiPassbackZoneStatus]]:​ Updates selected users to be not violating against the Anti Passback zone rule.
   * [[BS2_ClearAllAntiPassbackZoneStatus]]:​ Updates all users to be not violating against the Anti Passback zone rule.   * [[BS2_ClearAllAntiPassbackZoneStatus]]:​ Updates all users to be not violating against the Anti Passback zone rule.
- +  * [[BS2_SetCheckGlobalAPBViolationHandler]]:​​ Registers callback function for global determination when an APB violation alarm occurs. 
-----+  * [[BS2_CheckGlobalAPBViolation]]:​​ Transfers Global APB results to the device.
 ==== Timed Anti Passback Zone ==== ==== Timed Anti Passback Zone ====
 To prevent a user from re-entering in a certain time, a Timed Anti Passback zone can be used. This zone offers two options(soft,​ hard) as same as the Anti Passback zone.  To prevent a user from re-entering in a certain time, a Timed Anti Passback zone can be used. This zone offers two options(soft,​ hard) as same as the Anti Passback zone. 
Line 67: Line 67:
   * [[BS2_RemoveIntrusionAlarmZone]]:​ Removes selected Intrusion Alarm zones.   * [[BS2_RemoveIntrusionAlarmZone]]:​ Removes selected Intrusion Alarm zones.
   * [[BS2_RemoveAllIntrusionAlarmZone]]:​ Removes all Intrusion Alarm zones.   * [[BS2_RemoveAllIntrusionAlarmZone]]:​ Removes all Intrusion Alarm zones.
-  * [[BS2_SetIntrusionAlarmZoneArm]]:​ Configures Intrusion Alarm zones status Intrusion On/Off. +
-  * +
 \\ \\
 ---- ----
Line 76: Line 75:
   * [[BS2_GetInterlockZone]]:​ Gets selected Interlock zones.   * [[BS2_GetInterlockZone]]:​ Gets selected Interlock zones.
   * [[BS2_GetInterlockZoneStatus]]:​ Gets selected Interlock zone status.   * [[BS2_GetInterlockZoneStatus]]:​ Gets selected Interlock zone status.
-  * [[BS2_GetAllInterlockZoneStatus]]: ​모든 인터락 구역의 상태 정보를 가져옵니다+  * [[BS2_GetAllInterlockZoneStatus]]: ​Gets all Interlock zone's status information
-  * [[BS2_SetInterlockZone]]: ​인터락 구역을 설정합니다+  * [[BS2_SetInterlockZone]]: ​Sets Interlock Zones
-  * [[BS2_SetInterlockZoneAlarm]]: ​인터락 구역의 경보 상태를 갱신합니다+  * [[BS2_SetInterlockZoneAlarm]]: ​Updates the alarm status in the Interlock zone
-  * [[BS2_RemoveInterlockZone]]: ​주어진 인터락 구역을 제거합니다+  * [[BS2_RemoveInterlockZone]]: ​Removes the selected Interlock zone
-  * [[BS2_RemoveAllInterlockZone]]: ​모든 인터락 구역을 제거합니다.+  * [[BS2_RemoveAllInterlockZone]]: ​Removes all Interlock zones.
 \\ \\
 ---- ----
 ==== Ethernet Zone ==== ==== Ethernet Zone ====
-Not BioStar V2.x server, but specific device acts as Zone Master. Ethernet zone uses Ethernet TCP protocol between devices(Master <-> Members).+Not BioStar V2.x server, but specific device acts as Zone Master. Ethernet zone uses Ethernet TCP protocol between devices(Master <-> Members). ​
  
-Curruently, it only supports ​correspoding ​features to exisiting ​1.x Entrance Limit, Fire Alarm Zone. +Currently, it only supports ​corresponding ​features to existing ​1.x Entrance Limit, Fire Alarm Zone. It is supported on A2(FW 1.4.0 or higher), BS2(FW 1.5.0 or higher), FS2(FW 1.1.0 or higher), FL(FW 1.0.0 or higher) and P2(FW 1.0.0 or higher)
   * [[BS2_GetDeviceZone]]:​ Retrieves selected Ethernet zones..  ​   * [[BS2_GetDeviceZone]]:​ Retrieves selected Ethernet zones..  ​
   * [[BS2_GetAllDeviceZone]]:​ Retrieves all Ethernet zones.   * [[BS2_GetAllDeviceZone]]:​ Retrieves all Ethernet zones.
Line 95: Line 94:
   * [[BS2_ClearDeviceZoneAccessRecord]]:​ Updates selected users to be not violating against the Ethernet zone rule.   * [[BS2_ClearDeviceZoneAccessRecord]]:​ Updates selected users to be not violating against the Ethernet zone rule.
   * [[BS2_ClearAllDeviceZoneAccessRecord]]:​ Updates all users to be not violating against the Ethernet rule.   * [[BS2_ClearAllDeviceZoneAccessRecord]]:​ Updates all users to be not violating against the Ethernet rule.
-  * [[BS2_GetAccessGroupEntranceLimit]]:​ Retrieves selected Ethernet Access Group Entrance limit. ​ 
-  * [[BS2_GetAllAccessGroupEntranceLimit]]:​ Retrieves all access group entrance limit. 
-  * [[BS2_SetAccessGroupEntranceLimit]]:​ Configures access group entrance limit..  ​ 
-  * [[BS2_RemoveAccessGroupEntranceLimit]]:​ Removes selected access group entrance limit. 
-  * [[BS2_RemoveAllAccessGroupEntranceLimit]]:​ Removes all access group entrance limit 
   * [[BS2_GetDeviceZoneAGEntranceLimit]]:​ Retrieves selected Ethernet Access Group Entrance limit.   * [[BS2_GetDeviceZoneAGEntranceLimit]]:​ Retrieves selected Ethernet Access Group Entrance limit.
   * [[BS2_GetAllDeviceZoneAGEntranceLimit]]:​ Retrieves all Ethernet Access Group Entrance limit.   * [[BS2_GetAllDeviceZoneAGEntranceLimit]]:​ Retrieves all Ethernet Access Group Entrance limit.
Line 105: Line 99:
   * [[BS2_RemoveDeviceZoneAGEntranceLimit]]:​ Removes selected Ethernet access group entrance limit.   * [[BS2_RemoveDeviceZoneAGEntranceLimit]]:​ Removes selected Ethernet access group entrance limit.
   * [[BS2_RemoveAllDeviceZoneAGEntranceLimit]]:​ Removes all Ethernet access group entrance limit.   * [[BS2_RemoveAllDeviceZoneAGEntranceLimit]]:​ Removes all Ethernet access group entrance limit.
 +  * [[BS2_GetDeviceZoneMasterConfig]]:​ Retrieves the zone master config of the Ethernet zone.
 +  * [[BS2_SetDeviceZoneMasterConfig]]:​ Configures the zone master config of the Ethernet zone.
 +  * [[BS2_RemoveDeviceZoneMasterConfig]]:​ Removes the zone master config of the Ethernet zone.
 \\ \\
 ---- ----
 +==== Lift Lock/Unlock Zone ====
 +[+ 2.7.0] To control the elevator floor regardless of access groups but only based on schedules, Lift lock/unlock zone can be used.
 +  * [[BS2_GetLiftLockUnlockZone]]:​ Retrieves selected Lift Lock/Unlock zones.
 +  * [[BS2_GetAllLiftLockUnlockZone]]:​ Retrieves all Lift Lock/Unlock zones.
 +  * [[BS2_GetLiftLockUnlockZoneStatus]]:​ Retrieves the status of selected Lift Lock/Unlock zones.
 +  * [[BS2_GetAllLiftLockUnlockZoneStatus]]:​ Retrieves the status of all Lift Lock/Unlock zones.
 +  * [[BS2_SetLiftLockUnlockZone]]:​ Configures a Lift Lock/Unlock zone.
 +  * [[BS2_SetLiftLockUnlockZoneAlarm]]:​ Configures the alarm status of the Lift Lock/Unlock zone.
 +  * [[BS2_RemoveLiftLockUnlockZone]]:​ Removes selected Lift Lock/Unlock zones.
 +  * [[BS2_RemoveAllLiftLockUnlockZone]]:​ Removes all Lift Lock/Unlock zones.
 +\\
 +----
 +==== Callback Function ====
 +==== OnCheckGlobalAPBViolation ====
 +Callback function for global determination when an APB violation alarm occurs.
 +<code cpp>
 +typedef void (*OnCheckGlobalAPBViolation)(uint32_t deviceId, uint16_t seq, const char* userID_1, const char* userID_2, bool isDualAuth);​
 +</​code>​
 +\\
  
 +1. //​deviceId//​ \\ 
 +Device ID  \\ \\ 
 +2. //seq// \\ 
 +Packet sequence number \\ \\ 
 +3. //​userID_1//​ \\ 
 +User ID 1  \\ \\ 
 +4. //​userID_2//​ \\ 
 +User ID 2  \\ \\ 
 +5. //​isDualAuth//​ \\ 
 +Indicates whether to Dual authentication. ​ \\ \\ 
  
 ===== Structure ====== ===== Structure ======
Line 125: Line 151:
 <WRAP group 50%> <WRAP group 50%>
 ^Value ​ ^Description ​ ^ ^Value ​ ^Description ​ ^
-|0 |Normal ​ |+|0 |Normal, Disarm ​ |
 |1 |Alarm triggered ​ | |1 |Alarm triggered ​ |
-|2 |Scheduled ​lock  | +|2 |Scheduled ​locked, Lift locked ​ | 
-|4 |Scheduled ​unlock ​ |+|4 |Scheduled ​unlocked, Lift unlocked ​ | 
 +|8 |Arm  |
 </​WRAP> ​ </​WRAP> ​
  
Line 235: Line 262:
 Reserved space. \\ \\ Reserved space. \\ \\
 9. //​resetDuration//​ \\  9. //​resetDuration//​ \\ 
-The time interval for initializing ​the users status when a user violates ​the APB ruleWhen the value is set to 0, this means that it will not initialize ​the status, and will be initialized ​only through the BioStar application. \\ \\+It means the time until the APB violation ​status ​is initialized(released),​ unit is second. At this time, the initialization time is calculated based on the time when the last authentication succeededIf this value is set to 0, it means not to initialize ​but can be initialized ​with BS2_ClearAntiPassbackZoneStatus. \\ \\
 10. //alarm// \\  10. //alarm// \\ 
 An alarm that will be triggered when a user violates the user APB rule, which can be configured up to 5 alarms. \\ \\ An alarm that will be triggered when a user violates the user APB rule, which can be configured up to 5 alarms. \\ \\
Line 468: Line 495:
  as **IntrusionAlarmZone.numDoors**. ​ \\ \\   as **IntrusionAlarmZone.numDoors**. ​ \\ \\ 
 7. //​groupIDs//​ \\  7. //​groupIDs//​ \\ 
-Access group list which belongs to Intrusion alarm zone. It needs to exist as much +Access group list which belongs to Intrusion alarm zone. It needs to exist as much as **IntrusionAlarmZone.numGroups**.  \\ \\  
- as **IntrusionAlarmZone.numGroups**. ​ \\ \\ +==== BS2InterlockZone==== 
 +<code cpp> 
 +typedef struct { 
 +    uint32_t zoneID; 
 +    char name[BS2_MAX_ZONE_NAME_LEN];​ 
 +    uint8_t disabled; 
 +    uint8_t numInputs;​ 
 +    uint8_t numOutputs;​ 
 +    uint8_t numDoors; 
 +    uint8_t reserved[8]; ​    
 +} BS2InterlockZone;​ 
 +</​code>​ 
 +1. //zoneID// \\  
 +Zone ID which needs to have a value higher than 1.\\ \\   
 +2. //name// \\  
 +Name of the zone that will be displayed on the BioStar application.. \\ \\ 
 +3. //​disabled//​ \\  
 +Decides whether the zone is disabled. ​ \\ \\  
 +4. //​numInputs//​ \\  
 +Number of intrusion detecting sensor inputs belonging to Interlock alarm zone. \\ \\  
 +5. //​numOutputs//​ \\  
 +Number of outputs belonging to Interlock alarm zone. \\ \\ 
 +6. //​numDoors//​ \\  
 +Number of doors belonging to Interlock alarm zone.  \\ \\  
 +7. //​reserved//​ \\  
 +Reserved space. ​ \\ \\ 
 + 
 +==== BS2InterlockZoneBlob==== 
 +<code cpp> 
 +typedef struct { 
 +    BS2InterlockZone InterlockZone;​ 
 +    BS2InterlockZoneInput* inputObjs;​ 
 +    BS2InterlockZoneOutput* outputObjs;​ 
 +    BS2_DOOR_ID* doorIDs; 
 +} BS2InterlockZoneBlob;​ 
 +</​code>​ 
 +1. //​InterlockZone//​ \\  
 +Structure that defines the basic Interlock alarm zone information. ​ \\ \\  
 +2. //​inputObjs//​ \\  
 +Input list which belongs to Interlock alarm zone. It needs to exist as much as **InterlockAlarmZone.numInputs**. ​ \\ \\ 
 +3. //​outputObjs//​ \\  
 +Output list which belongs to Interlock alarm zone. It needs to exist as much as **InterlockAlarmZone.numOutputs**. ​ \\ \\  
 +4. //doorIDs// \\  
 +Door list which belongs to Interlock alarm zone. It needs to exist as much as **InterlockAlarmZone.numDoors**.  \\ \\ 
  
 ==== BS2DeviceZoneEntranceLimitMaster==== ==== BS2DeviceZoneEntranceLimitMaster====
Line 698: Line 768:
 8. //​accessGroupID//​ \\  8. //​accessGroupID//​ \\ 
 Access group ID list which can be configured up to 16.  \\ \\  Access group ID list which can be configured up to 16.  \\ \\ 
 +
 +==== BS2DeviceZoneMasterConfig ====
 +<code cpp>
 +typedef struct ​
 +{
 +    bool enable;
 +    uint8_t reserved1[1];​
 +    uint16_t listenPort;
 +    uint8_t reserved[4];​
 +} BS2DeviceZoneMasterConfig;​
 +</​code>​
 +1. //enable// \\ 
 +Decides whether the zone master is abled. \\ \\ 
 +2. //​reserved1//​ \\ 
 +Reserved space. ​ \\ \\ 
 +3. //​listenPort//​ \\ 
 +TCP/IP port information to be connected from slave devices. \\ \\ 
 +4. //​reserved//​ \\ 
 +Reserved space. ​ \\ \\