#ifndef _H_BASESTRUCT_H #define _H_BASESTRUCT_H #ifdef WIN32 #pragma warning( disable : 4996 ) #endif //#include #include #include #include #include using namespace std; namespace baosight{ struct MAT_UNIT_MTR_IN { MU_CODE ch_meCode; /* material identification 1..6 */ float fl_length; /* length material 1..6 */ float fl_length_entry; /* Length of the material in the entry side 1..6 */ float fl_position; /* Start postion from the material in the Order after entry cuts exit side 1..6 */ float fl_position_entry; /* Start postion from the material in the Order after entry cuts entry side 1..6 */ short w_noPasses; /* Number of Passes actually carried out 1..6 */ }; struct S_COMBI { long ID; long count; // combi count long innerId[5]; // coil innerId char extId[5][21]; // ent coil no long entLength[5]; // Hot coil length long extLength[5]; // cold coil length double thick[5] ; // Hot coil thickness long trLength[5]; }; typedef struct DEFECT { //defect information short innerId; //内部id short startPos; //defect start position short endPos; //defect end position short defSide; // short defType; //缺陷类型 short defClass; //defect class缺陷等级 short defWidthPos; //WidthDivision缺陷宽度位置 short defLateralDis; //缺陷离边部距离 } DEFECT; typedef struct DEFECTS { MU_CODE meCodeMaster; //master meCode of all units short noMeUnits; //number of material units MU_CODE matUnits[MAX_UNITS]; //material units short noDefects; //number of defects DEFECT defect[MAX_DEFECTS]; // defects } DEFECTS; struct NEW_MATERIAL_UNIT { MU_CODE ch_meCodeRef; /* reference meCode f. response physical ID */ short w_noMeSets; /* number of materials in the new material unit */ MAT_UNIT_MTR_IN matUnit[MTR_MAX_NO_PROD_ORD]; /* material units */ short w_coilerNo; /* number of actual coiler [-] */ short w_matBreakInfo; /* info cold coil is result of material break [0-no,1-yes] */ short cutMode; /* spare -int value 3 */ short simcut; /* 1:simcut*/ float fl_diaOut; /* outer diameter of physical coil [m] */ float fl_diaInner; /* spare -float value2 */ float Trimwidth; /* spare -float value3 */ short spmFlag; short sleeveCode; short CoilingType; short defectNo; short IsTrim; MU_CODE exitMuCode; DEFECTS defectData; }; //代表数据库中某张表的某一个字段 struct DataItem { string name; string type; int length; string value; }; struct CUT_INFO { short w_shearId; /* shear ID (work level Id) */ MU_CODE meCode; /* material identification */ float fl_cutStartPos; /* Start position of the cut in material */ short w_noCuts; /* number of cuts performed */ float fl_cutLength; /* sum of scrap material length */ short w_cutPos; /* Position 1 = material head 2 = material tail */ }; struct MATERIAL_PHY_DIVISION { short w_shearId; /* shear ID (work level ID) */ MU_CODE ch_meCode; /* material identification */ float OuterDiam; float fl_lengthHead; /* material length referring to the material head */ float fl_lengthTail; /* material length referring to the material tail */ }; struct MATERIAL_DIVISION { short w_shearId; /* shear ID (work level ID) */ MU_CODE ch_meCode; /* material identification */ float fl_lengthHead; /* material length referring to the material head */ float fl_lengthTail; /* material length referring to the material tail */ NEW_MATERIAL_UNIT nmu; }; struct TAKE_OUT { MU_CODE ch_meCode; /* material identification */ short w_matPlace; /* material place identification */ char ch_reasonCode[10]; /* take out reason code */ char ch_reasonText[60]; /* take out reason description */ char holdFlag[2]; char userId[7]; }; struct S_DIVLEN { int no ; // Division total no float len[10] ; // Division length int wt[3] ; // Division weight 0: actual, 1: order max, 2: order min float orilen ; // Hot coil length float orithk ; // Hot coil thickness float oriwd ; // Hot coil width float exitthk ; // Coil coil thickness int cutValue[10]; }; struct SELECT_PARAMS{ int logM; //actLogicalIndex of material int ordM; //actOrderIndex of material int logME; //actLogicalIndex of materialEntry int ordME; //actOrderIndex of materialEntry short standId; }; struct S_DEFECT { DEFECT def; //缺陷结构体,定义在BasicStruct中 char defText[50]; }; struct S_DEFECTS { short defNo; S_DEFECT defects[MAX_DEFECTS]; }; struct S_LINE { string StopReason; //停机原因代码 string StopStartTime; //停机开始时刻 string StopEndTime; //停机结束时刻 string StopTime; //停机时间 }; struct S_LINEINFO { string linestopNo; string Date; string ShiftNo; string TurnNo; string StopTotalTime; S_LINE stopdata[10]; }; struct S_SHIFTDATE { string Date; //日期 string ShiftNo; //班次 string TurnNo; //班组 string EntCoilNum; //入口卷数 string EntCoilTotalWt; //入口卷总重 string ExtCoilNum; //出口卷数 string ExtCoilTotalWt; //出口卷总重 string ExtLen; //出口长度 string WorkTime; //工作时间 string IdleTime; //空闲时间 string EmergencyTime; //紧急时间 string ReadyTime; //工厂准备时间 string RollChangeTime; //换辊时间 string StripBreakTime; //断带时间 string RewindTime; //卷取时间 string Lng; //液化天然气 string N2; //氮气 string H2; //氢气 string Steam; //水蒸气 string Recirculation; //循环水 string Filtered; //过滤水 string Demineralized; //纯水 string Electricity; //电流 string Air; //空气 }; struct S_CHANGEROLLDATE { string StandNo; //机架号 string RollType; //轧辊类型 string RollChangeCode; //换辊原因代码 string RollLoadTime; //装辊时间 string ShiftNo; //装辊班次 string TurnNo; //装辊班别 string NewRollNoU; //新上轧辊号 string NewRollNoL; //新下轧辊号 string UnLoadTime; //撤辊时间 string UnLoadShift; //撤辊班次 string UnLoadTurn; //撤辊班别 string OldRollNoU; //旧上轧辊号 string OldKMU; //上轧辊轧制公里数 string OldTotalWeiU; //上轧辊轧制总重量 string OldProdTimeU; //上轧辊生产时间 string OldDiaU; //上轧辊直径 string OldCrownU; //上轧辊凸度 string OldRoughU; //上轧辊粗糙度 string OldShapCodeU; //上轧辊外形代码 string OldRollNoL; //旧下轧辊号 string OldKML; //下轧辊轧制公里数 string OldTotalWeiL; //下轧辊轧制总重量 string OldProdTimeL; //下轧辊生产时间 string OldDiaL; //下轧辊直径 string OldCrownL; //下轧辊凸度 string OldRoughL; //下轧辊粗糙度 string OldShapCodeL; //下轧辊外形代码 }; struct S_LOADROLLDATE { string StandNo; //机架号 string RollType; //轧辊类型 string RollLoadTime; //入口卷数 string ShiftNo; //装辊班次 string TurnNo; //装辊班别 string RollNoU; //新上轧辊号 string RollNoL; //新下轧辊号 }; struct ACTSHIFT { string Date; string ShiftNo; string TurnNo; string ShiftName; }; typedef std::mapTableDataMap; }; #endif