USB Exported Control API > BS2_GetLogFromDirWithKey

[+2.8.2] Gets the log after a given log record ID from the data extracted by USB by a maximum of amount.


#include "BS_API.h"
int BS2_GetLogFromDirWithKey(void* context, const char* szDir, BS2_EVENT_ID eventId, uint32_t amount, BS2Event** logsObj, uint32_t* numLog, const BS2EncryptKey* key);


  • [In] context : Context
  • [In] szDir : Data storage path
  • [In] eventId : Log record ID, if 0 then import from scratch.
  • [In] amount : Maximum number of log records, if zero, gets all records since eventId.
  • [Out] logsObj : Pointer to store the address of the log record
  • [Out] numLog : Number of log records
  • [In] key : Encryption key and the key value specified by BS2_SetDataEncryptKey

The logsObj variable must be used and then returned to the system using the BS2_ReleaseObject function.

Return value

Returns BS_SDK_SUCCESS if performed successfully, or a corresponding error code if an error occurs.

See Also