#ifndef CWORKTABLEOFFSETDRIVER_H
#define CWORKTABLEOFFSETDRIVER_H

#include "cdrivercard.h"
#include "cworktableoffset.h"
#include "export_worktable_driver.h"
class WORKTABLE_DRIVER_EXPORT CWorktableOffsetDriver : public CDriverCard
{
public:
    enum msg_id
    {
         WorktableOffsetDriver_MSG_ID=MAX_DRIVER_MSG_ID,
         MAX_WorktableOffsetDriver_MSG_ID,

    };
    CWorktableOffsetDriver(const QString& name,int32_t id);
    double CalcuOffsetCur(double dPosCur,double dPosRef);
    void SetOffsetCur(int iOffsetID,double dPos,double dOffset);
    double GetOffset(int iOffsetID,double dPos);
    void MargeOffset(int iOffsetID);
    int AddOffsetToList(int iOffsetID,double dPos,double dOffset,OFFSETLIST& list);
    int m_iListCurIndex;
    int m_iListIndex;

    virtual void Serialize(QDataStream& stream,bool bwrite);
};

#endif // CWORKTABLEOFFSETDRIVER_H
