#ifndef WHEEL_CALC_TASK_H
#define WHEEL_CALC_TASK_H

#include <string.h>
#include <string>
#include <iostream>
#include <mutex>
#include <thread>
#include "TaskQueue/BaseTask.h"
#include "globalmsg.pb.h"

#include <nnxx/message.h>
#include <nnxx/message_control.h>
#include <nnxx/socket.h>
#include <nnxx/reqrep.h>
//#include <nnxx/unittest.h>
#include <nnxx/timeout.h>
#include <nnxx/error.h>

typedef void(*msgCallback)(int termID,nnxx::message_control *ctl, void *p);

class WheelCalcTask : public tq::BaseTask{
public:
    WheelCalcTask(std::string termStr, nnxx::message_control *ctl, msgCallback func, void* p);
    ~WheelCalcTask();
    virtual void   Main();
    virtual void   Cancel();
private:
    std::string     m_base_string;
    msgCallback     m_msg_callback_func;
    void*           m_wind;
    nnxx::message_control* m_ctl;
};

#endif // WHEEL_CALC_TASK_H
