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 [2020/02/18 11:02]
yjjung [Log Management API]
en:log_management_api [2020/06/01 13:31]
kkshin [BS2EventSmallBlob]
Line 12: Line 12:
   * [[BS2_GetFilteredLogSinceEventId]]:​​ Gets filtered logs.   * [[BS2_GetFilteredLogSinceEventId]]:​​ Gets filtered logs.
   * [[BS2_GetImageLog]] : Gets image logs using event ID.   * [[BS2_GetImageLog]] : Gets image logs using event ID.
-  * [[BS2_GetLogSmallBlob]]:​ [+ 2.6.4] Gets certain amount of logs based on the event mask. +  * [[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 347: 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 420: 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.  \\ 
 +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.\\ \\ Reserved space.\\ \\