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 Both sides next revision
en:log_management_api [2020/06/01 13:31]
kkshin [BS2EventSmallBlob]
en:log_management_api [2020/09/10 13:14]
yjjung
Line 8: Line 8:
   * [[BS2_ClearLog]]:​ Deletes all logs.   * [[BS2_ClearLog]]:​ Deletes all logs.
   * [[BS2_StartMonitoringLog]]:​ Starts Real-time log streaming. ​   * [[BS2_StartMonitoringLog]]:​ Starts Real-time log streaming. ​
 +  * [[BS2_StartMonitoringLogEx]]:​ 측정 체온이 포함된, 실시간 로그 스트리밍을 시작합니다. [+ V2.7.1]
   * [[BS2_StopMonitoringLog]]:​ Stops Real-time log streaming. ​   * [[BS2_StopMonitoringLog]]:​ Stops Real-time log streaming. ​
   * [[BS2_GetLogBlob]]:​ Gets certain amount of logs based on the event mask.   * [[BS2_GetLogBlob]]:​ Gets certain amount of logs based on the event mask.
Line 13: Line 14:
   * [[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 in an efficient way.    * [[BS2_GetLogSmallBlob]]:​ [+ 2.6.4] Gets certain amount of logs based on the event mask in an efficient way. 
 +  * [[BS2_GetLogSmallBlobEx]]:​ [+ 2.7.1] 효율적으로 메모리를 사용하면서,​ EventMask를 사용해서 체온정보를 포함한 로그를 가져옵니다.
 ===== Callback Function ===== ===== Callback Function =====
 +==== OnLogReceived ====
 +장치로부터 새로운 로그를 수신했을 때 호출되는 콜백 함수입니다. ​ \\ \\ 
 <code cpp> <code cpp>
 typedef void (*OnLogReceived)(uint32_t deviceId, BS2Event* log); typedef void (*OnLogReceived)(uint32_t deviceId, BS2Event* log);
 </​code>​ </​code>​
 \\ \\
 +1. //​deviceId//​ \\ 
 +새로운 로그를 보내준 장치 ID입니다. ​ \\ \\ 
 +2. //log// \\ 
 +새로운 로그 정보 구조체입니다. ​ \\ \\ 
  
-**1. //OnLogReceived//** \\  +==== OnLogReceivedEx ==== 
-Callback function that is called when a new log is received. \\ \\ +[+ V2.7.1] 장치로부터 새로운 로그를 수신했을 때 호출되는 콜백 함수입니다. \\ 
 +열화상 카메라를 통해 측정된 체온이 세번째 인자로 수신되며,​ [[configuration api#​BS2FaceConfigExt]]의 auditTemperature가 true로 설정되어져야 합니다. \\ \\ 
 +<code cpp> 
 +typedef void (*OnLogReceivedEx)(uint32_t deviceId, BS2Eventlog, uint32_t temperature);​ 
 +</​code>​ 
 +\\ 
 +1. //deviceId// \\  
 +새로운 로그를 보내준 장치 ID입니다. ​ \\ \\  
 +2. //log// \\  
 +새로운 로그 정보 구조체입니다. ​ \\ \\  
 +3. //​temperature//​ \\  
 +새로운 로그 발생 시, 측정된 체온 정보입니다. \\ \\
  
  
Line 326: Line 345:
 <WRAP group 50%> <WRAP group 50%>
 ^Value ​ ^Description ​ ^ ^Value ​ ^Description ​ ^
-|0     ​|None  +|0x0000 ​ |None| 
-|1     |BS2EventExtInfo ​structure ​+|0x0001  ​|BS2EventExtInfo ​Structure
-|2     |User ID | +|0x0002  ​|User ID | 
-|4     |Card ID | +|0x0004  ​|Card ID | 
-|8     |Door ID | +|0x0008  ​|Door ID | 
-|16    ​|Zone ID | +|0x0010  ​|Zone ID | 
-|32    ​|BS2EventExtIoDevice ​structure  ​+|0x0020  ​|BS2EventExtIoDevice ​Structure
-|64    |Door ID | +|0x0040  ​|TNA Key | 
-|128   |Zone ID | +|0x0080  ​|Job Code | 
-|256   |TNA Key | +|0x0100 ​ ​|Image | 
-|512   |Job Code | +|0x0200 ​ |Temperature | 
-|1024  ​|Image | +|0xFFFF  ​|ALL |
-|65535 |ALL |+
 </​WRAP>​ </​WRAP>​
 2. //id// \\  2. //id// \\ 
Line 450: Line 468:
 <WRAP group 50%> <WRAP group 50%>
 ^Value ​ ^Description ​ ^ ^Value ​ ^Description ​ ^
-|0     ​|None  +|0x0000 ​ |None| 
-|1     |BS2EventExtInfo ​structure ​+|0x0001  ​|BS2EventExtInfo ​Structure
-|2     |User ID | +|0x0002  ​|User ID | 
-|4     |Card ID | +|0x0004  ​|Card ID | 
-|8     |Door ID | +|0x0008  ​|Door ID | 
-|16    ​|Zone ID | +|0x0010  ​|Zone ID | 
-|32    ​|BS2EventExtIoDevice ​structure  ​+|0x0020  ​|BS2EventExtIoDevice ​Structure
-|64    |Door ID | +|0x0040  ​|TNA Key | 
-|128   |Zone ID | +|0x0080  ​|Job Code | 
-|256   |TNA Key | +|0x0100 ​ ​|Image | 
-|512   |Job Code | +|0x0200 ​ |Temperature | 
-|1024  ​|Image | +|0xFFFF  ​|ALL |
-|65535 |ALL |+
 </​WRAP>​ </​WRAP>​
 2. //id// \\  2. //id// \\ 
Line 489: Line 506:
 13. //​reserved//​ \\  13. //​reserved//​ \\ 
 Reserved space.\\ \\ Reserved space.\\ \\
 +
 +
 +
 +==== BS2EventSmallBlobEx ====
 +<code cpp>
 +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;​
 +</​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 ​ ^
 +|0x0000 ​ |None|
 +|0x0001 ​ |BS2EventExtInfo Structure|
 +|0x0002 ​ |User ID |
 +|0x0004 ​ |Card ID |
 +|0x0008 ​ |Door ID |
 +|0x0010 ​ |Zone ID |
 +|0x0020 ​ |BS2EventExtIoDevice Structure|
 +|0x0040 ​ |TNA Key |
 +|0x0080 ​ |Job Code |
 +|0x0100 ​ |Image |
 +|0x0200 ​ |Temperature |
 +|0xFFFF ​ |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. //image// \\ 
 +Data of the image. \\ \\
 +13. //​temperature//​ \\ 
 +Temperature information is set when there'​s a thermal camera installed and setting to record event logs. [[configuration api#​BS2FaceConfigExt|Refer to auditTemperature]] \\ \\
 +14. //​reserved//​ \\ 
 +Reserved. \\ \\