2024-05-11 17:43:38 +08:00
|
|
|
|
//bytes替代string 防止乱码
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
2024-05-15 17:59:04 +08:00
|
|
|
|
|
|
|
|
|
import "google/protobuf/any.proto";
|
2024-05-11 17:43:38 +08:00
|
|
|
|
package stream;
|
|
|
|
|
|
2024-05-15 17:59:04 +08:00
|
|
|
|
|
2024-05-11 17:43:38 +08:00
|
|
|
|
//ption cc_generic_services = true;
|
|
|
|
|
option java_multiple_files = true;
|
|
|
|
|
option java_package = "io.grpc.examples.stream";
|
|
|
|
|
option java_outer_classname = "StreamProto";
|
|
|
|
|
option objc_class_prefix = "ST";
|
|
|
|
|
|
|
|
|
|
enum TYPE{
|
|
|
|
|
iBOOL = 0;
|
|
|
|
|
iSHORT = 1;
|
|
|
|
|
iUSHORT = 2;
|
|
|
|
|
iINT = 3;
|
|
|
|
|
iUINT = 4;
|
|
|
|
|
iFLOAT = 5;
|
|
|
|
|
iSTRING = 6;
|
2024-05-30 17:25:23 +08:00
|
|
|
|
iCHAR = 7;
|
|
|
|
|
iUCHAR = 8;
|
|
|
|
|
iWORD = 9;
|
|
|
|
|
iDOUBLE = 10;
|
|
|
|
|
iTIMET = 11;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum DATAHANDLE {
|
|
|
|
|
UPDATE = 0;
|
|
|
|
|
ADD = 1;
|
|
|
|
|
DEL = 2;
|
2024-05-11 17:43:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-05-15 17:59:04 +08:00
|
|
|
|
/*==================begin 通用通信结构体====================*/
|
|
|
|
|
|
2024-05-11 17:43:38 +08:00
|
|
|
|
message ParamInfo{
|
|
|
|
|
bytes nameKey = 1; //参数key
|
2024-06-27 10:56:50 +08:00
|
|
|
|
bytes strValue = 2; //value
|
2024-05-11 17:43:38 +08:00
|
|
|
|
TYPE valueType = 3; //数据类型
|
2024-06-18 17:44:32 +08:00
|
|
|
|
|
|
|
|
|
bytes context = 4; //alarmcfg 使用
|
|
|
|
|
bool isEnable = 5;
|
|
|
|
|
bool isAlarm = 6;
|
|
|
|
|
bool isShow = 7;
|
2024-06-25 15:25:46 +08:00
|
|
|
|
|
|
|
|
|
int32 startLayer = 8; //层供粉量配置使用 struct PowderSet
|
|
|
|
|
int32 endLayer = 9;
|
|
|
|
|
float powder = 10;
|
2024-06-27 10:56:50 +08:00
|
|
|
|
|
|
|
|
|
int32 seqNo = 11; //ScannerControlCfg使用
|
|
|
|
|
int32 controlNo = 12;
|
|
|
|
|
int32 serialNo = 13;
|
|
|
|
|
int32 controlType = 14;
|
|
|
|
|
bytes cardName = 15;
|
|
|
|
|
bytes cardIP = 16;
|
|
|
|
|
bool hadAssign = 17;
|
|
|
|
|
bool hadMatch = 18; //isEnable公用
|
2024-05-11 17:43:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-06-04 17:49:56 +08:00
|
|
|
|
message RequestInfo { //读
|
2024-05-11 17:43:38 +08:00
|
|
|
|
uint32 dataType = 1; //信息类型
|
|
|
|
|
bytes nameKey = 2; //参数key
|
|
|
|
|
bytes strValue = 3; //value值
|
2024-05-30 17:25:23 +08:00
|
|
|
|
TYPE valueType = 4; //value数据类型
|
|
|
|
|
DATAHANDLE handleType = 5; //增删改
|
2024-06-04 14:08:12 +08:00
|
|
|
|
repeated ParamInfo item = 6; //参数值列表(函数参数使用)
|
2024-05-11 17:43:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-06-04 17:49:56 +08:00
|
|
|
|
message ResponseInfo { //写
|
2024-05-11 17:43:38 +08:00
|
|
|
|
uint32 dataType = 1; //信息类型
|
|
|
|
|
bool result = 2; //执行成功与否
|
|
|
|
|
repeated ParamInfo item = 3; //参数值
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-15 17:59:04 +08:00
|
|
|
|
/*==================end 通用通信结构体====================*/
|
|
|
|
|
|
2024-05-30 17:25:23 +08:00
|
|
|
|
|
2024-05-15 17:59:04 +08:00
|
|
|
|
message ResponseAny{
|
|
|
|
|
google.protobuf.Any data = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*==================begin h3d图层结构体===================*/
|
|
|
|
|
message LayerData{
|
|
|
|
|
|
|
|
|
|
float zCooldinate = 1; // Z 坐标 : Float 单位 mm
|
|
|
|
|
float powder = 2; // 供粉量: Float 单位 mm
|
|
|
|
|
float layerThickness = 3; //层厚
|
|
|
|
|
//LayerSummary layerSummary = 3; // 层统计区() : Struct
|
|
|
|
|
//uint32 layerBlock = 5; //层块数 决定多少个层块数据库
|
|
|
|
|
repeated LayerDataBlock layerDataBlock = 4; //层块数据区
|
|
|
|
|
|
|
|
|
|
bool result = 5; //是否ok
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message LayerDataBlock
|
|
|
|
|
{
|
|
|
|
|
int32 elementId = 1; // 零件 ID : Int32
|
|
|
|
|
int32 elementParamId = 2; // 零件参数 ID : Int32
|
|
|
|
|
//DataBlockSummary dbSummary = 3; //块统计区 : Struct
|
|
|
|
|
//uint32 blockNum = 4; // 块数据数: Uint32 //决定有多少个块数据区
|
|
|
|
|
|
|
|
|
|
uint32 blockType = 3; // 块类型: Char //1 代表向量型数据块,3 代表链型数据块
|
|
|
|
|
repeated VectorDataBlock vecBlocks= 4; //块数据区 向量型
|
|
|
|
|
repeated ChainDataBlock chainBlocks = 5; //块数据区 链型
|
|
|
|
|
uint32 order = 6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message VectorDataBlock{
|
|
|
|
|
float startX = 1; // 始点 X 位置 : Float //单位 mm
|
|
|
|
|
float startY=2; // 始点 Y 位置 : Float //单位 mm
|
|
|
|
|
float endX = 3; // 终点 X 位置 : Float //单位 mm
|
|
|
|
|
float endY = 4; // 终点 Y 位置 : Float //单位 mm
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message ChainDataBlock
|
|
|
|
|
{
|
|
|
|
|
uint32 dotNum = 1; // 点数:Uint32 //决定有多少个点区
|
|
|
|
|
repeated Point pointVec = 2; // 点区
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message Point{
|
|
|
|
|
float xPos = 1; // X 位置 : Float //单位 mm
|
|
|
|
|
float yPos = 2; // Y 位置 : Float //单位 mm
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//注册功能返回信息
|
|
|
|
|
message RegResponce{
|
|
|
|
|
int32 data = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-17 10:57:17 +08:00
|
|
|
|
message ImgInfoResponce{
|
|
|
|
|
uint32 levelImage = 1;
|
|
|
|
|
int32 width = 2;
|
|
|
|
|
int32 height = 3;
|
|
|
|
|
}
|
2024-05-11 17:43:38 +08:00
|
|
|
|
|
2024-06-04 17:49:56 +08:00
|
|
|
|
//注册功能返回信息 IOVersionStr接口返回值
|
|
|
|
|
message ComResponce{
|
|
|
|
|
bytes data = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-27 10:56:50 +08:00
|
|
|
|
//ScannerCrtlCfg结构体
|
|
|
|
|
message ScannerCrtlCfgResp{
|
|
|
|
|
repeated ScannerCrtlCfgData scannerCfg = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ScannerCrtlCfgData{
|
|
|
|
|
int32 seqNo = 1;
|
|
|
|
|
repeated FixPointData fixPointData = 2;
|
|
|
|
|
ScanParamCfg scanParamCfg = 3;
|
|
|
|
|
ScanParamCfg hatchingParams = 4;
|
|
|
|
|
ScanParamCfg borderParams = 5;
|
|
|
|
|
ScanParamCfg supportParams = 6;
|
|
|
|
|
CorrectParamCfg correctParamCfg = 7;
|
|
|
|
|
ScanTestCfg scanTestCfg = 8;
|
|
|
|
|
SkyWritingCfg skyWritingCfg = 9;
|
|
|
|
|
repeated PowerCompensate powerCompensate = 10;
|
|
|
|
|
repeated TimePowerCompensate tPowerCompensate = 11;
|
|
|
|
|
|
|
|
|
|
int32 controlNo = 12;
|
|
|
|
|
int32 serialNo = 13;
|
|
|
|
|
int32 controlType = 14;
|
|
|
|
|
bytes cardName = 15;
|
|
|
|
|
bytes cardIP = 16;
|
|
|
|
|
bool isEnable = 17; //是否启动
|
|
|
|
|
bool hadAssign = 18;
|
|
|
|
|
bool hadMatch = 19;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message FixPointData{
|
|
|
|
|
int32 id = 1;
|
|
|
|
|
int32 cno = 2;
|
|
|
|
|
float pointX = 3;
|
|
|
|
|
float pointY = 4;
|
|
|
|
|
uint32 duration = 5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message ScanParamCfg{
|
|
|
|
|
int32 edgeLevel = 1;
|
|
|
|
|
int32 edgeLevelMin = 2;
|
|
|
|
|
int32 edgeLevelMax = 3;
|
|
|
|
|
uint32 jumpDelay = 4;
|
|
|
|
|
uint32 jumpDelayMin = 5;
|
|
|
|
|
uint32 jumpDelayMax = 6;
|
|
|
|
|
uint32 scanDelay = 7;
|
|
|
|
|
uint32 scanDelayMin = 8;
|
|
|
|
|
uint32 scanDelayMax = 9;
|
|
|
|
|
uint32 polygonDelay = 10;
|
|
|
|
|
uint32 polygonDelayMin = 11;
|
|
|
|
|
uint32 polygonDelayMax = 12;
|
|
|
|
|
int64 laseroffDelay = 13;
|
|
|
|
|
int64 laseroffDelayMin = 14;
|
|
|
|
|
int64 laseroffDelayMax = 15;
|
|
|
|
|
int64 laseronDelay = 16;
|
|
|
|
|
int64 laseronDelayMin = 17;
|
|
|
|
|
int64 laseronDelayMax = 18;
|
|
|
|
|
uint32 minJumpDelay = 19;
|
|
|
|
|
uint32 minJumpDelayMin = 20;
|
|
|
|
|
uint32 minJumpDelayMax = 21;
|
|
|
|
|
uint32 jumpLengthLimit = 22;
|
|
|
|
|
uint32 jumpLengthLimitMin = 23;
|
|
|
|
|
uint32 jumpLengthLimitMax = 24;
|
|
|
|
|
double jumpSpeed = 25;
|
|
|
|
|
double jumpSpeedMin = 26;
|
|
|
|
|
double jumpSpeedMax = 27;
|
|
|
|
|
double markSpeed = 28;
|
|
|
|
|
double markSpeedMin = 29;
|
|
|
|
|
double markSpeedMax = 30;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message CorrectParamCfg{
|
|
|
|
|
double xmeasureMin = 1; //x可打印最小位置
|
|
|
|
|
double xmeasureMax = 2; //x可打印最大位置
|
|
|
|
|
double ymeasureMin = 3; //y可打印最小位置
|
|
|
|
|
double ymeasureMax = 4; //y可打印最大位置
|
|
|
|
|
double xposfix = 5; //x位置修正
|
|
|
|
|
double yposfix = 6; //y位置修正
|
|
|
|
|
double scanAngle = 7; //旋转角度 逆时针
|
|
|
|
|
double scanAngleMin = 8;
|
|
|
|
|
double scanAngleMax = 9;
|
|
|
|
|
double fixAngle = 10; //旋转角度 逆时针
|
|
|
|
|
double fixAngleMin = 11;
|
|
|
|
|
double fixAngleMax = 12;
|
|
|
|
|
double xcorrect = 13; //x尺寸修正
|
|
|
|
|
double ycorrect = 14; //y尺寸修正
|
|
|
|
|
double xcorrectMin = 15;
|
|
|
|
|
double xcorrectMax = 16;
|
|
|
|
|
double ycorrectMin = 17;
|
|
|
|
|
double ycorrectMax = 18;
|
|
|
|
|
double realXOffset = 19;
|
|
|
|
|
double realYOffset = 20;
|
|
|
|
|
double factorK = 21;
|
|
|
|
|
bool isCorrectFile3D = 22;
|
|
|
|
|
bool isDynamicFocus = 23; //是否动态聚焦
|
|
|
|
|
double defocusRatio = 24; //离焦比
|
|
|
|
|
double defocusRatioMin = 25;
|
|
|
|
|
double defocusRatioMax = 26;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ScanTestCfg{
|
|
|
|
|
int32 debugShape = 1;
|
|
|
|
|
int32 shapeSize = 2;
|
|
|
|
|
int32 shapeSizeMin = 3;
|
|
|
|
|
int32 shape_size_max = 4;
|
|
|
|
|
int32 laser_power = 5;
|
|
|
|
|
int32 laser_power_min = 6;
|
|
|
|
|
int32 laser_power_max = 7;
|
|
|
|
|
double defocus = 8;
|
|
|
|
|
double defocus_min = 9;
|
|
|
|
|
double defocus_max = 10;
|
|
|
|
|
bool is_cycle = 11;
|
|
|
|
|
double cross_x = 12;
|
|
|
|
|
double cross_y = 13;
|
|
|
|
|
double z_distance = 14;
|
|
|
|
|
bool isAutoHeatingScanner = 15; //开启暂停开始时预热振镜
|
|
|
|
|
uint32 autoHeatingScannerMinutes = 16;
|
|
|
|
|
uint32 autoHeatingScannerSize = 17;
|
|
|
|
|
double autoHeatingScannerSpeed = 18;
|
|
|
|
|
double mark_test_start_x = 19;
|
|
|
|
|
double mark_test_start_y = 20;
|
|
|
|
|
double mark_test_end_x = 21;
|
|
|
|
|
double mark_test_end_y = 22;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message SkyWritingCfg{
|
|
|
|
|
bool isEnable = 1;
|
|
|
|
|
double timelag = 2;
|
|
|
|
|
double timelagMin = 3;
|
|
|
|
|
double timelagMax = 4;
|
|
|
|
|
int64 laserOnShift = 5;
|
|
|
|
|
int64 laserOnShiftMin = 6;
|
|
|
|
|
int64 laserOnShiftMax = 7;
|
|
|
|
|
uint32 nprev = 8;
|
|
|
|
|
uint32 nprevMin =9;
|
|
|
|
|
uint32 nprevMax = 10;
|
|
|
|
|
uint32 npost = 11;
|
|
|
|
|
uint32 npostMin = 12;
|
|
|
|
|
uint32 npostMax = 13;
|
|
|
|
|
int32 mode = 14;
|
|
|
|
|
double limite = 15;
|
|
|
|
|
double limiteMin = 16;
|
|
|
|
|
double limiteMax = 17;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message PowerCompensate{
|
|
|
|
|
int32 cno = 1;
|
|
|
|
|
int32 percent = 2;
|
|
|
|
|
float value = 3;
|
|
|
|
|
float value_min = 4;
|
|
|
|
|
float value_max = 5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message TimePowerCompensate{
|
|
|
|
|
int32 id = 1;
|
|
|
|
|
int32 cno = 2;
|
|
|
|
|
uint32 startMinute = 3;
|
|
|
|
|
uint32 endMinute = 4;
|
|
|
|
|
float compensate = 5;
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-11 17:43:38 +08:00
|
|
|
|
service Stream {
|
2024-05-15 17:59:04 +08:00
|
|
|
|
rpc Simple(RequestInfo) returns (ResponseAny) {} // 简单模式
|
2024-05-11 17:43:38 +08:00
|
|
|
|
rpc ServerStream (RequestInfo) returns (stream ResponseInfo) {} // 服务端数据流模式
|
|
|
|
|
rpc ClientStream (stream RequestInfo) returns (ResponseInfo) {} // 客户端数据流模式
|
|
|
|
|
rpc AllStream (stream RequestInfo) returns (stream ResponseInfo) {} // 双向数据流模式
|
|
|
|
|
}
|