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
Next revision Both sides next revision
en:log_management_api [2018/09/12 09:55]
kkshin
en:log_management_api [2020/06/01 13:30]
kkshin [BS2EventBlob]
Line 11: Line 11:
   * [[BS2_GetLogBlob]]:​ Gets certain amount of logs based on the event mask.   * [[BS2_GetLogBlob]]:​ Gets certain amount of logs based on the event mask.
   * [[BS2_GetFilteredLogSinceEventId]]:​​ Gets filtered logs.   * [[BS2_GetFilteredLogSinceEventId]]:​​ Gets filtered logs.
 +  * [[BS2_GetImageLog]] : Gets image logs using event ID.
 +  * [[BS2_GetLogSmallBlob]]:​ [+ 2.6.4] Gets certain amount of logs based on the event mask in an efficient way. 
 ===== Callback Function ===== ===== Callback Function =====
 <code cpp> <code cpp>
Line 120: Line 122:
 |::: |BS2_SUB_EVENT_VERIFY_ID_FACE ​ |0x04  |ID and face verification success ​ | |::: |BS2_SUB_EVENT_VERIFY_ID_FACE ​ |0x04  |ID and face verification success ​ |
 |::: |BS2_SUB_EVENT_VERIFY_ID_FACE_PIN ​ |0x05  |ID, face, and PIN verification success ​ | |::: |BS2_SUB_EVENT_VERIFY_ID_FACE_PIN ​ |0x05  |ID, face, and PIN verification success ​ |
-|::: |BS2_SUB_EVENT_VERIFY_CARD ​ |0x06  |Smart card verification success ​ | +|::: |BS2_SUB_EVENT_VERIFY_CARD ​ |0x06  |Card verification success ​ | 
-|::: |BS2_SUB_EVENT_VERIFY_CARD_PIN ​ |0x07  |Smart card and PIN verification success ​ | +|::: |BS2_SUB_EVENT_VERIFY_CARD_PIN ​ |0x07  |Card and PIN verification success ​ | 
-|::: |BS2_SUB_EVENT_VERIFY_CARD_FINGER ​ |0x08  |Smart card and fingerprint verification success ​ | +|::: |BS2_SUB_EVENT_VERIFY_CARD_FINGER ​ |0x08  |Card and fingerprint verification success ​ | 
-|::: |BS2_SUB_EVENT_VERIFY_CARD_FINGER_PIN ​ |0x09  |Smart card, fingerprint,​ and PIN verification success ​ | +|::: |BS2_SUB_EVENT_VERIFY_CARD_FINGER_PIN ​ |0x09  |Card, fingerprint,​ and PIN verification success ​ | 
-|::: |BS2_SUB_EVENT_VERIFY_CARD_FACE ​ |0x0A  |Smart card and face verification success ​ | +|::: |BS2_SUB_EVENT_VERIFY_CARD_FACE ​ |0x0A  |Card and face verification success ​ | 
-|::: |BS2_SUB_EVENT_VERIFY_CARD_FACE_PIN ​ |0x0B  |Smart card, PIN, and face verification success ​ |+|::: |BS2_SUB_EVENT_VERIFY_CARD_FACE_PIN ​ |0x0B  |Card, PIN, and face verification success ​ |
 |::: |BS2_SUB_EVENT_VERIFY_AOC ​ |0x0C  |AOC card verification success ​ | |::: |BS2_SUB_EVENT_VERIFY_AOC ​ |0x0C  |AOC card verification success ​ |
 |::: |BS2_SUB_EVENT_VERIFY_AOC_PIN ​ |0x0D  |AOC card and PIN verification success ​ | |::: |BS2_SUB_EVENT_VERIFY_AOC_PIN ​ |0x0D  |AOC card and PIN verification success ​ |
Line 178: Line 180:
 |::: |BS2_EVENT_USER_DELETE_ALL_SUCCESS ​ |0x2600 ​ |Delete all user success ​ | |::: |BS2_EVENT_USER_DELETE_ALL_SUCCESS ​ |0x2600 ​ |Delete all user success ​ |
 |::: |BS2_EVENT_USER_ISSUE_AOC_SUCCESS ​ |0x2700 ​ |Authentication success with access card | |::: |BS2_EVENT_USER_ISSUE_AOC_SUCCESS ​ |0x2700 ​ |Authentication success with access card |
 +|::: |BS2_EVENT_USER_DUPLICATE_CREDENTIAL ​ |0x2800 ​ |Duplicated credential(Card/​Fingerprint/​Face) detection|
 |Device ​ |BS2_EVENT_DEVICE_SYSTEM_RESET ​ |0x3000 ​ |System reset  | |Device ​ |BS2_EVENT_DEVICE_SYSTEM_RESET ​ |0x3000 ​ |System reset  |
 |::: |BS2_EVENT_DEVICE_SYSTEM_STARTED ​ |0x3100 ​ |System started ​ | |::: |BS2_EVENT_DEVICE_SYSTEM_STARTED ​ |0x3100 ​ |System started ​ |
Line 261: Line 264:
 |:::​|BS2_TNA_KEY_16|Esc|16| |:::​|BS2_TNA_KEY_16|Esc|16|
 </​WRAP>​ </​WRAP>​
 +\\ 
 +**[+ 2.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. 
 +<WRAP group 60%> 
 +^Device Type ^Supported Ver.  ^ 
 +|BioStation 2 |V1.7.0 | 
 +|BioStation A2 |V1.6.0 | 
 +|CoreStation 40 |V1.2.0 | 
 +|BioEntry P2 |V1.2.0 | 
 +|BioStation L2 |V1.4.0 | 
 +|BioLite N2 |V1.1.0 | 
 +|BioEntry W2 |V1.3.0 | 
 +|FaceStation 2 |V1.2.0| 
 +</​WRAP>​ 
 +\\ \\ 
  
 **19. //image//** \\  **19. //image//** \\ 
Line 327: Line 347:
 User ID related to log. When the value is 0, the log is not relevant to user. \\ \\  User ID related to log. When the value is 0, the log is not relevant to user. \\ \\ 
 5. //cardID// \\  5. //cardID// \\ 
-Card ID related to log. When the value is 0, the log is not relevant to card.  \\ \\ +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// \\  6. //doorID// \\ 
 Door ID related to log. When the value is 0, the log is not relevant to door.  \\ \\  Door ID related to log. When the value is 0, the log is not relevant to door.  \\ \\ 
Line 400: Line 421:
 </​WRAP>​ </​WRAP>​
 4. //​reserved//​ \\  4. //​reserved//​ \\ 
 +Reserved space.\\ \\
 +
 +==== BS2EventSmallBlob ====
 +<code cpp>
 +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;​
 +</​code>​
 +\\
 +
 +1. //​eventMask//​ \\ 
 +Event mask value. Logs will be retrieved based on the mask value such as user, card, door, or zone.\\ \\ 
 +<WRAP group 50%>
 +^Value ​ ^Description ​ ^
 +|0     ​|None ​ |
 +|1     ​|BS2EventExtInfo structure |
 +|2     |User ID |
 +|4     |Card ID |
 +|8     |Door ID |
 +|16    |Zone ID |
 +|32    |BS2EventExtIoDevice structure ​ |
 +|64    |Door ID |
 +|128   |Zone ID |
 +|256   |TNA Key |
 +|512   |Job Code |
 +|1024  |Image |
 +|65535 |ALL |
 +</​WRAP>​
 +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.  \\ \\ 
 +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.\\ \\ Reserved space.\\ \\