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.
49 lines
976 B
49 lines
976 B
//
|
|
// Created by zwsd
|
|
//
|
|
|
|
#pragma once
|
|
#include <fstream>
|
|
#include <iostream>
|
|
#include <list>
|
|
#include <map>
|
|
#include <memory>
|
|
#include <set>
|
|
#include <sstream>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "configs/config.hpp"
|
|
#include "iflytopcpp/core/spdlogfactory/logger.hpp"
|
|
//
|
|
#include "configs/config.hpp"
|
|
#include "iflytopcpp/core/thread/thread.hpp"
|
|
#include "service/device_io_service.hpp"
|
|
#include "zservice_container/zservice_container.hpp"
|
|
/**
|
|
* @brief
|
|
*
|
|
* service: LightControlService
|
|
*
|
|
* 作用:
|
|
* 根据当前温度自动控制风扇等级
|
|
*/
|
|
|
|
namespace iflytop {
|
|
using namespace std;
|
|
using namespace core;
|
|
class LightControlService : public enable_shared_from_this<LightControlService> {
|
|
ENABLE_LOGGER(LightControlService);
|
|
|
|
shared_ptr<Config> config;
|
|
unique_ptr<Thread> thread;
|
|
shared_ptr<DeviceIOService> deviceIoService;
|
|
|
|
public:
|
|
LightControlService(){};
|
|
void initialize();
|
|
|
|
void start();
|
|
void stop();
|
|
};
|
|
} // namespace iflytop
|