本文へスキップ

Log Management API

API that controls the device log.



Callback Function​

OnLogReceived​

Callback function that is called when receiving a new log from the device.

typedef void (*OnLogReceived)(uint32_t deviceId, BS2Event* log);
  1. deviceId

    Device ID

  2. log

    New log information structure

OnLogReceivedEx​

+ v2.7.1 Callback function that is called when receiving a new log from the device.

The temperature information is transferred as the 3rd parameter, and auditTemperature should be true in BS2FaceConfigExt.

typedef void (*OnLogReceivedEx)(uint32_t deviceId, BS2Event* log, uint32_t temperature);
  1. deviceId

    Device ID

  2. log

    New log information structure

  3. temperature

    Temperature information

Structure​

BS2Event​

typedef struct {
uint32_t id;
uint32_t dateTime;
uint32_t deviceID;
union {
char userID[BS2_USER_ID_SIZE];
uint32_t uid;
uint32_t doorID;
uint32_t liftID;
uint32_t zoneID;
struct {
uint32_t ioDeviceID;
uint16_t port;
int8_t value;
uint8_t reserved[25];
};
struct {
uint32_t zoneID;
uint32_t doorID;
uint32_t ioDeviceID;
uint16_t port;
uint8_t reserved[18];
} alarm;
struct {
uint32_t zoneID;
uint32_t doorID[4];
uint8_t reserved[12];
} interlock;
struct {
uint16_t relayPort;
uint16_t inputPort;
uint8_t reserved[28];
} relayAction;
struct {
BS2_DEVICE_ID deviceId;
uint8_t data[28];
} osdpStandard;
};
union {
uint16_t code;
struct {
uint8_t subCode;
uint8_t mainCode;
};
};
uint8_t param;
#ifdef LESS_THAN_SDK_2_6_0
BS2_BOOL image; // Deprecated in V2.6.0
#else
uint8_t image: 1; // Supports image and DST by splitting bit unit
uint8_t isDST: 1;
uint8_t half: 1;
uint8_t hour: 4;
uint8_t negative: 1;
#endif
} BS2Event;
  1. id

    Log record ID which automatically increases from 1 when the log is generated.

  2. dateTime

    The time when the log has been generated. It means the seconds past from UTC until the current time.

  3. deviceID

    ID of the device that generated the log.

  4. userID

    User ID related to log. When the value is 0, the log is not relevant to user.

  5. uid

    You can refer to doorID regarding door log, zoneID regarding zone log. If you do not know exactly then you can refer to uid.

    Since uid, doorID, liftID, zoneID are declared as union, basically it means information such as unordered list.

  6. doorID

    ID of the door that generated the log.

  7. liftID

    ID of the lift that generated the log.

  8. zoneID

    ID of the zone that generated the log.

  9. ioDeviceID

    Door or Input device ID. When the value is 0, the log is not relevant to Door or Input device.

  10. port

    Port for ioDeviceID.

  11. value

    Port value for ioDeviceID and means below.

    • BS2_PORT_VALUE_UNKNOWN : -1

    • BS2_PORT_VALUE_OPEN : 0

    • BS2_PORT_VALUE_CLOSED : 1

    • BS2_PORT_VALUE_SUPERVISED_SHORT : 2

    • BS2_PORT_VALUE_SUPERVISED_OPEN : 3

  12. alarm.zoneID

    Zone ID that makes intrusion alarm zone alarms.

  13. alarm.doorID

    Door ID that makes intrusion alarm zone alarms.

  14. interlock.zoneID

    Zone ID that makes interlock zone alarms.

  15. interlock.doorID

    Door ID that makes interlock zone alarms.

  16. ​relayAction.relayPort

    Relay port identifier when IM-120 RelayAction takes place.

  17. `​relayAction.inputPort*​

    Relay port identifier when IM-120 RelayAction takes place.

  18. *osdpStandard.deviceId`

    Identifier of the OSDP standard device.

  19. osdpStandard.data

    This is notification structure information with a total size of 28 bytes generated from OSDP standard devices.

    For detailed information about the structure, please refer to BS2OsdpStandardDeviceNotify.

  20. subCode

    Sub code value of log types. Use if the additional information is necessary.

    CategoryEvent codeValueDescription
    VerifyBS2_SUB_EVENT_VERIFY_ID_PIN0x01ID and PIN verification success
    BS2_SUB_EVENT_VERIFY_ID_FINGER0x02ID and fingerprint verification success
    BS2_SUB_EVENT_VERIFY_ID_FINGER_PIN0x03ID, fingerprint, and PIN verification success
    BS2_SUB_EVENT_VERIFY_ID_FACE0x04ID and face verification success
    BS2_SUB_EVENT_VERIFY_ID_FACE_PIN0x05ID, face, and PIN verification success
    BS2_SUB_EVENT_VERIFY_CARD0x06Card verification success
    BS2_SUB_EVENT_VERIFY_CARD_PIN0x07Card and PIN verification success
    BS2_SUB_EVENT_VERIFY_CARD_FINGER0x08Card and fingerprint verification success
    BS2_SUB_EVENT_VERIFY_CARD_FINGER_PIN0x09Card, fingerprint, and PIN verification success
    BS2_SUB_EVENT_VERIFY_CARD_FACE0x0ACard and face verification success
    BS2_SUB_EVENT_VERIFY_CARD_FACE_PIN0x0BCard, PIN, and face verification success
    BS2_SUB_EVENT_VERIFY_AOC0x0CAOC card verification success
    BS2_SUB_EVENT_VERIFY_AOC_PIN0x0DAOC card and PIN verification success
    BS2_SUB_EVENT_VERIFY_AOC_FINGER0x0EAOC card and fingerprint verification success
    BS2_SUB_EVENT_VERIFY_AOC_FINGER_PIN0x0FAOC card, fingerprint, PIN verification success
    BS2_SUB_EVENT_VERIFY_CARD_FACE_FINGER0x10Card, face and finger verification sucess
    BS2_SUB_EVENT_VERIFY_CARD_FINGER_FACE0x11Card, finger and face verification sucess
    BS2_SUB_EVENT_VERIFY_ID_FACE_FINGER0x12ID, face and finger verification sucess
    BS2_SUB_EVENT_VERIFY_ID_FINGER_FACE0x13ID, finger and face verification sucess
    BS2_SUB_EVENT_VERIFY_MOBLIE_CARD0x16Mobile card verification success (+V2.8)
    BS2_SUB_EVENT_VERIFY_MOBILE_CARD_PIN0x17Mobile card and PIN verification success (+V2.8)
    BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FINGER0x18Mobile card and fingerprint verification success (+V2.8)
    BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FINGER_PIN0x19Mobile card, fingerprint, PIN verification success (+V2.8)
    BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FACE0x1AMobile card and face verification success (+V2.8)
    BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FACE_PIN0x1BMobile card, face, PIN verification success (+V2.8)
    BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FACE_FINGER0x20Mobile card, face, fingerprint verification success (+V2.8)
    BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FINGER_FACE0x21Mobile card, fingerprint, face verification success (+V2.8)
    BS2_SUB_EVENT_VERIFY_QR0x25QR verification success
    BS2_SUB_EVENT_VERIFY_QR_PIN0x26QR and PIN verification success
    BS2_SUB_EVENT_VERIFY_QR_FINGER0x27QR and finger verification success
    BS2_SUB_EVENT_VERIFY_QR_FINGER_PIN0x28QR, finger and PIN verification success
    BS2_SUB_EVENT_VERIFY_QR_FACE0x29QR and face verification success
    BS2_SUB_EVENT_VERIFY_QR_FACE_PIN0x2AQR, face and PIN verification success
    BS2_SUB_EVENT_VERIFY_QR_FACE_FINGER0x2BQR, face and finger verification success
    BS2_SUB_EVENT_VERIFY_QR_FINGER_FACE0x2CQR, finger and face verification success
    IdentifyBS2_SUB_EVENT_IDENTIFY_FINGER0x01Fingerprint identification success
    BS2_SUB_EVENT_IDENTIFY_FINGER_PIN0x02Fingerprint and PIN identification success
    BS2_SUB_EVENT_IDENTIFY_FACE0x03Face identification success
    BS2_SUB_EVENT_IDENTIFY_FACE_PIN0x04Face and PIN identification success
    BS2_SUB_EVENT_IDENTIFY_FACE_FINGER0x05Face and finger identification success
    BS2_SUB_EVENT_IDENTIFY_FACE_FINGER_PIN0x06Face, finger and PIN identification success
    BS2_SUB_EVENT_IDENTIFY_FINGER_FACE0x07Finger and face identification success
    BS2_SUB_EVENT_IDENTIFY_FINGER_FACE_PIN0x08Finger, face and PIN identification success
    UserBS2_SUB_EVENT_ENROLL_FAIL_INVALID_FACE0x01Enroll fail (Invalid face)
    BS2_SUB_EVENT_UPDATE_FAIL_INVALID_FACE0x01Update fail (Invalid face)
    BS2_SUB_EVENT_ENROLL_FAIL_MISMATCHED_FORMAT0x02Enroll fail (Mismatch format)
    BS2_SUB_EVENT_UPDATE_FAIL_MISMATCHED_FORMAT0x02Update fail (Mismatch format)
    BS2_SUB_EVENT_ENROLL_FAIL_FULL_CREDENTIAL0x03Enroll fail (Full credential)
    BS2_SUB_EVENT_UPDATE_FAIL_FULL_CREDENTIAL0x03Update fail (Full credential)
    BS2_SUB_EVENT_ENROLL_FAIL_INVALID_USER0x04Enroll fail (Invalid user)
    BS2_SUB_EVENT_UPDATE_FAIL_INVALID_USER0x04Update fail (Invalid user)
    BS2_SUB_EVENT_ENROLL_FAIL_INTERNAL_ERROR0x09Enroll fail (Internal error)
    BS2_SUB_EVENT_UPDATE_FAIL_INTERNAL_ERROR0x09Update fail (Internal error)
    AuthBS2_SUB_EVENT_DUAL_AUTH_FAIL_TIMEOUT0x01Dual authentication timeout
    BS2_SUB_EVENT_DUAL_AUTH_FAIL_ACCESS_GROUP0x02Attempted the dual authentication with invalid user
    BS2_SUB_EVENT_HIGH_TEMPERATURE0x00High temperature
    BS2_SUB_EVENT_NO_TEMPERATURE0x01No temperature
    BS2_SUB_EVENT_UNMASKED_FACE0x02Unmasked face
    BS2_SUB_EVENT_BYPASS_NO_VIOLATION0x00Bypass violation (No)
    BS2_SUB_EVENT_BYPASS_THERMAL_VIOLATION0x01Bypass violation (Thermal)
    BS2_SUB_EVENT_BYPASS_MASK_VIOLATION0x02Bypass violation (Mask)
    BS2_SUB_EVENT_BYPASS_MASK_THERMAL_VIOLATION0x03Bypass violation (Mask + Thermal)
    CredentialBS2_SUB_EVENT_CREDENTIAL_ID0x01Invalid user ID
    BS2_SUB_EVENT_CREDENTIAL_CARD0x02Invalid card
    BS2_SUB_EVENT_CREDENTIAL_PIN0x03Invalid PIN
    BS2_SUB_EVENT_CREDENTIAL_FINGER0x04Invalid fingerprint
    BS2_SUB_EVENT_CREDENTIAL_FACE0x05Invalid face
    BS2_SUB_EVENT_CREDENTIAL_AOC_PIN0x06Invalid AOC PIN
    BS2_SUB_EVENT_CREDENTIAL_AOC_FINGER0x07Invalid AOC fingerprint
    BS2_SUB_EVENT_CREDENTIAL_MOBILE_CARD0x08Invalid mobile card (+V2.8)
    BS2_SUB_EVENT_NON_NUMERIC_QR0x09Non numeric QR
    BS2_SUB_EVENT_CREDENTIAL_QR0x0CInvalid QR
    BS2_SUB_EVENT_NON_PRINTABLE_QR0x0AContains unusable characters
    BS2_SUB_EVENT_TOO_LONG_QR0x0BToo long QR
    AuthBS2_SUB_EVENT_AUTH_FAIL_INVALID_AUTH_MODE0x01Invalid authentication mode
    BS2_SUB_EVENT_AUTH_FAIL_INVALID_CREDENTIAL0x02Non-registered authentication method
    BS2_SUB_EVENT_AUTH_FAIL_TIMEOUT0x03Authentication timeout
    BS2_SUB_EVENT_AUTH_FAIL_MATCHING_REFUSAL0x04Matching refusal
    AccessBS2_SUB_EVENT_ACCESS_DENIED_ACCESS_GROUP0x01Access was denied because the user has not been registered for the access group
    BS2_SUB_EVENT_ACCESS_DENIED_DISABLED0x02Access was denied because the user is inactive
    BS2_SUB_EVENT_ACCESS_DENIED_EXPIRED0x03Access was denied because the user entry period was expired
    BS2_SUB_EVENT_ACCESS_DENIED_ON_BLACKLIST0x04Access was denied because the card is on the blacklist
    BS2_SUB_EVENT_ACCESS_DENIED_APB0x05Access was denied because the user has violated the anti-passback rule
    BS2_SUB_EVENT_ACCESS_DENIED_TIMED_APB0x06Access was denied because the user tried to enter the timed anti-passback zone within the limited time frame
    BS2_SUB_EVENT_ACCESS_DENIED_SCHEDULED_LOCK0x07Access was denied because the scheduled lock zone
    BS2_SUB_EVENT_ACCESS_EXCUSED_APB0x08It violated APB rules, but Access allowed (Soft APB)
    BS2_SUB_EVENT_ACCESS_EXCUSED_TIMED_APB0x09It violated Timed APB rules, but Access allowed (Soft APB)
    BS2_SUB_EVENT_ACCESS_DENIED_FACE_DETECTION0x0AAccess denied (Face detection failed)
    BS2_SUB_EVENT_ACCESS_DENIED_CAMERA_CAPTURE0x0BAccess denied (Camera capture failed)
    BS2_SUB_EVENT_ACCESS_DENIED_FAKE_FINGER0x0CAccess denied (Fake finger)
    BS2_SUB_EVENT_ACCESS_DENIED_DEVICE_ZONE_ENTRANCE_LIMIT0x0DAccess denied (Device zone entrance limit)
    BS2_SUB_EVENT_ACCESS_DENIED_INTRUSION_ALARM0x0EAccess denied (Intrusion alarm)
    BS2_SUB_EVENT_ACCESS_DENIED_INTERLOCK0x0FAccess denied (Interlock)
    BS2_SUB_EVENT_ACCESS_EXCUSED_AUTH_LIMIT0x10It violated authentication limit, but access allowed
    BS2_SUB_EVENT_ACCESS_DENIED_AUTH_LIMIT0x11Access denied (Authentication limit)
    BS2_SUB_EVENT_ACCESS_DENIED_ANTI_TAILGATE0x12Access denied (Anti-tailgate)
    BS2_SUB_EVENT_ACCESS_DENIED_HIGH_TEMPERATURE0x13Access denied (High temperature)
    BS2_SUB_EVENT_ACCESS_DENIED_NO_TEMPERATURE0x14Access denied (No temperature)
    BS2_SUB_EVENT_ACCESS_DENIED_UNMASKED_FACE0x15Access denied (Unmasked face)
    APBBS2_SUB_EVENT_ZONE_HARD_APB0x01Hard APB zone
    BS2_SUB_EVENT_ZONE_SOFT_APB0x02Soft APB zone
    DoorBS2_SUB_EVENT_DOOR_FLAG_SCHEDULE0x01Door flag (Schedule)
    BS2_SUB_EVENT_DOOR_FLAG_OPERATOR0x04Door flag (Operator)
    BS2_SUB_EVENT_DOOR_FLAG_EMERGENCY0x02Door flag (Emergency)
    FloorBS2_SUB_EVENT_FLOOR_FLAG_SCHEDULE0x01Floor flag (Schedule)
    BS2_SUB_EVENT_FLOOR_FLAG_OPERATOR0x04Floor flag (Operator)
    BS2_SUB_EVENT_FLOOR_FLAG_ACTION0x08Floor flag (Action)
    BS2_SUB_EVENT_FLOOR_FLAG_EMERGENCY0x02Floor flag (Emergency)
  21. mainCode

    Main code value of log types.

    CategoryEvent codeValueDescription
    AuthBS2_EVENT_VERIFY_SUCCESS0x10001:1 authentication success
    BS2_EVENT_VERIFY_FAIL0x11001:1 authentication fail
    BS2_EVENT_VERIFY_DURESS0x12001:1 duress authentication success
    BS2_EVENT_IDENTIFY_SUCCESS0x13001:N authentication success
    BS2_EVENT_IDENTIFY_FAIL0x14001:N authentication fail
    BS2_EVENT_IDENTIFY_DURESS0x15001:N duress authentication success
    BS2_EVENT_DUAL_AUTH_SUCCESS0x1600Dual authentication success
    BS2_EVENT_DUAL_AUTH_FAIL0x1700Dual authentication fail
    BS2_EVENT_AUTH_FAILED0x1800Attempted to authenticate with the non-registered credential
    BS2_EVENT_ACCESS_DENIED0x1900Invalid user attempted to authenticate or user violated the APB rule
    BS2_EVENT_FAKE_FINGER_DETECTED0x1A00Fake fingerprint detection
    BS2_EVENT_BYPASS_SUCCESS0x1B00Bypass success (by temperature or mask)
    BS2_EVENT_BYPASS_FAIL0x1C00Bypass fail (by temperature or mask)
    BS2_EVENT_ABNORMAL_TEMPERATURE_DETECTED0x1D00High temperature or no temperature
    BS2_EVENT_UNMASKED_FACE_DETECTED0x1E00Unmasked face detection
    UserBS2_EVENT_USER_ENROLL_SUCCESS0x2000User enroll success
    BS2_EVENT_USER_ENROLL_FAIL0x2100User enroll fail
    BS2_EVENT_USER_UPDATE_SUCCESS0x2200User update success
    BS2_EVENT_USER_UPDATE_FAIL0x2300User update fail
    BS2_EVENT_USER_DELETE_SUCCESS0x2400User delete success
    BS2_EVENT_USER_DELETE_FAIL0x2500User delete fail
    BS2_EVENT_USER_DELETE_ALL_SUCCESS0x2600Delete all user success
    BS2_EVENT_USER_ISSUE_AOC_SUCCESS0x2700Authentication success with access card
    BS2_EVENT_USER_DUPLICATE_CREDENTIAL0x2800Duplicated credential(Card/Fingerprint/Face) detection
    BS2_EVENT_USER_UPDATE_PARTIAL_SUCCESS0x2900User partial update success
    BS2_EVENT_USER_UPDATE_PARTIAL_FAIL0x2A00User partial update fail
    BS2_EVENT_USER_RELOADED0x2B00User loaded
    DeviceBS2_EVENT_DEVICE_SYSTEM_RESET0x3000System reset
    BS2_EVENT_DEVICE_SYSTEM_STARTED0x3100System started
    BS2_EVENT_DEVICE_TIME_SET0x3200System time set
    BS2_EVENT_DEVICE_TIMEZONE_SET0x3201Time zone chagned
    BS2_EVENT_DEVICE_DST_SET0x3202DST setting changed
    BS2_EVENT_DEVICE_LINK_CONNECTED0x3300LAN cable connected
    BS2_EVENT_DEVICE_LINK_DISCONNETED0x3400LAN cable disconnected
    BS2_EVENT_DEVICE_DHCP_SUCCESS0x3500IP address allocated by DHCP
    BS2_EVENT_DEVICE_ADMIN_MENU0x3600Open administrator menu
    BS2_EVENT_DEVICE_UI_LOCKED0x3700Screen locked
    BS2_EVENT_DEVICE_UI_UNLOCKED0x3800Screen unlocked
    BS2_EVENT_DEVICE_COMM_LOCKED0x3900RS485 communication locked
    BS2_EVENT_DEVICE_COMM_UNLOCKED0x3A00RS485 communication unlocked
    BS2_EVENT_DEVICE_TCP_CONNECTED0x3B00TCP connected
    BS2_EVENT_DEVICE_TCP_DISCONNECTED0x3C00TCP disconnected
    BS2_EVENT_DEVICE_RS485_CONNECTED0x3D00RS485 connected
    BS2_EVENT_DEVICE_RS485_DISCONNCTED0x3E00RS485 disconnected
    BS2_EVENT_DEVICE_INPUT_DETECTED0x3F00Input device detected
    BS2_EVENT_DEVICE_TAMPER_ON0x4000Device or peripheral was removed
    BS2_EVENT_DEVICE_TAMPER_OFF0x4100Device or peripheral was reconnected
    BS2_EVENT_DEVICE_EVENT_LOG_CLEARED0x4200Log was deleted
    BS2_EVENT_DEVICE_FIRMWARE_UPGRADED0x4300Firmware was updated
    BS2_EVENT_DEVICE_RESOURCE_UPGRADED0x4400Resource was updated
    BS2_EVENT_DEVICE_CONFIG_RESET0x4500System information was initialized(including network)
    BS2_EVENT_DEVICE_DATABASE_RESET0x4501Database was initialized
    BS2_EVENT_DEVICE_FACTORY_RESET0x4502Factory default
    BS2_EVENT_DEVICE_CONFIG_RESET_EX0x4503System information was initialized(without network)
    BS2_EVENT_DEVICE_FACTORY_RESET_WITHOUT_ETHERNET0x4504Factory default (without network settings)
    Supervised InputBS2_EVENT_SUPERVISED_INPUT_SHORT0x4600Supervised Input (Short circuit detection)
    BS2_EVENT_SUPERVISED_INPUT_OPEN0x4700Supervised Input (Disconnection detection)
    Device-ExBS2_EVENT_DEVICE_AC_FAIL0x4800AC Power failed
    BS2_EVENT_DEVICE_AC_SUCCESS0x4900AC Power succeeded
    BS2_EVENT_EXIT_BUTTON0x4A00Exit button
    BS2_EVENT_SIMULATED_EXIT_BUTTON0x4A01Simulated exit button
    BS2_EVENT_OPERATOR_OPEN0x4B00Oerator open
    BS2_EVENT_VOIP_OPEN0x4C00Interphone open
    DoorBS2_EVENT_DOOR_UNLOCKED0x5000Door unlocked
    BS2_EVENT_DOOR_LOCKED0x5100Door locked
    BS2_EVENT_DOOR_OPENED0x5200Door opened
    BS2_EVENT_DOOR_CLOSED0x5300Door closed
    BS2_EVENT_DOOR_FORCED_OPEN0x5400Door forced open
    BS2_EVENT_DOOR_HELD_OPEN0x5500Door held open
    BS2_EVENT_DOOR_FORCED_OPEN_ALARM0x5600Door-forced-to-open alarm has started
    BS2_EVENT_DOOR_FORCED_OPEN_ALARM_CLEAR0x5700Door-forced-to-open alarm was released
    BS2_EVENT_DOOR_HELD_OPEN_ALARM0x5800Door-held-open alarm has started
    BS2_EVENT_DOOR_HELD_OPEN_ALARM_CLEAR0x5900Door-held-open alarm was released
    BS2_EVENT_DOOR_APB_ALARM0x5A00Door-level anti-passback alarm has started
    BS2_EVENT_DOOR_APB_ALARM_CLEAR0x5B00Door-level anti-passback alarm was released
    BS2_EVENT_DOOR_RELEASE0x5C00Door release
    BS2_EVENT_DOOR_LOCK0x5D00Door lock
    BS2_EVENT_DOOR_UNLOCK0x5E00Door unlock
    ZoneBS2_EVENT_ZONE_APB_VIOLATION0x6000Zone-level anti-passback rule has been violated
    BS2_EVENT_ZONE_APB_ALARM0x6100Zone-level anti-passback alarm has started
    BS2_EVENT_ZONE_APB_ALARM_CLEAR0x6200Zone-level anti-passback alarm was released
    BS2_EVENT_ZONE_TIMED_APB_VIOLATION0x6300Timed anti-passback rule has been violated
    BS2_EVENT_ZONE_TIMED_APB_ALARM0x6400Timed anti-passback alarm has started
    BS2_EVENT_ZONE_TIMED_APB_ALARM_CLEAR0x6500Timed anti-passback alarm was released
    BS2_EVENT_ZONE_FIRE_ALARM_INPUT0x6600Fire alarm input was detected
    BS2_EVENT_ZONE_FIRE_ALARM0x6700Fire alarm has started
    BS2_EVENT_ZONE_FIRE_ALARM_CLEAR0x6800Fire alarm was released
    BS2_EVENT_ZONE_SCHEDULED_LOCK_VIOLATION0x6900Scheduled lock violation
    BS2_EVENT_ZONE_SCHEDULED_LOCK_START0x6A00Scheduled lock has started
    BS2_EVENT_ZONE_SCHEDULED_LOCK_END0x6B00Scheduled lock has ended
    BS2_EVENT_ZONE_SCHEDULED_UNLOCK_START0x6C00Scheduled unlock has started
    BS2_EVENT_ZONE_SCHEDULED_UNLOCK_END0x6D00Scheduled unlock has ended
    BS2_EVENT_ZONE_SCHEDULED_LOCK_ALARM0x6E00Scheduled lock alarm zone start
    BS2_EVENT_ZONE_SCHEDULED_LOCK_ALARM_CLEAR0x6F00Scheduled lock alarm zone clear
    LiftBS2_EVENT_FLOOR_ACTIVATED0x7000Floor activated
    BS2_EVENT_FLOOR_DEACTIVATED0x7100Floor deactivated
    BS2_EVENT_FLOOR_RELEASE0x7200Floor released
    BS2_EVENT_FLOOR_ACTIVATE0x7300Floor activate
    BS2_EVENT_FLOOR_DEACTIVATE0x7400Floor deactivate
    BS2_EVENT_LIFT_ALARM_INPUT0x7500Lift alarm Input
    BS2_EVENT_LIFT_ALARM0x7600Lift alarm
    BS2_EVENT_LIFT_ALARM_CLEAR0x7700Lift alarm clear
    BS2_EVENT_ALL_FLOOR_ACTIVATED0x7800Floor activate (All)
    BS2_EVENT_ALL_FLOOR_DEACTIVATED0x7900Floor deactivate (All)
    RelayActionBS2_EVENT_RELAY_ACTION_ON0xC300RelayAction Switch-ON
    BS2_EVENT_RELAY_ACTION_OFF0xC400RelayAction Switch-OFF
    BS2_EVENT_RELAY_ACTION_KEEP0xC500RelayAction KEEP SIGNAL
  22. param

    It is used only when extra information on the device is needed. Usually, a time and attendance code, a port number of the door or input device is stored in the param argument. When a time and attendance code is stored, refer to the following values:

    Device TypeT&A CodeMapped KeyValue
    BioStation 2BS2_TNA_UNSPECIFIED(N/A)0
    BS2_TNA_KEY_1F11
    BS2_TNA_KEY_2F22
    BS2_TNA_KEY_3F33
    BS2_TNA_KEY_4F44
    BS2_TNA_KEY_515
    BS2_TNA_KEY_626
    BS2_TNA_KEY_737
    BS2_TNA_KEY_848
    BS2_TNA_KEY_959
    BS2_TNA_KEY_10610
    BS2_TNA_KEY_11711
    BS2_TNA_KEY_12812
    BS2_TNA_KEY_13913
    BS2_TNA_KEY_14Call14
    BS2_TNA_KEY_15015
    BS2_TNA_KEY_16Esc16

    + v2.6.3 Additional feature of param

    Only if the event code is relevant to the user.

    If you add, modify or delete users directly from the device, param is 1, 0 if done through BioStar.

    For example, if param was 1 with the event BS2_EVENT_USER_ENROLL_SUCCESS, it means the user was added directly on the device.

    This feature is supported from the firmware version below.

    Device TypeSupported Ver.
    BioStation 2V1.7.0
    BioStation A2V1.6.0
    CoreStation 40V1.2.0
    BioEntry P2V1.2.0
    BioStation L2V1.4.0
    BioLite N2V1.1.0
    BioEntry W2V1.3.0
    FaceStation 2V1.2.0
  23. image

    Prior to SDK V2.6.0, it used the whole 1 byte and means below:

    • Whether the image was included when the event occurred (true / false).

    Since SDK V2.6.0, 1 byte has been changed to provide the following information by bit unit.

    • Whether or not image is included. - Whether DST is applied
    CategoryBitParameterDescription
    Prior to SDK 2.6.08imageUsed in case image is included when an event occurs.
    Since SDK 2.6.01imageUsed in case image is included when an event occurs.
    1isDSTWhether the current log has been applied to DST
    1halfWhether DST is covered in 30-minute increments. 0 is 0 minutes, 1 is 30 minutes.
    4hourTime. 1 to 12 o'clock
    1negative0 is +, 1 is -

BS2EventBlob​

typedef struct {
uint16_t eventMask;
uint32_t id;
BS2EventExtInfo info;
union
{
BS2_USER_ID userID; // valid if eventMask has BS2_EVENT_MASK_USER_ID
uint8_t cardID[BS2_CARD_DATA_SIZE]; // valid if eventMask has BS2_EVENT_MASK_CARD_ID
BS2_DOOR_ID doorID; // valid if eventMask has BS2_EVENT_MASK_DOOR_ID
BS2_ZONE_ID zoneID; // valid if eventMask has BS2_EVENT_MASK_ZONE_ID
BS2EventExtIoDevice ioDevice; // valid if eventMask has BS2_EVENT_MASK_IODEVICE
};
uint8_t tnaKey;
uint32_t jobCode;
uint16_t imageSize;
uint8_t image[BS2_EVENT_MAX_IMAGE_SIZE];
uint8_t reserved;
} BS2EventBlob;
  1. eventMask

    Event mask value. Logs will be retrieved based on the mask value such as user, card, door, or zone.

    ValueDescription
    0x0000None
    0x0001BS2EventExtInfo Structure
    0x0002User ID
    0x0004Card ID
    0x0008Door ID
    0x0010Zone ID
    0x0020BS2EventExtIoDevice Structure
    0x0040TNA Key
    0x0080Job Code
    0x0100Image
    0x0200Temperature
    0xFFFFALL
  2. id

    Log record ID which automatically increases from 1 when the log is generated.

  3. info

    BS2EventExtInfo structure information.

  4. userID

    User ID related to log. When the value is 0, the log is not relevant to user.

  5. cardID

    Card ID related to log. When the value is 0, the log is not relevant to card.

    The device records card ID only for failure auth, it returns user ID when successful auth regardless of eventMask value.

  6. doorID

    Door ID related to log. When the value is 0, the log is not relevant to door.

  7. zoneID

    Zone ID related to log. When the value is 0, the log is not relevant to zone.

  8. ioDevice

    Door or input device ID related to log. When the value is 0, the log is not relevant to door or input. Refer to BS2EventExtIoDevice structure.

  9. tnaKey

    The T&A key that has been used for the authentication. When the value is 0, the log is not relevant to T&A key.

  10. jobCode

    The job code that has been used for the authentication. When the value is 0, the log is not relevant to job code.

  11. imageSize

    Size of the image when there is an image log.

  12. image

    Data of the image.

  13. reserved

    Reserved space.

BS2EventExtInfo​

typedef struct {
uint32_t dateTime;
uint32_t deviceID;
union { ///<div 2 bytes
BS2_EVENT_CODE code;
struct {
uint8_t subCode;
uint8_t mainCode;
};
};
uint8_t reserved[2];
} BS2EventExtInfo;
  1. dateTime

    The time when the log has been generated. It means the seconds past from UTC until the current time.

  2. deviceID

    ID of the device that generated the log.

  3. subCode

    Sub code value of log types. Use if the additional information is necessary.

  4. mainCode

    Main code value of log types.

  5. reserved

    Reserved space.

BS2EventExtIoDevice​

typedef struct {
uint32_t ioDeviceID;
uint16_t port;
uint8_t value;
uint8_t reserved[1];
} BS2EventExtInfo;
  1. ioDeviceID

    Door or input device ID related to log. When the value is 0, the log is not relevant to door or input.

  2. port

    Input port number.

  3. value

    Status of the input port.

    ValueDescription
    -1Unknown
    0Open
    1Closed
    2Supervised Short
    3Supervised Open
  4. reserved

    Reserved space.

BS2EventSmallBlob​

typedef struct {
uint16_t eventMask;
uint32_t id;
BS2EventExtInfo info;
union
{
BS2_USER_ID userID; // valid if eventMask has BS2_EVENT_MASK_USER_ID
uint8_t cardID[BS2_CARD_DATA_SIZE]; // valid if eventMask has BS2_EVENT_MASK_CARD_ID
BS2_DOOR_ID doorID; // valid if eventMask has BS2_EVENT_MASK_DOOR_ID
BS2_ZONE_ID zoneID; // valid if eventMask has BS2_EVENT_MASK_ZONE_ID
BS2EventExtIoDevice ioDevice; // valid if eventMask has BS2_EVENT_MASK_IODEVICE
};
uint8_t tnaKey;
uint32_t jobCode;
uint16_t imageSize;
uint8_t* imageObj; // valid if eventMask has BS2_EVENT_MASK_IMAGE
uint8_t reserved;
} BS2EventSmallBlob;
  1. eventMask

    Event mask value. Logs will be retrieved based on the mask value such as user, card, door, or zone.

    ValueDescription
    0x0000None
    0x0001BS2EventExtInfo Structure
    0x0002User ID
    0x0004Card ID
    0x0008Door ID
    0x0010Zone ID
    0x0020BS2EventExtIoDevice Structure
    0x0040TNA Key
    0x0080Job Code
    0x0100Image
    0x0200Temperature
    0xFFFFALL
  2. id

    Log record ID which automatically increases from 1 when the log is generated.

  3. info

    BS2EventExtInfo structure information.

  4. userID

    User ID related to log. When the value is 0, the log is not relevant to user.

  5. cardID

    Card ID related to log. When the value is 0, the log is not relevant to card.

    The device records card ID only for failure auth, it returns user ID when successful auth regardless of eventMask value.

  6. doorID

    Door ID related to log. When the value is 0, the log is not relevant to door.

  7. zoneID

    Zone ID related to log. When the value is 0, the log is not relevant to zone.

  8. ioDevice

    Door or input device ID related to log. When the value is 0, the log is not relevant to door or input. Refer to BS2EventExtIoDevice structure.

  9. tnaKey

    The T&A key that has been used for the authentication. When the value is 0, the log is not relevant to T&A key.

  10. jobCode

    The job code that has been used for the authentication. When the value is 0, the log is not relevant to job code.

  11. imageSize

    Size of the image when there is an image log.

  12. imageObj

    Data of the image.

  13. reserved

    Reserved space.

BS2EventSmallBlobEx​

typedef struct {
uint16_t eventMask;
uint32_t id;
BS2EventExtInfo info; // valid if eventMask has BS2_EVENT_MASK_INFO
union
{
BS2_USER_ID userID; // valid if eventMask has BS2_EVENT_MASK_USER_ID
uint8_t cardID[BS2_CARD_DATA_SIZE]; // valid if eventMask has BS2_EVENT_MASK_CARD_ID
BS2_DOOR_ID doorID; // valid if eventMask has BS2_EVENT_MASK_DOOR_ID
BS2_ZONE_ID zoneID; // valid if eventMask has BS2_EVENT_MASK_ZONE_ID
BS2EventExtIoDevice ioDevice; // valid if eventMask has BS2_EVENT_MASK_IODEVICE
};
uint8_t tnaKey; // valid if eventMask has BS2_EVENT_MASK_TNA_KEY
uint32_t jobCode; // valid if eventMask has BS2_EVENT_MASK_JOB_CODE
uint16_t imageSize; // valid if eventMask has BS2_EVENT_MASK_IMAGE
uint8_t* imageObj; // valid if eventMask has BS2_EVENT_MASK_IMAGE
uint8_t reserved;
uint32_t temperature; // valid if eventMask has BS2_EVENT_MASK_TEMPERATURE
} BS2EventSmallBlobEx;
  1. eventMask

    Event mask value. Logs will be retrieved based on the mask value such as user, card, door, or zone.

    ValueDescription
    0x0000None
    0x0001BS2EventExtInfo Structure
    0x0002User ID
    0x0004Card ID
    0x0008Door ID
    0x0010Zone ID
    0x0020BS2EventExtIoDevice Structure
    0x0040TNA Key
    0x0080Job Code
    0x0100Image
    0x0200Temperature
    0xFFFFALL
  2. id

    Log record ID which automatically increases from 1 when the log is generated.

  3. info

    BS2EventExtInfo structure information.

  4. userID

    User ID related to log. When the value is 0, the log is not relevant to user.

  5. cardID

    Card ID related to log. When the value is 0, the log is not relevant to card.

    The device records card ID only for failure auth, it returns user ID when successful auth regardless of eventMask value.

  6. doorID

    Door ID related to log. When the value is 0, the log is not relevant to door.

  7. zoneID

    Zone ID related to log. When the value is 0, the log is not relevant to zone.

  8. ioDevice

    Door or input device ID related to log. When the value is 0, the log is not relevant to door or input. Refer to BS2EventExtIoDevice structure.

  9. tnaKey

    The T&A key that has been used for the authentication. When the value is 0, the log is not relevant to T&A key.

  10. jobCode

    The job code that has been used for the authentication. When the value is 0, the log is not relevant to job code.

  11. imageSize

    Size of the image when there is an image log.

  12. image

    Data of the image.

  13. temperature

    Temperature information is set when there's a thermal camera installed and setting to record event logs. Refer to auditTemperature

  14. reserved

    Reserved.

BS2IOStatus​

typedef struct{
uint8_t count;
uint8_t reserved[3];
BS2_PORT_VALUE status[BS2_IO_STATUS_MAX_IO_PORT];
} BS2_IO_STATUS;

typedef struct{
BS2_DEVICE_ID deviceID;

BS2_IO_STATUS input;
BS2_IO_STATUS output;
BS2_IO_STATUS relay;
BS2_IO_STATUS tamper;
BS2_IO_STATUS auxIn;
BS2_IO_STATUS auxOut;

uint8_t numOfSupervisorInput;
BS2_PORT_VALUE supervisorInputStatus[BS2_IO_STATUS_MAX_SIO_PORT];
uint8_t reserved1[3];
uint8_t reserved2[16];
} BS2IOStatus;
  1. count

    Number of ports.

  2. status

    Indicates the port status.

    ValueDescription
    -1UNKNOWN
    0Open
    1Closed
    2Supervised Short
    3Supervised Open
  3. deviceID

    Device ID.

  4. input

    Represents the input port.

  5. output

    Represents the output port.

  6. relay

    Represents the relay port.

  7. tamper

    Represents the tamper port.

  8. auxIn

    Represents the auxiliary input port.

  9. auxOut

    Represents the auxiliary output port.

  10. numOfSupervisorInput

    Number of supervisor input ports.

  11. supervisorInputStatus

    Indicates the status of supervisor input ports.

  12. reserved1

    Reserved space.

  13. reserved2

    Reserved space.

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