156 lines
4.6 KiB
C++
156 lines
4.6 KiB
C++
#ifndef _H_COIL_DEF_H_
|
|
#define _H_COIL_DEF_H_
|
|
|
|
#ifdef WIN32
|
|
#pragma warning( disable : 4996 )
|
|
#endif
|
|
|
|
#include <zlib/zoneDef.h>
|
|
#include <common/typedefL1.h>
|
|
#include <sstream>
|
|
#include <string>
|
|
|
|
const int TRK_POS_MAX = 20; /* track coil max */
|
|
const int CENTER_POS_MAX = 10; /* center coil max */
|
|
const int PDO_STACK_MAX = 20; /* pdo stack max */
|
|
const int PDI_LIST_MAX = 500; /* product list cached max */
|
|
const int SET_LIST_MAX = 500; /* product list cached max */
|
|
const int PDO_LIST_MAX = 500; /* product list cached max */
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
namespace baosight{
|
|
|
|
class TRK_EVENT
|
|
{
|
|
public:
|
|
static const int SIGNAL = 1000;//
|
|
static const int PDI = 1001;//
|
|
static const int PDO = 1002;//
|
|
static const int WeldOk = 9543;
|
|
};
|
|
|
|
class POS_TRK
|
|
{
|
|
public:
|
|
static const int CNETER_START = TRK_POS_MAX;
|
|
static const int CNETER_END = TRK_POS_MAX+CENTER_POS_MAX-1;
|
|
static const int PDO_STACK_START = CNETER_END+1;
|
|
static const int PDO_STACK_END = CNETER_END+PDO_STACK_MAX;
|
|
|
|
};
|
|
|
|
class POS
|
|
{
|
|
public:
|
|
static const int POR1 = 0;
|
|
static const int POR2 = 1;
|
|
static const int TR1 = 2;
|
|
static const int TR2 = 3;
|
|
//static const int PDO = 4;
|
|
|
|
};
|
|
|
|
class EQP
|
|
{
|
|
public:
|
|
static const int POR1 = 0;
|
|
static const int POR2 = 1;
|
|
static const int TR1 = 2;
|
|
static const int TR2 = 3;
|
|
};
|
|
|
|
class CHANNEL
|
|
{
|
|
public:
|
|
static const int UP = 1;
|
|
static const int DOWN = 2;
|
|
};
|
|
|
|
struct PDI
|
|
{
|
|
int channel;
|
|
char entId[COIL_LEN_MAX]; /* entry coil id */
|
|
char extId[COIL_LEN_MAX]; /* exit coil id */
|
|
int okall; /* end point for zone */
|
|
char steelgrade[COIL_LEN_MAX]; /* exit coil id */
|
|
char order_quality[COIL_LEN_MAX]; /* exit coil id */
|
|
int length; /* length [m] */
|
|
int width; /* width [mm] */
|
|
float thick; /* thick [mm] */
|
|
|
|
int weight; /* weight */
|
|
float coat_weight_t;
|
|
float coat_weight_b;
|
|
char ann_code[5]; /*ann_code */
|
|
};
|
|
|
|
struct PDO
|
|
{
|
|
char entId[COIL_LEN_MAX]; /* entry coil id */
|
|
char extId[COIL_LEN_MAX]; /* exit coil id */
|
|
int start; /* begin [m] */
|
|
int end; /* end [m] */
|
|
char starttime[16]; /* start time */
|
|
char endtime[16]; /* end time */
|
|
char steelgrade[COIL_LEN_MAX]; /* exit coil id */
|
|
int length; /* length [m] */
|
|
int length_L2; /* length [m] */
|
|
int width; /* width [mm] */
|
|
float thick; /* thick [mm] */
|
|
int weight; /* weight */
|
|
int finalflag; /* final flag add 20220905 */
|
|
int passno; /*max pass size*/
|
|
char decision[20]; /*0HELD*/
|
|
char score[10]; /*score of coilid*/
|
|
int sample[3]; /*sample 0:head 1:center 2:tail [mm]*/
|
|
int escrap[3]; /*entry scrap 0:head 1:center 2:tail [mm]*/
|
|
int dscrap[3]; /*exit scrap 0:head 1:center 2:tail [mm]*/
|
|
};
|
|
|
|
|
|
|
|
struct SET
|
|
{
|
|
char entId[COIL_LEN_MAX]; /* entry coil id */
|
|
char extId[COIL_LEN_MAX]; /* exit coil id */
|
|
char steelgrade[COIL_LEN_MAX]; /* exit coil id */
|
|
int length; /* length [m] */
|
|
int width; /* width [mm] */
|
|
float thick; /* thick [mm] */
|
|
int weight; /* weight */
|
|
};
|
|
|
|
struct TRK_COIL
|
|
{
|
|
int ti; /* coil index TI */
|
|
char entId[COIL_LEN_MAX]; /* entry coil id */
|
|
char extId[COIL_LEN_MAX]; /* exit coil id */
|
|
int status; /* start point for zone */
|
|
//PDI pdi;
|
|
//PDO pdo;
|
|
//SET set;
|
|
};
|
|
|
|
typedef TRK_COIL TRK_COILS[TRK_POS_MAX+CENTER_POS_MAX+PDO_STACK_MAX];
|
|
typedef struct{
|
|
short TelLen; // TelLen
|
|
short TelID; // TelID
|
|
char entId[16]; //entId
|
|
char extId[16]; //extId
|
|
float GUAGE_COAT_WEIGHT_WS; // GUAGE_COAT_WEIGHT_WS
|
|
float GUAGE_COAT_WEIGHT_CS; // GUAGE_COAT_WEIGHT_CS
|
|
float GUAGE_COAT_WEIGHT_DS; // GUAGE_COAT_WEIGHT_DS
|
|
float GUAGE_COAT_WEIGHT_AV; // GUAGE_COAT_WEIGHT_AV
|
|
float GUAGE_COAT; // GUAGE_COAT
|
|
float GUAGE_LENGTH; // GUAGE_LENGTH
|
|
float GUAGE_AVG_VALUE[60]; // GUAGE_AVG_VALUE
|
|
short Side;
|
|
}coatWt;
|
|
|
|
|
|
};
|
|
#endif
|