372 lines
6.8 KiB
Protocol Buffer
372 lines
6.8 KiB
Protocol Buffer
syntax = "proto3";
|
||
|
||
//系统状态信息
|
||
message StateMsg
|
||
{
|
||
enum PrintState
|
||
{
|
||
STANDBY = 0;
|
||
STANDBY_PAUSE = 1;
|
||
STANDBY_STOP = 2;
|
||
PREPRINT = 3;
|
||
PRINTING = 4;
|
||
FINISH = 5;
|
||
PAUSE = 6;
|
||
STOP = 7;
|
||
};
|
||
float oxygenValue=1; //氧含量
|
||
float ambientTemp=2; //环境温度
|
||
float innerTemp=3; //舱内温度
|
||
float windValue=4; //风速
|
||
float platformTempValue=5; //基板温度
|
||
float platformTempSettingValue=6; //基板温度目标
|
||
float moldPos=7; //成型缸位置
|
||
float powderPos=8; //粉料缸位置
|
||
float armPos=9; //铺粉臂位置
|
||
PrintState printState=10; //设备打印状态
|
||
int32 layerIndex=11; //当前层
|
||
int32 limitFlag=12; //限位掩码
|
||
string machineId=13; //设备ID
|
||
bool isDoorClose=14; //舱门已关
|
||
uint64 accTime=15; //累计时间
|
||
uint64 remainTime=16; //剩余时间
|
||
uint64 totalTime=17; //总估时间
|
||
int32 layerCount=18; //总层数
|
||
int64 printTime=19; //打印时间
|
||
string material=20; //材质
|
||
string jobName=21; //任务名称
|
||
string jobId=22; //任务ID
|
||
string taskId=23;
|
||
float remainPowder=24; //剩余粉量
|
||
}
|
||
|
||
//加载的任务信息
|
||
message JobInfoMsg
|
||
{
|
||
string name=1; //任务名称
|
||
float xSize=2; //x 尺寸
|
||
float ySize=3; //y
|
||
float zSize=4; //z
|
||
string material=5; //材质
|
||
float layerThickness=6; //层厚
|
||
uint32 layerCount=7; //总层数
|
||
uint32 componentCount=8; //部件数
|
||
float volume=9;
|
||
float supportVolume=10;
|
||
string jobId=11; //任务ID
|
||
string taskId=12;
|
||
}
|
||
|
||
//状态变换消息
|
||
message StateChangeMsg
|
||
{
|
||
enum PrintState
|
||
{
|
||
STANDBY = 0;
|
||
STANDBY_PAUSE = 1;
|
||
STANDBY_STOP = 2;
|
||
PREPRINT = 3;
|
||
PRINTING = 4;
|
||
FINISH = 5;
|
||
PAUSE = 6;
|
||
STOP = 7;
|
||
};
|
||
float oxygenValue=1; //氧含量
|
||
float ambientTemp=2; //环境温度
|
||
float innerTemp=3; //仓内温度
|
||
float windValue=4; //风速
|
||
float platformTempValue=5; //基板温度
|
||
float platformTempSettingValue=6; //基板温度目标
|
||
float moldPos=7; //成型缸位置
|
||
float powderPos=8; //粉料缸位置
|
||
float armPos=9; //铺粉臂位置
|
||
PrintState printState=10; //设备打印状态
|
||
int32 layerIndex=11; //当前层
|
||
int32 limitFlag=12; //限位掩码
|
||
string machineId=13; //设备ID
|
||
bool isDoorClose=14; //舱门已关
|
||
uint64 accTime=15; //累计时间
|
||
uint64 remainTime=16; //剩余时间
|
||
uint64 totalTime=17; //总估时间
|
||
int32 layerCount=18; //总层数
|
||
int64 printTime=19; //打印时间
|
||
string material=20; //材质
|
||
string jobName=21; //任务名称
|
||
string jobId=22; //任务ID
|
||
string taskId=23;
|
||
float remainPowder=24; //剩余粉量
|
||
}
|
||
|
||
//机器信息
|
||
message MachineMsg
|
||
{
|
||
string machineId=1;
|
||
|
||
enum MachineType
|
||
{
|
||
HBD_100 = 0;
|
||
HBD_280 = 1;
|
||
HBD_80 = 2;
|
||
HBD_150 = 3;
|
||
HBD_280T = 4;
|
||
HBD_200D = 5;
|
||
HBD_350 = 6;
|
||
HBD_150T = 7;
|
||
HBD_E500=8;
|
||
HBD_V350=9;
|
||
|
||
HBD_1000=1000;
|
||
HBD_1500=1001;
|
||
HBD_1200V0=1002;
|
||
HBD_1200=1003;
|
||
HBD_E1000=1004;
|
||
}
|
||
MachineType machineType=2;
|
||
|
||
enum PurifierType
|
||
{
|
||
HBD_PURIFIER_1 = 0;
|
||
XT = 1;
|
||
HBD_PURIFIER_2 = 2;
|
||
}
|
||
PurifierType purifierType=3;
|
||
|
||
int64 lastStartTime=4;
|
||
int64 lastShutdownTime=5;
|
||
int32 language=6;
|
||
bool isOnline=7;
|
||
string password=8;
|
||
string name=9;
|
||
string location=10;
|
||
}
|
||
|
||
//
|
||
message ErrorMsg
|
||
{
|
||
enum ErrorType
|
||
{
|
||
STOP = 0;
|
||
PAUSE = 1;
|
||
}
|
||
ErrorType errorType=1;
|
||
string errorMsg=2;
|
||
int64 occurTime=3;
|
||
string machineId=4;
|
||
}
|
||
|
||
//打印参数信息
|
||
message ParameterMsg
|
||
{
|
||
string type=1;
|
||
float laserSpeed=2;
|
||
float laserPower=3;
|
||
float laserDiameter=4;
|
||
}
|
||
|
||
//部件信息
|
||
message PartMsg
|
||
{
|
||
string name=1;
|
||
repeated ParameterMsg param=2;
|
||
}
|
||
|
||
//任务信息
|
||
message JobMsg
|
||
{
|
||
JobInfoMsg jobInfoMsg=1;
|
||
repeated PartMsg partMsg=2;
|
||
string machineId=3;
|
||
}
|
||
|
||
//层向量数据
|
||
message LayerDataRespMsg
|
||
{
|
||
string machineId=1;
|
||
int32 type=2;
|
||
int32 partId=3;
|
||
uint32 total=4;
|
||
uint32 index=5;
|
||
repeated float data=6;
|
||
bytes datas=7;
|
||
string paramType=8;
|
||
}
|
||
|
||
//任务参数
|
||
message JobParamMsg
|
||
{
|
||
string machineId=1;
|
||
string jobName=2;
|
||
string jobUid=3;
|
||
uint32 layerCount=4;
|
||
float thickness=5;
|
||
repeated PartMsg parts=6;
|
||
}
|
||
|
||
message LayerDataReqMsg
|
||
{
|
||
string machineId=1;
|
||
uint32 layerIndex=2;
|
||
}
|
||
|
||
message ResponseState
|
||
{
|
||
repeated StateMsg stateMsg=1;
|
||
}
|
||
|
||
//图像数据
|
||
message CameraDataMsg
|
||
{
|
||
string machineId=1;
|
||
string imageFormat=2;
|
||
uint32 imageWidth=3;
|
||
uint32 imageHeight=4;
|
||
uint32 imageDataSize=5;
|
||
bytes imageDatas=6;
|
||
}
|
||
|
||
message AlarmMsg
|
||
{
|
||
string time=1;
|
||
string task=2;
|
||
string type=3;
|
||
string detail=4;
|
||
}
|
||
|
||
message AlarmsMsg
|
||
{
|
||
repeated AlarmMsg alarms=1;
|
||
}
|
||
|
||
//任务记录
|
||
message TaskMsg
|
||
{
|
||
int64 id=1;
|
||
string name=2;
|
||
string beginTime=3;
|
||
string endTime=4;
|
||
int64 deoxygenMinute=5;
|
||
int64 totalUseTime=6;
|
||
float logMoldPosition=7;
|
||
uint32 finishLayer=8;
|
||
bool isFinish=9;
|
||
bool isContinuePrint=10;
|
||
}
|
||
|
||
message TasksMsg
|
||
{
|
||
repeated TaskMsg tasks=1;
|
||
}
|
||
|
||
message RecordTaskMsg{
|
||
int64 id=1;
|
||
string taskID=2;
|
||
string name=3;
|
||
string beginTime=4;
|
||
string endTime=5;
|
||
int64 deoxygenSecond=6;
|
||
int64 totalUseSecond=7;
|
||
float logMoldPosition=8;
|
||
uint32 finishLayer=9;
|
||
bool isFinish=10;
|
||
bool isContinuePrint=11;
|
||
}
|
||
|
||
message RecordTasksMsg
|
||
{
|
||
repeated RecordTaskMsg recordTasks=1;
|
||
}
|
||
|
||
message RecordTasksListMsg
|
||
{
|
||
repeated RecordTaskMsg recordTasksList=1;
|
||
}
|
||
|
||
|
||
message LayerStateMsg
|
||
{
|
||
string layerDateTime=1;
|
||
uint32 layerIndex=2;
|
||
float logMoldPosition=3;
|
||
float logOxygen=4;
|
||
float logInnerTemp=5;
|
||
float logPlateTemp=6;
|
||
float windSpeed=7;
|
||
float innerPressure=8;
|
||
float fanFreq=9;
|
||
float humidity=10;
|
||
float waterTemp=11;
|
||
}
|
||
|
||
message LayerStatesMsg
|
||
{
|
||
repeated LayerStateMsg layerStates=1;
|
||
}
|
||
|
||
message LayerImageMsg
|
||
{
|
||
int64 id=1;
|
||
uint32 layer=2;
|
||
string type=3;
|
||
}
|
||
|
||
message LayerImagesMsg
|
||
{
|
||
repeated LayerImageMsg images=1;
|
||
}
|
||
|
||
message LayerImageDataMsg
|
||
{
|
||
uint64 imageSize=1;
|
||
bytes imageData=2;
|
||
}
|
||
|
||
message LayerLoadCurveMsg
|
||
{
|
||
int64 id=1;
|
||
uint32 layer=2;
|
||
string coverType=3;
|
||
}
|
||
|
||
message LayerLoadCurvesMsg
|
||
{
|
||
repeated LayerLoadCurveMsg loadCurves=1;
|
||
}
|
||
|
||
message LayerLoadCurveDataMsg
|
||
{
|
||
repeated float mold=1;
|
||
repeated float powder=2;
|
||
repeated float arm=3;
|
||
}
|
||
|
||
message ReqRecordTaskMsg
|
||
{
|
||
string taskID=1;
|
||
}
|
||
|
||
message ReqRecordTaskListMsg
|
||
{
|
||
int64 beginSecond=1;
|
||
int64 endSecond=2;
|
||
}
|
||
|
||
message AlarmNotifyMsg
|
||
{
|
||
string jobName=1; //任务名称
|
||
string jobId=2; //任务ID
|
||
uint64 happenTime=3; //报警触发时间
|
||
int32 layerIndex=4; //当前层
|
||
string alarmCode=5; //报警编码
|
||
int32 alarmType=6; //报警类型,0停止,1暂停
|
||
string alarmContent=7; //报警信息内容
|
||
}
|
||
|
||
message RemoteJobResMsg
|
||
{
|
||
string jsonData=1;
|
||
}
|
||
|
||
message VersionInfoResMsg
|
||
{
|
||
string version=1;
|
||
} |