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.
|
|
#include <signal.h>
//
#include "app.hpp"
#include "components/linuxsocket//unix_socket.hpp"
#include "configs/version.hpp"
#include "spdlogfactory/logger_factory.hpp"
#include "utils/stringutils.hpp"
//
//
using namespace iflytop; using namespace core; using namespace std;
/*******************************************************************************
* MAIN => MAIN * *******************************************************************************/ int main(int argc, char* argv[]) { spdlog::flush_on(spdlog::level::debug); LoggerFactory.initialize(); auto mainLogger = LoggerFactory.createLogger("main"); mainLogger->info("Iflytop Hardware Service Start...."); mainLogger->info("#"); mainLogger->info("# company:{}", "ifytop"); mainLogger->info("# version:{}", VERSION); mainLogger->info("#");
App app; app.initialize();
while (true) { sleep(1); }
// unique_ptr<UnixScoket> server;
// server.reset(new UnixScoket(UnixScoket::Server, "tdcan"));
// server->start();
// server->onPacket.connect([mainLogger](uint8_t* data, size_t len) {
// if (len > 0) {
// mainLogger->info("Received packet: {}", string((char*)data, len));
// }
// });
// unique_ptr<UnixScoket> client;
// client.reset(new UnixScoket(UnixScoket::Client, "tdcan"));
// client->start();
// while (true) {
// client->sendPacket((uint8_t*)"hello", 5);
// sleep(1);
// }
}
|