102 lines
2.0 KiB
C
102 lines
2.0 KiB
C
|
|
#ifndef _ROLL_DEFINE_H_
|
|||
|
|
#define _ROLL_DEFINE_H_
|
|||
|
|
#include <string>
|
|||
|
|
#include <vector>
|
|||
|
|
#include "dbinc/T_ROL_DATA.h"
|
|||
|
|
//2010<31><30>6<EFBFBD><36>24<32><34><EFBFBD>쳤ʢ<ECB3A4><CAA2><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
using namespace std;
|
|||
|
|
namespace baosight
|
|||
|
|
{
|
|||
|
|
const int ROLLNOLENGTH = 10;
|
|||
|
|
const int MAX_STAND = 40;//<2F><><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
enum ChangeRollModeEnum{
|
|||
|
|
WORK_ROLL = 0x2000,
|
|||
|
|
MID_ROLL = 0x4000,
|
|||
|
|
BUR_ROLL = 0x8000,
|
|||
|
|
UP_B_ROLL = 0x1000,
|
|||
|
|
DN_B_ROLL = 0x0800
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
struct RollProdData
|
|||
|
|
{
|
|||
|
|
int length;//<2F><><EFBFBD>Ƴ<EFBFBD><C6B3><EFBFBD>
|
|||
|
|
int weight; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
int time; //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|||
|
|
string coilId; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶĸ־<C4B8><D6BE><EFBFBD>
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
class RollInfo
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
RollInfo(T_ROL_DATA& dbData)
|
|||
|
|
{
|
|||
|
|
dataFromDb = dbData;
|
|||
|
|
m_status = dbData.RollStatus();
|
|||
|
|
m_rollno = dbData.RollNo();
|
|||
|
|
m_pos = dbData.RollPosition();
|
|||
|
|
string type = dbData.RollType();
|
|||
|
|
m_type = type;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
RollInfo()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
virtual ~RollInfo()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void SetRollData(const T_ROL_DATA& dbData)
|
|||
|
|
{
|
|||
|
|
dataFromDb = dbData;
|
|||
|
|
|
|||
|
|
m_status = dbData.RollStatus();
|
|||
|
|
m_rollno = dbData.RollNo();
|
|||
|
|
m_pos = dbData.RollPosition();
|
|||
|
|
string type = dbData.RollType();
|
|||
|
|
m_type = type;
|
|||
|
|
m_stand = dbData.StandNo(); //need change type
|
|||
|
|
}
|
|||
|
|
void SetRollData(const T_ROL_DATA& dbData,short standNo)
|
|||
|
|
{
|
|||
|
|
dataFromDb = dbData;
|
|||
|
|
|
|||
|
|
m_status = dbData.RollStatus();
|
|||
|
|
m_rollno = dbData.RollNo();
|
|||
|
|
m_pos = dbData.RollPosition();
|
|||
|
|
string type = dbData.RollType();
|
|||
|
|
m_type = type;
|
|||
|
|
m_stand = standNo; //need change type
|
|||
|
|
}
|
|||
|
|
string ToString()
|
|||
|
|
{
|
|||
|
|
return "rollNo:"+m_rollno+",status:"+m_status;+",type:"+m_type;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
string GetRollNo(){return m_rollno;}
|
|||
|
|
string GetRollStatus(){return m_status;}
|
|||
|
|
string GetRollPos(){return m_pos;}
|
|||
|
|
int GetRollStand(){return m_stand;}
|
|||
|
|
string GetRollType(){ return m_type; }
|
|||
|
|
T_ROL_DATA GetDataFromDB(){return dataFromDb;}
|
|||
|
|
private:
|
|||
|
|
string m_rollno;
|
|||
|
|
string m_type;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
string m_status;//<2F><><EFBFBD><EFBFBD>״̬
|
|||
|
|
string m_pos;//<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
|||
|
|
int m_stand; //<2F><><EFBFBD>ܺţ<DCBA><C5A3><EFBFBD>1<EFBFBD><31>ʼ
|
|||
|
|
T_ROL_DATA dataFromDb;//<2F><>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
};
|
|||
|
|
typedef vector<RollInfo>VecRoll;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
#endif
|