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.
60 lines
1.4 KiB
60 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 "iflytop/components/iflytop_front_end_service/iflytop_front_end_service.hpp"
|
|
// #include "iflytop/components/restful_server/restful_server.hpp"
|
|
// #include "iflytop/core/components/jobs/work_queue.hpp"
|
|
// #include "iflytop/core/components/timer/simple_timer.hpp"
|
|
// #include "iflytop/core/spdlogfactory/logger.hpp"
|
|
// #include "iflytop/components/iflytop_front_end_service/iflytop_front_end_service.hpp"
|
|
// #include "iflytoplinuxsdk/src/iflytop/core/components/zservice_container/zservice_container.hpp"
|
|
|
|
//
|
|
#include "components/zservice_container/zservice_container.hpp"
|
|
#include "configs/gconfig.hpp"
|
|
#include "ixwebsocket/IXWebSocketServer.h"
|
|
#include "spdlogfactory/logger.hpp"
|
|
#include "components/zcanreceiver/zcanreceiverhost.hpp"
|
|
//
|
|
|
|
//
|
|
#include <mutex>
|
|
|
|
/**
|
|
* @brief
|
|
*
|
|
* service: 对外暴露的接口服务
|
|
*
|
|
*/
|
|
|
|
namespace iflytop {
|
|
using namespace std;
|
|
using namespace core;
|
|
|
|
class ExtAPIService {
|
|
ENABLE_LOGGER(ExtAPIService);
|
|
|
|
shared_ptr<GConfig> m_zconfig;
|
|
shared_ptr<ix::WebSocketServer> m_canPassthroughServer; // 19003
|
|
shared_ptr<ZCanReceiverHost> m_zcanreceiverhost;
|
|
|
|
public:
|
|
ExtAPIService() {};
|
|
void initialize(string can_if_name, int baudrate);
|
|
|
|
private:
|
|
void initCanPassthroughServer();
|
|
};
|
|
} // namespace iflytop
|