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.
64 lines
1.4 KiB
64 lines
1.4 KiB
//
|
|
// 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/gconfig.hpp"
|
|
#include "iflytopcpp/core/spdlogfactory/logger.hpp"
|
|
//
|
|
#include "configs/gconfig.hpp"
|
|
#include "zservice_container/zservice_container.hpp"
|
|
|
|
//
|
|
#include "configs/gconfig.hpp"
|
|
#include "iflytopcpp/core/components/jobs/work_queue.hpp"
|
|
#include "iflytopcpp/core/components/timer/simple_timer.hpp"
|
|
#include "zlinuxcomponents/alsaplayer/smart_soundbox_player.hpp"
|
|
#include "zlinuxcomponents/iflytop_can_protocol_stack/iflytop_can_protocol_controler.hpp"
|
|
#include "zlinuxcomponents/iflytop_can_protocol_stack/basic/iflytop_virtual_can_slave.hpp"
|
|
|
|
/**
|
|
* @brief
|
|
*
|
|
* service: MainControlService
|
|
*
|
|
* 监听事件:
|
|
* 依赖状态:
|
|
* 依赖服务:
|
|
* 作用:
|
|
*
|
|
*/
|
|
|
|
namespace iflytop {
|
|
using namespace std;
|
|
using namespace core;
|
|
class MainControlService : public enable_shared_from_this<MainControlService> {
|
|
ENABLE_LOGGER(MainControlService);
|
|
|
|
shared_ptr<GConfig> m_zconfig;
|
|
|
|
shared_ptr<IflytopCanProtocolControler> iflytopCanProtocolControler;
|
|
|
|
public:
|
|
MainControlService(){};
|
|
void initialize();
|
|
|
|
private:
|
|
void dosystem(string order, bool dump) {
|
|
if (dump) logger->info("do:{}", order);
|
|
system(order.c_str());
|
|
}
|
|
|
|
void localVirtualCanSlaveInitialize();
|
|
};
|
|
} // namespace iflytop
|