#pragma once

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <sys/wait.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <ctime>
#include <time.h>
#include <pthread.h>

using namespace std;

#include <rapidjson/document.h>
#include <rapidjson/rapidjson.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/writer.h>

#include "expel.h"
#include "md5.h"
#include "Base64.h"

#include "CSerialPort/SerialPort.h"

#include "kafka_comsumer.h"
#include  "dataTypeList.h"

#include "Util/TimeTicker.h"
#include "Network/TcpServer.h"
#include "Network/TcpSession.h"

#include "InfineFilter.h"

class Monitor{
private:
    std::shared_ptr<kafka_consumer_client> m_KafkaConsumer = nullptr;
    
public:
    Monitor();
    ~Monitor();

    /**
     * @description: 初始化
     * @param {*}
     * @return {*}
     */    
    bool Init();
    
    /**
     * @description: 消费数据
     * @param {*}
     * @return {*}
     */    
    bool ConsumeData(FrameInferData::Ptr& result);
};
