11 std::shared_ptr<hw_monitor> hardware_monitor,
12 const command& fw_logs_command,
const command& flash_logs_command) :
14 _hw_monitor(hardware_monitor),
17 _flash_logs_initialized(false),
19 _fw_logs_command(fw_logs_command),
20 _flash_logs_command(flash_logs_command) { }
43 return (
unsigned int)
_fw_logs.size();
54 auto beginOfLogIterator =
res.begin();
59 std::vector<uint8_t> resultsForOneLog;
60 resultsForOneLog.insert(resultsForOneLog.begin(), beginOfLogIterator, endOfLogIterator);
63 beginOfLogIterator = endOfLogIterator;
73 LOG_INFO(
"Getting Flash logs failed!");
78 int size_of_flash_logs_header = 27;
79 res.erase(
res.begin(),
res.begin() + size_of_flash_logs_header);
81 auto beginOfLogIterator =
res.begin();
86 std::vector<uint8_t> resultsForOneLog;
87 resultsForOneLog.insert(resultsForOneLog.begin(), beginOfLogIterator, endOfLogIterator);
90 beginOfLogIterator = endOfLogIterator;
126 if (
_parser && parsed_msg && fw_log_msg)
bool parse_log(const fw_logs::fw_logs_binary_data *fw_log_msg, fw_logs::fw_log_data *parsed_msg) override
bool get_fw_log(fw_logs::fw_logs_binary_data &binary_data) override
static const int BINARY_DATA_SIZE
std::queue< fw_logs::fw_logs_binary_data > _flash_logs
GLsizei const GLchar *const * string
bool init_parser(std::string xml_content) override
command _flash_logs_command
unsigned int get_number_of_fw_logs() const override
fw_log_data parse_fw_log(const fw_logs_binary_data *fw_log_msg)
std::shared_ptr< hw_monitor > _hw_monitor
void get_flash_logs_from_hw_monitor()
bool _flash_logs_initialized
void get_fw_logs_from_hw_monitor()
LOG_INFO("Log message using LOG_INFO()")
firmware_logger_device(std::shared_ptr< context > ctx, const platform::backend_device_group group, std::shared_ptr< hw_monitor > hardware_monitor, const command &fw_logs_command, const command &flash_logs_command)
bool get_flash_log(fw_logs::fw_logs_binary_data &binary_data) override
std::queue< fw_logs::fw_logs_binary_data > _fw_logs
fw_logs::fw_logs_parser * _parser