You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.2 KiB

//
// Created by zwsd
//
#pragma once
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <mutex>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include "disinfection_logs_manager.hpp"
#include "disinfection_state.hpp"
#include "iflytop/components/zcanreceiver/zcanhost.hpp"
#include "iflytop/core/core.hpp"
#include "service/device_io_control_service.hpp"
#include "utils/dvalue_computer.hpp"
#include "zservice_container/zservice_container.hpp"
/**
* @brief
*
* service: 消毒打印机服务
*/
namespace iflytop {
using namespace std;
using namespace core;
class DisinfectionPrinterService : public enable_shared_from_this<DisinfectionPrinterService> {
ENABLE_LOGGER(DisinfectionPrinterService);
private:
shared_ptr<IF_DeviceIoContrlService> m_deviceIoControlService;
recursive_mutex lock_;
unique_ptr<Thread> m_workThread;
queue<shared_ptr<DisinfectionPrinterTask>> tasks;
public:
DisinfectionPrinterService() {}
public:
void initialize();
void pushPrintTask(shared_ptr<DisinfectionPrinterTask> task);
private:
void printTask(shared_ptr<DisinfectionPrinterTask> task);
};
} // namespace iflytop