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:log_management_api [2023/10/05 14:37]
kkshin [BS2Event]
en:log_management_api [2026/03/11 16:00] (current)
Line 5: Line 5:
  
   * [[BS2_GetLog]]:​ Gets certain amount of logs.   * [[BS2_GetLog]]:​ Gets certain amount of logs.
-  * [[BS2_GetFilteredLog]]:​ Gets filtered logs.+  * [[BS2_GetFilteredLog]]: ​''​[Deprecated]'' ​Gets filtered logs.
   * [[BS2_ClearLog]]:​ Deletes all logs.   * [[BS2_ClearLog]]:​ Deletes all logs.
   * [[BS2_StartMonitoringLog]]:​ Starts Real-time log streaming. ​   * [[BS2_StartMonitoringLog]]:​ Starts Real-time log streaming. ​
Line 11: Line 11:
   * [[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.
-  * [[BS2_GetFilteredLogSinceEventId]]:​​ Gets filtered logs.+  * [[BS2_GetFilteredLogSinceEventId]]: ​''​[Deprecated]'' ​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 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] Gets certain amount of logs based on the event mask in an efficient way, including the temperature information. ​+  * [[BS2_GetLogSmallBlobEx]]:​ [+ 2.7.1] Gets certain amount of logs based on the event mask in an efficient way, including the temperature information
 +  * [[BS2_GetDeviceIOStatus]]:​ [+ 2.9.12] Gets the current device I/O port status. 
 +  * [[BS2_GetAllDeviceIOStatus]]:​ [+ 2.9.12] Gets the current I/O port status of the device and slave devices.
 ===== Callback Function ===== ===== Callback Function =====
 ==== OnLogReceived ==== ==== OnLogReceived ====
Line 79: Line 81:
             uint8_t reserved[28];​             uint8_t reserved[28];​
         } relayAction;​         } relayAction;​
 +        struct {
 +            BS2_DEVICE_ID deviceId;
 +            uint8_t data[28];
 +        } osdpStandard;​
     };     };
     union {     union {
Line 91: Line 97:
     BS2_BOOL image; ​        // Deprecated in V2.6.0     BS2_BOOL image; ​        // Deprecated in V2.6.0
 #else #else
-    uint8_t image: 1;       // ​Support ​image and DST by bit division+    uint8_t image: 1;       // ​Supports ​image and DST by splitting ​bit unit
     uint8_t isDST: 1;     uint8_t isDST: 1;
     uint8_t half: 1;     uint8_t half: 1;
Line 142: Line 148:
 **17. //​​relayAction.inputPort//​​** \\  **17. //​​relayAction.inputPort//​​** \\ 
 Relay port identifier when IM-120 RelayAction takes place. \\ \\ Relay port identifier when IM-120 RelayAction takes place. \\ \\
-**18. //​subCode//​** \\+**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 [[slave_control_api#​BS2OsdpStandardDeviceNotify|BS2OsdpStandardDeviceNotify]]. \\ \\ 
 +**20. //​subCode//​** \\
 Sub code value of log types. Use if the additional information is necessary. \\ Sub code value of log types. Use if the additional information is necessary. \\
 ^Category ^Event code ^Value ^Description ​ ^ ^Category ^Event code ^Value ^Description ​ ^
Line 172: Line 183:
 |:::  |BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FACE_FINGER ​ |0x20  |Mobile card, face, fingerprint verification success (+V2.8) ​ | |:::  |BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FACE_FINGER ​ |0x20  |Mobile card, face, fingerprint verification success (+V2.8) ​ |
 |:::  |BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FINGER_FACE ​ |0x21  |Mobile card, fingerprint,​ face verification success (+V2.8) ​ | |:::  |BS2_SUB_EVENT_VERIFY_MOBILE_CARD_FINGER_FACE ​ |0x21  |Mobile card, fingerprint,​ face verification success (+V2.8) ​ |
 +|:::  |BS2_SUB_EVENT_VERIFY_QR ​ |0x25  |QR verification success ​ |
 +|:::  |BS2_SUB_EVENT_VERIFY_QR_PIN ​ |0x26  |QR and PIN verification success ​ |
 +|:::  |BS2_SUB_EVENT_VERIFY_QR_FINGER ​ |0x27  |QR and finger verification success ​ |
 +|:::  |BS2_SUB_EVENT_VERIFY_QR_FINGER_PIN ​ |0x28  |QR, finger and PIN verification success ​ |
 +|:::  |BS2_SUB_EVENT_VERIFY_QR_FACE ​ |0x29  |QR and face verification success ​ |
 +|:::  |BS2_SUB_EVENT_VERIFY_QR_FACE_PIN ​ |0x2A  |QR, face and PIN verification success ​ |
 +|:::  |BS2_SUB_EVENT_VERIFY_QR_FACE_FINGER ​ |0x2B  |QR, face and finger verification success ​ |
 +|:::  |BS2_SUB_EVENT_VERIFY_QR_FINGER_FACE ​ |0x2C  |QR, finger and face verification success ​ |
 |Identify ​ |BS2_SUB_EVENT_IDENTIFY_FINGER ​ |0x01  |Fingerprint identification success ​ | |Identify ​ |BS2_SUB_EVENT_IDENTIFY_FINGER ​ |0x01  |Fingerprint identification success ​ |
 |:::  |BS2_SUB_EVENT_IDENTIFY_FINGER_PIN ​ |0x02  |Fingerprint and PIN identification success ​ | |:::  |BS2_SUB_EVENT_IDENTIFY_FINGER_PIN ​ |0x02  |Fingerprint and PIN identification success ​ |
Line 207: Line 226:
 |:::  |BS2_SUB_EVENT_CREDENTIAL_AOC_FINGER ​ |0x07  |Invalid AOC fingerprint ​ | |:::  |BS2_SUB_EVENT_CREDENTIAL_AOC_FINGER ​ |0x07  |Invalid AOC fingerprint ​ |
 |:::  |BS2_SUB_EVENT_CREDENTIAL_MOBILE_CARD ​ |0x08  |Invalid mobile card (+V2.8) ​ | |:::  |BS2_SUB_EVENT_CREDENTIAL_MOBILE_CARD ​ |0x08  |Invalid mobile card (+V2.8) ​ |
-|:::  |BS2_SUB_EVENT_CREDENTIAL_QR ​ ​|0x09 ​ |Invalid QR  |+|:::  |BS2_SUB_EVENT_NON_NUMERIC_QR ​ ​|0x09 ​ |Non numeric QR  | 
 +|:::  |BS2_SUB_EVENT_CREDENTIAL_QR ​ |0x0C  ​|Invalid ​QR  | 
 +|:::  |BS2_SUB_EVENT_NON_PRINTABLE_QR ​ |0x0A  |Contains unusable characters ​ | 
 +|:::  |BS2_SUB_EVENT_TOO_LONG_QR ​ |0x0B  |Too long QR  |
 |Auth  |BS2_SUB_EVENT_AUTH_FAIL_INVALID_AUTH_MODE ​ |0x01  |Invalid authentication mode  | |Auth  |BS2_SUB_EVENT_AUTH_FAIL_INVALID_AUTH_MODE ​ |0x01  |Invalid authentication mode  |
 |:::  |BS2_SUB_EVENT_AUTH_FAIL_INVALID_CREDENTIAL ​ |0x02  |Non-registered authentication method| |:::  |BS2_SUB_EVENT_AUTH_FAIL_INVALID_CREDENTIAL ​ |0x02  |Non-registered authentication method|
Line 242: Line 264:
 |:::  |BS2_SUB_EVENT_FLOOR_FLAG_ACTION ​ |0x08  |Floor flag (Action) ​ | |:::  |BS2_SUB_EVENT_FLOOR_FLAG_ACTION ​ |0x08  |Floor flag (Action) ​ |
 |:::  |BS2_SUB_EVENT_FLOOR_FLAG_EMERGENCY ​ |0x02  |Floor flag (Emergency) ​ | |:::  |BS2_SUB_EVENT_FLOOR_FLAG_EMERGENCY ​ |0x02  |Floor flag (Emergency) ​ |
-**19. //​mainCode//​** \\ +**21. //​mainCode//​** \\ 
 Main code value of log types. \\ Main code value of log types. \\
 ^Category ​ ^Event code  ^Value ​ ^Description ​ ^ ^Category ​ ^Event code  ^Value ​ ^Description ​ ^
Line 352: Line 374:
 |:::  |BS2_EVENT_RELAY_ACTION_OFF ​ |0xC400 ​ |RelayAction Switch-OFF ​ | |:::  |BS2_EVENT_RELAY_ACTION_OFF ​ |0xC400 ​ |RelayAction Switch-OFF ​ |
 |:::  |BS2_EVENT_RELAY_ACTION_KEEP ​ |0xC500 ​ |RelayAction KEEP SIGNAL ​ | |:::  |BS2_EVENT_RELAY_ACTION_KEEP ​ |0xC500 ​ |RelayAction KEEP SIGNAL ​ |
-**20.//​param//​** \\ +**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. 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: When a time and attendance code is stored, refer to the following values:
Line 394: Line 416:
 \\ \\  \\ \\ 
  
-**21. //image//** \\ +**23. //image//** \\ 
 Prior to SDK V2.6.0, it used the whole 1 byte and means below: \\ 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). \\ \\ - Whether the image was included when the event occurred (true / false). \\ \\
Line 669: Line 691:
 14. //​reserved//​ \\  14. //​reserved//​ \\ 
 Reserved. \\ \\ Reserved. \\ \\
 +
 +==== BS2IOStatus ====
 +
 +<code cpp>
 +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;​
 +</​code>​
 +\\
 +
 +1. //count// \\ 
 +Number of ports. \\ \\ 
 +2. //status// \\ 
 +Indicates the port status. \\ 
 +<WRAP group 50%>
 +^Value ​ ^Description ​ ^
 +|-1  |UNKNOWN ​ |
 +|0   |Open |
 +|1   ​|Closed |
 +|2   ​|Supervised Short |
 +|3   ​|Supervised Open |
 +</​WRAP>​
 +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. \\ \\