fix
This commit is contained in:
parent
76833fe1f4
commit
02922e116f
@ -490,40 +490,15 @@ void ConfigManager::SendCfgToClients() {
|
||||
++commuCfgitem;
|
||||
}
|
||||
|
||||
list<Item> lst;
|
||||
auto start = m_AlarmCfgWrapper->m_StopAlarmCfgMap.begin();
|
||||
while (start != m_AlarmCfgWrapper->m_StopAlarmCfgMap.end()) {
|
||||
lst.emplace_back(Item{ start->first,"",UNKNOW,(*start).second->m_Content, (*start).second->m_IsEnable,
|
||||
(*start).second->m_IsAlarm, (*start).second->m_IsShow });
|
||||
++start;
|
||||
}
|
||||
ClientWrapper::Instance()->PushAllClient(WriteData(STOPALARMCFGPARAM, lst));
|
||||
SendAlarmCfg();
|
||||
SendPowderCfg();
|
||||
|
||||
lst.clear();
|
||||
start = m_AlarmCfgWrapper->m_PauseAlarmCfgMap.begin();
|
||||
while (start != m_AlarmCfgWrapper->m_PauseAlarmCfgMap.end()) {
|
||||
lst.emplace_back(Item{ start->first,"",UNKNOW,(*start).second->m_Content, (*start).second->m_IsEnable,
|
||||
(*start).second->m_IsAlarm, (*start).second->m_IsShow });
|
||||
++start;
|
||||
}
|
||||
ClientWrapper::Instance()->PushAllClient(WriteData(PAUSEALARMCFGPARAM, lst));
|
||||
|
||||
lst.clear();
|
||||
start = m_AlarmCfgWrapper->m_WarnAlarmCfgMap.begin();
|
||||
while (start != m_AlarmCfgWrapper->m_WarnAlarmCfgMap.end()) {
|
||||
lst.emplace_back(Item{ start->first,"",UNKNOW,(*start).second->m_Content, (*start).second->m_IsEnable,
|
||||
(*start).second->m_IsAlarm, (*start).second->m_IsShow });
|
||||
++start;
|
||||
}
|
||||
ClientWrapper::Instance()->PushAllClient(WriteData(WARNALARMCFGPARAM, lst));
|
||||
|
||||
|
||||
int index = 0;
|
||||
auto item = m_ScannerControlCfgDao->m_ScannerControlCfgMap.begin();
|
||||
while (item != m_ScannerControlCfgDao->m_ScannerControlCfgMap.end()) {
|
||||
//item->second->SendToClients();
|
||||
++item;
|
||||
}
|
||||
//int index = 0;
|
||||
//auto item = m_ScannerControlCfgDao->m_ScannerControlCfgMap.begin();
|
||||
//while (item != m_ScannerControlCfgDao->m_ScannerControlCfgMap.end()) {
|
||||
// //item->second->SendToClients();
|
||||
// ++item;
|
||||
//}
|
||||
|
||||
m_MoldCfg->SendToClients(MOLDCFGPARAM);
|
||||
m_LoadCfg->SendToClients(LOADCFGPARAM);
|
||||
@ -588,6 +563,53 @@ void ConfigManager::CallFuncs(const ReadData& rd, const list<Item>& lst, ::strea
|
||||
//
|
||||
//}
|
||||
|
||||
void ConfigManager::SendAlarmCfg() {
|
||||
list<Item> lst;
|
||||
auto start = m_AlarmCfgWrapper->m_StopAlarmCfgMap.begin();
|
||||
while (start != m_AlarmCfgWrapper->m_StopAlarmCfgMap.end()) {
|
||||
lst.emplace_back(Item{ start->first,"",UNKNOW,(*start).second->m_Content, (*start).second->m_IsEnable,
|
||||
(*start).second->m_IsAlarm, (*start).second->m_IsShow });
|
||||
++start;
|
||||
}
|
||||
ClientWrapper::Instance()->PushAllClient(WriteData(STOPALARMCFGPARAM, lst));
|
||||
|
||||
lst.clear();
|
||||
start = m_AlarmCfgWrapper->m_PauseAlarmCfgMap.begin();
|
||||
while (start != m_AlarmCfgWrapper->m_PauseAlarmCfgMap.end()) {
|
||||
lst.emplace_back(Item{ start->first,"",UNKNOW,(*start).second->m_Content, (*start).second->m_IsEnable,
|
||||
(*start).second->m_IsAlarm, (*start).second->m_IsShow });
|
||||
++start;
|
||||
}
|
||||
ClientWrapper::Instance()->PushAllClient(WriteData(PAUSEALARMCFGPARAM, lst));
|
||||
|
||||
lst.clear();
|
||||
start = m_AlarmCfgWrapper->m_WarnAlarmCfgMap.begin();
|
||||
while (start != m_AlarmCfgWrapper->m_WarnAlarmCfgMap.end()) {
|
||||
lst.emplace_back(Item{ start->first,"",UNKNOW,(*start).second->m_Content, (*start).second->m_IsEnable,
|
||||
(*start).second->m_IsAlarm, (*start).second->m_IsShow });
|
||||
++start;
|
||||
}
|
||||
ClientWrapper::Instance()->PushAllClient(WriteData(WARNALARMCFGPARAM, lst));
|
||||
|
||||
}
|
||||
|
||||
|
||||
//层供粉量参数
|
||||
void ConfigManager::SendPowderCfg() {
|
||||
list<Item> lst;
|
||||
//m_ParamSetCfg.ParamSetVec[0]->PowderSets.emplace_back(new ParamSetCfg::PowderSet()); //test
|
||||
vector<ParamSetCfg::PowderSet> vec;
|
||||
m_ParamSetCfg.GetPowderCfg(vec);
|
||||
auto powderStart = vec.begin();
|
||||
while (powderStart != vec.end()) {
|
||||
lst.emplace_back(Item{ "","",UNKNOW,"", 0,0,0,
|
||||
powderStart->start_layer,powderStart->end_layer,powderStart->powder });
|
||||
++powderStart;
|
||||
}
|
||||
ClientWrapper::Instance()->PushAllClient(WriteData(POWDERSETPARAM, lst));
|
||||
|
||||
}
|
||||
|
||||
void ConfigManager::UpdateCfg(const ReadData& rd) {
|
||||
|
||||
switch (rd.dataType)
|
||||
@ -617,8 +639,15 @@ void ConfigManager::UpdateCfg(const ReadData& rd) {
|
||||
case COMMUNICATIONCFG:
|
||||
UpdateCommunicationCfg(rd); break;
|
||||
case ALARMCFG:
|
||||
m_AlarmCfgWrapper->UpdateCfg(rd.nameKey, (bool)ConverType::TryToI(rd.strValue)); break;
|
||||
|
||||
m_AlarmCfgWrapper->UpdateCfg(rd.nameKey, (bool)ConverType::TryToI(rd.strValue));
|
||||
SendAlarmCfg();
|
||||
break;
|
||||
case POWDERSET:
|
||||
if (rd.handleType == TOTAL) {
|
||||
m_ParamSetCfg.UpdatePowderCfg(rd);
|
||||
SendPowderCfg();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
HbdLanguage* GetLanguage(int id); //无用
|
||||
void GetDefaultText(map<string,string>& textmap); //无用
|
||||
|
||||
ParamSetCfg* GetParamSetCfg() { return &m_ParamSetCfg; } //传 困难
|
||||
ParamSetCfg* GetParamSetCfg() { return &m_ParamSetCfg; } //已传
|
||||
//map<int, LaserCfg*>* GetLaserCfgMap() { return &m_pLaserCfgDao->m_LaserCfgMap; }
|
||||
//vector<LaserCfg*>* GetLaserCfgs() { return &m_pLaserCfgDao->m_LaserCfgs; }
|
||||
map<int,ScannerControlCfg*>* GetScannerControlCfg() { return &m_ScannerControlCfgDao->m_ScannerControlCfgMap; } //传
|
||||
@ -152,6 +152,8 @@ private:
|
||||
string GetIOVersionStrs(int machineid); //io版本 字符串返回
|
||||
void RedTestCfgStart();
|
||||
void RedTestCfgStop();
|
||||
void SendAlarmCfg();
|
||||
void SendPowderCfg();
|
||||
private:
|
||||
SQLite::Database* m_pDB;
|
||||
HbdLanguageDao* m_pHbdLanguageDao;
|
||||
|
@ -326,4 +326,6 @@ void AlarmCfgWrapper::UpdateCfg(const string& key, bool isEnable) {
|
||||
break;
|
||||
}
|
||||
} while (false);
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
#include "ParamSetCfg.h"
|
||||
#include "ParamSetCfg.h"
|
||||
|
||||
ParamSetCfg::ParamSetCfg()
|
||||
{}
|
||||
@ -103,72 +103,100 @@ void ParamSetCfg::Generate(vector<string>& ins)
|
||||
void ParamSetCfg::GetUpdateSql(vector<string>& ups)
|
||||
{}
|
||||
|
||||
bool ParamSetCfg::Add(string name)
|
||||
{
|
||||
for (auto pps : ParamSetVec)
|
||||
{
|
||||
if (pps->ConfigName == name)
|
||||
return false;
|
||||
//bool ParamSetCfg::Add(string name)
|
||||
//{
|
||||
// for (auto pps : ParamSetVec)
|
||||
// {
|
||||
// if (pps->ConfigName == name)
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// ParamSet* ps = new ParamSet;
|
||||
// ps->ConfigName = name;
|
||||
//
|
||||
// std::map<string, LaserSet*>::iterator it;
|
||||
// for (it = ParamSetVec.front()->LaserSetMap.begin();
|
||||
// it != ParamSetVec.front()->LaserSetMap.end();
|
||||
// it++)
|
||||
// {
|
||||
// LaserSet* ls = new LaserSet;
|
||||
// ls->laser_speed = it->second->laser_speed;
|
||||
// ls->laser_diameter = it->second->laser_diameter;
|
||||
// ls->laser_power = it->second->laser_power;
|
||||
// ps->LaserSetMap[it->first] = ls;
|
||||
// }
|
||||
//
|
||||
// for (unsigned int i = 0; i < ParamSetVec.front()->PowderSets.size(); i++)
|
||||
// {
|
||||
// PowderSet* src = ParamSetVec.front()->PowderSets[i];
|
||||
// PowderSet* pps = new PowderSet;
|
||||
// pps->end_layer = src->end_layer;
|
||||
// pps->start_layer = src->start_layer;
|
||||
// pps->powder = src->powder;
|
||||
// ps->PowderSets.push_back(pps);
|
||||
// }
|
||||
//
|
||||
// ParamSetVec.push_back(ps);
|
||||
// return true;
|
||||
//}
|
||||
|
||||
//bool ParamSetCfg::Delete(string name)
|
||||
//{
|
||||
// if (name == "Default")
|
||||
// return false;
|
||||
//
|
||||
// std::vector<ParamSet*>::iterator it;
|
||||
// for (it = ParamSetVec.begin(); it != ParamSetVec.end(); it++)
|
||||
// {
|
||||
// if ((*it)->ConfigName == name)
|
||||
// {
|
||||
// std::map<string, LaserSet*>::iterator lsit;
|
||||
// for (lsit = (*it)->LaserSetMap.begin();
|
||||
// lsit != (*it)->LaserSetMap.end();
|
||||
// lsit++)
|
||||
// {
|
||||
// delete lsit->second;
|
||||
// }
|
||||
// (*it)->LaserSetMap.clear();
|
||||
//
|
||||
// for (unsigned int i = 0; i < (*it)->PowderSets.size(); i++)
|
||||
// delete (*it)->PowderSets[i];
|
||||
// (*it)->PowderSets.clear();
|
||||
//
|
||||
// ParamSetVec.erase(it);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return true;
|
||||
//}
|
||||
|
||||
void ParamSetCfg::UpdatePowderCfg(const ReadData& wd) { //全量更新层供粉量配置
|
||||
std::unique_lock<std::shared_mutex> lck(m_sMtx);
|
||||
if (ParamSetVec.empty()) return;
|
||||
|
||||
auto it = ParamSetVec[0]->PowderSets.begin();
|
||||
while (it != ParamSetVec[0]->PowderSets.end()) {
|
||||
delete (*it);
|
||||
++it;
|
||||
}
|
||||
ParamSetVec[0]->PowderSets.clear();
|
||||
|
||||
for (auto item = wd.its.begin(); item != wd.its.end(); ++item) {
|
||||
PowderSet* ppowder = new PowderSet(item->start_layer, item->end_layer, item->powder);
|
||||
ParamSetVec[0]->PowderSets.emplace_back(ppowder);
|
||||
}
|
||||
|
||||
ParamSet* ps = new ParamSet;
|
||||
ps->ConfigName = name;
|
||||
|
||||
std::map<string, LaserSet*>::iterator it;
|
||||
for (it = ParamSetVec.front()->LaserSetMap.begin();
|
||||
it != ParamSetVec.front()->LaserSetMap.end();
|
||||
it++)
|
||||
{
|
||||
LaserSet* ls = new LaserSet;
|
||||
ls->laser_speed = it->second->laser_speed;
|
||||
ls->laser_diameter = it->second->laser_diameter;
|
||||
ls->laser_power = it->second->laser_power;
|
||||
ps->LaserSetMap[it->first] = ls;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < ParamSetVec.front()->PowderSets.size(); i++)
|
||||
{
|
||||
PowderSet* src = ParamSetVec.front()->PowderSets[i];
|
||||
PowderSet* pps = new PowderSet;
|
||||
pps->end_layer = src->end_layer;
|
||||
pps->start_layer = src->start_layer;
|
||||
pps->powder = src->powder;
|
||||
ps->PowderSets.push_back(pps);
|
||||
}
|
||||
|
||||
ParamSetVec.push_back(ps);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ParamSetCfg::Delete(string name)
|
||||
{
|
||||
if (name == "Default")
|
||||
return false;
|
||||
|
||||
std::vector<ParamSet*>::iterator it;
|
||||
for (it = ParamSetVec.begin(); it != ParamSetVec.end(); it++)
|
||||
{
|
||||
if ((*it)->ConfigName == name)
|
||||
{
|
||||
std::map<string, LaserSet*>::iterator lsit;
|
||||
for (lsit = (*it)->LaserSetMap.begin();
|
||||
lsit != (*it)->LaserSetMap.end();
|
||||
lsit++)
|
||||
{
|
||||
delete lsit->second;
|
||||
}
|
||||
(*it)->LaserSetMap.clear();
|
||||
|
||||
for (unsigned int i = 0; i < (*it)->PowderSets.size(); i++)
|
||||
delete (*it)->PowderSets[i];
|
||||
(*it)->PowderSets.clear();
|
||||
|
||||
ParamSetVec.erase(it);
|
||||
break;
|
||||
}
|
||||
void ParamSetCfg::GetPowderCfg(vector<PowderSet>& powderVec) {
|
||||
std::shared_lock<std::shared_mutex> lck(m_sMtx);
|
||||
if (ParamSetVec.empty()) return;
|
||||
for (auto item = ParamSetVec[0]->PowderSets.begin(); item != ParamSetVec[0]->PowderSets.end(); ++item) {
|
||||
powderVec.emplace_back(PowderSet{ (*item)->start_layer,(*item)->end_layer, (*item)->powder });
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const string ParamSetCfg::TABLE_NAME = "ParamSet";
|
||||
|
@ -1,7 +1,10 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <shared_mutex>
|
||||
#include "../DataManage/RWData.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class ParamSetCfg
|
||||
@ -20,12 +23,13 @@ public:
|
||||
int end_layer;
|
||||
float powder;
|
||||
PowderSet():start_layer(1),end_layer(10),powder(2){}
|
||||
PowderSet(int slayer, int elayer, float powder) :start_layer(slayer), end_layer(elayer), powder(powder) {}
|
||||
} PowderSet;
|
||||
|
||||
typedef struct ParamSet
|
||||
{
|
||||
string ConfigName;
|
||||
std::map<string, LaserSet*> LaserSetMap;
|
||||
std::map<string, LaserSet*> LaserSetMap; //没用到
|
||||
std::vector<PowderSet*> PowderSets;
|
||||
} ParamSet;
|
||||
|
||||
@ -35,9 +39,11 @@ public:
|
||||
|
||||
static void Generate(vector<string>& ins);
|
||||
void GetUpdateSql(vector<string>& ups);
|
||||
bool Add(string name);
|
||||
bool Delete(string name);
|
||||
//bool Add(string name); //没用到
|
||||
//bool Delete(string name); //没用到
|
||||
|
||||
void GetPowderCfg(vector<PowderSet>& powderVec);
|
||||
void UpdatePowderCfg(const ReadData& wd);
|
||||
public:
|
||||
static const string TABLE_NAME;
|
||||
static const string FIELD_ID;
|
||||
@ -48,6 +54,7 @@ public:
|
||||
static const string FIELD_DATA3;
|
||||
|
||||
public:
|
||||
std::shared_mutex m_sMtx;
|
||||
std::vector<ParamSet*> ParamSetVec;
|
||||
};
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
|
||||
ScannerControlCfg::ScannerControlCfg()
|
||||
: m_Index(new IntData("Index"))
|
||||
, m_SeqNo(new IntData("SeqNo"))
|
||||
: /*m_Index(new IntData("Index"))
|
||||
,*/ m_SeqNo(new IntData("SeqNo"))
|
||||
, m_ControlNo(new IntData("ControlNo"))
|
||||
, m_SerialNo(new IntData("SerialNo"))
|
||||
, m_ControlType(new IntData("ControlType"))
|
||||
|
@ -24,8 +24,8 @@ public:
|
||||
void Init();
|
||||
ScanParamCfg* GetScanParamCfg(string str);
|
||||
public:
|
||||
IntData* m_Index; //编号 配合ConfigManager中的map
|
||||
IntData* m_SeqNo;
|
||||
//IntData* m_Index;
|
||||
IntData* m_SeqNo; //编号 配合ConfigManager中的map
|
||||
IntData* m_ControlNo;
|
||||
IntData* m_SerialNo;
|
||||
IntData* m_ControlType;
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <typeinfo>
|
||||
#include "../SystemInfo.h"
|
||||
|
||||
//接收数据的回调
|
||||
void DataHandle::DataCallBackProc(void* pthis, const ReadData& msg, const std::list<Item>& its) {
|
||||
DataHandle* p = (DataHandle*)pthis;
|
||||
ReadData rd = msg;
|
||||
@ -10,7 +11,7 @@ void DataHandle::DataCallBackProc(void* pthis, const ReadData& msg, const std::l
|
||||
p->DataCallBackHandle(rd, lst);
|
||||
}
|
||||
|
||||
void DataHandle::LayersDataCallBackProc(void* pthis,const ReadData& msg, const list<Item>& lst, ::stream::ResponseAny** response) {
|
||||
void DataHandle::FuncDataCallBackProc(void* pthis,const ReadData& msg, const list<Item>& lst, ::stream::ResponseAny** response) {
|
||||
DataHandle* p = (DataHandle*)pthis;
|
||||
int index = atoi(msg.strValue.data());
|
||||
|
||||
@ -50,7 +51,7 @@ void DataHandle::Init() {
|
||||
m_config->Init();
|
||||
|
||||
m_streamServer = new StreamServer(m_config->GetMachine());
|
||||
m_streamServer->SetCallBackFunc(this, &DataHandle::DataCallBackProc, &DataHandle::LayersDataCallBackProc);
|
||||
m_streamServer->SetCallBackFunc(this, &DataHandle::DataCallBackProc, &DataHandle::FuncDataCallBackProc);
|
||||
m_streamServer->Init();
|
||||
|
||||
m_controller = new Controller();
|
||||
@ -119,6 +120,7 @@ void DataHandle::DataCallBackHandle(const ReadData& msg, const std::list<Item>&
|
||||
case POWDERESTIMATECFG:
|
||||
case COMMUNICATIONCFG:
|
||||
case ALARMCFG:
|
||||
case POWDERSET:
|
||||
ConfigManager::GetInstance()->UpdateCfg(msg);
|
||||
break;
|
||||
case REQUEST:
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
class DataHandle{
|
||||
typedef void (*DataCallBack)(void* pthis, const ReadData& msg);
|
||||
typedef void (*LayersDataCallBack)(void* pthis, const ReadData& msg, const list<Item>& lst, ::stream::ResponseAny** response);
|
||||
typedef void (*FuncDataCallBack)(void* pthis, const ReadData& msg, const list<Item>& lst, ::stream::ResponseAny** response);
|
||||
public:
|
||||
DataHandle();
|
||||
~DataHandle();
|
||||
@ -17,7 +17,7 @@ public:
|
||||
void Stop();
|
||||
|
||||
static void DataCallBackProc(void* pthis, const ReadData& msg,const std::list<Item>& its);
|
||||
static void LayersDataCallBackProc(void* pthis, const ReadData& msg, const list<Item>& lst, ::stream::ResponseAny** response);
|
||||
static void FuncDataCallBackProc(void* pthis, const ReadData& msg, const list<Item>& lst, ::stream::ResponseAny** response);
|
||||
private:
|
||||
//DataCallBack m_dataCallBack;
|
||||
//std::thread m_testTd;
|
||||
|
@ -34,6 +34,7 @@ enum READTYPE {
|
||||
POWDERESTIMATECFG,
|
||||
COMMUNICATIONCFG,
|
||||
ALARMCFG,
|
||||
POWDERSET,
|
||||
|
||||
LOADPARAM, //装载参数
|
||||
|
||||
@ -63,6 +64,7 @@ enum DATAHANDLE {
|
||||
UPDATE = 0,
|
||||
ADD,
|
||||
DEL,
|
||||
TOTAL, //发全量信息
|
||||
};
|
||||
|
||||
|
||||
@ -115,7 +117,7 @@ enum WRITETYPE {
|
||||
STOPALARMCFGPARAM, //AlarmCfgWrapper stop参数
|
||||
PAUSEALARMCFGPARAM, //AlarmCfgWrapper pause参数
|
||||
WARNALARMCFGPARAM, //AlarmCfgWrapper warn参数
|
||||
|
||||
POWDERSETPARAM, //PowderSet 参数
|
||||
|
||||
MOLDCFGPARAM,
|
||||
LOADCFGPARAM,
|
||||
@ -144,6 +146,23 @@ struct Item {
|
||||
bool isEnable;
|
||||
bool isAlarm;
|
||||
bool isShow;
|
||||
|
||||
//层供粉量配置使用 struct PowderSet
|
||||
int start_layer;
|
||||
int end_layer;
|
||||
float powder;
|
||||
|
||||
//
|
||||
//IntData* m_Index; //编号 配合ConfigManager中的map
|
||||
//IntData* m_SeqNo;
|
||||
//IntData* m_ControlNo;
|
||||
//IntData* m_SerialNo;
|
||||
//IntData* m_ControlType;
|
||||
//StrData* m_CardName;
|
||||
//StrData* m_CardIP;
|
||||
//BoolData* m_IsEnable; //是否启动
|
||||
//BoolData* m_HadAssign;
|
||||
//BoolData* m_HadMatch;
|
||||
};
|
||||
|
||||
class ClientInfo;
|
||||
|
@ -32,8 +32,8 @@ StreamServer::~StreamServer() {
|
||||
paramLst.emplace_back(Item{ it.namekey(),it.strvalue() ,(DATATYPE)it.valuetype() }); //直接加到readData.its上面,后续的请求无法收到,不知道为啥
|
||||
}
|
||||
|
||||
if (m_layerDataCallBack)
|
||||
m_layerDataCallBack(m_handlePtr, readData, paramLst, &response);
|
||||
if (m_funcDataCallBack)
|
||||
m_funcDataCallBack(m_handlePtr, readData, paramLst, &response);
|
||||
return Status::OK;
|
||||
}
|
||||
|
||||
@ -64,12 +64,14 @@ Status StreamServer::AllStream(ServerContext* context, grpc::ServerReaderWriter<
|
||||
//函数参数
|
||||
std::list<Item> paramLst; //
|
||||
for (const ::stream::ParamInfo it : request.item()) {
|
||||
paramLst.emplace_back(Item{ it.namekey(),it.strvalue() ,(DATATYPE)it.valuetype() }); //直接加到readData.its上面,后续的请求无法收到,不知道为啥
|
||||
paramLst.emplace_back(Item{ it.namekey(),it.strvalue() ,(DATATYPE)it.valuetype()
|
||||
,it.context(),it.isenable(),it.isalarm(),it.isshow(),it.startlayer(),it.endlayer(),it.powder()}); //直接加到readData.its上面,后续的请求无法收到,不知道为啥
|
||||
}
|
||||
|
||||
printf("客户端消息:dataType:%d,nameKey:%s, strValue:%s,valueType:%d,lst:%zd\n",
|
||||
readData.dataType, readData.nameKey.c_str(), readData.strValue.c_str(), readData.valueType, paramLst.size());
|
||||
if (m_dataCallBack) {
|
||||
readData.its = paramLst;
|
||||
m_dataCallBack(m_handlePtr,readData, paramLst);
|
||||
}
|
||||
|
||||
@ -95,6 +97,10 @@ Status StreamServer::AllStream(ServerContext* context, grpc::ServerReaderWriter<
|
||||
paramInfo->set_isenable(wd->isEnable);
|
||||
paramInfo->set_isalarm(wd->isAlarm);
|
||||
paramInfo->set_isshow(wd->isShow);
|
||||
|
||||
paramInfo->set_startlayer(wd->start_layer);
|
||||
paramInfo->set_endlayer(wd->end_layer);
|
||||
paramInfo->set_powder(wd->powder);
|
||||
}
|
||||
stream->Write(response);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ using stream::ResponseInfo;
|
||||
|
||||
class StreamServer final : public Stream::Service {
|
||||
typedef void (*DataCallBack)(void* pthis,const ReadData& msg, const std::list<Item>& its);
|
||||
typedef void (*LayerDataCallBack)(void* pthis, const ReadData& msg,const list<Item>& lst, ::stream::ResponseAny** response);
|
||||
typedef void (*FuncDataCallBack)(void* pthis, const ReadData& msg,const list<Item>& lst, ::stream::ResponseAny** response);
|
||||
|
||||
|
||||
public:
|
||||
@ -30,10 +30,10 @@ public:
|
||||
void Run();
|
||||
void Stop();
|
||||
|
||||
void SetCallBackFunc(void* pdata,DataCallBack dataCallBack, LayerDataCallBack layerCB) {
|
||||
void SetCallBackFunc(void* pdata,DataCallBack dataCallBack, FuncDataCallBack layerCB) {
|
||||
m_dataCallBack = dataCallBack;
|
||||
m_handlePtr = pdata;
|
||||
m_layerDataCallBack = layerCB;
|
||||
m_funcDataCallBack = layerCB;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -44,7 +44,7 @@ private:
|
||||
std::thread m_checkCloseTd; //检测客户端关闭线程
|
||||
bool m_checkQuitFlag;
|
||||
DataCallBack m_dataCallBack;
|
||||
LayerDataCallBack m_layerDataCallBack;
|
||||
FuncDataCallBack m_funcDataCallBack;
|
||||
|
||||
int m_port; //监听端口
|
||||
void* m_handlePtr;
|
||||
|
Binary file not shown.
@ -40,6 +40,9 @@ PROTOBUF_CONSTEXPR ParamInfo::ParamInfo(::_pbi::ConstantInitialized)
|
||||
/*decltype(_impl_.isenable_)*/ false,
|
||||
/*decltype(_impl_.isalarm_)*/ false,
|
||||
/*decltype(_impl_.isshow_)*/ false,
|
||||
/*decltype(_impl_.startlayer_)*/ 0,
|
||||
/*decltype(_impl_.endlayer_)*/ 0,
|
||||
/*decltype(_impl_.powder_)*/ 0,
|
||||
/*decltype(_impl_._cached_size_)*/ {},
|
||||
} {}
|
||||
struct ParamInfoDefaultTypeInternal {
|
||||
@ -283,6 +286,9 @@ const ::uint32_t TableStruct_stream_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isenable_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isalarm_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isshow_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.startlayer_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.endlayer_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.powder_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::stream::RequestInfo, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
@ -411,17 +417,17 @@ const ::uint32_t TableStruct_stream_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE
|
||||
static const ::_pbi::MigrationSchema
|
||||
schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{0, -1, -1, sizeof(::stream::ParamInfo)},
|
||||
{15, -1, -1, sizeof(::stream::RequestInfo)},
|
||||
{29, -1, -1, sizeof(::stream::ResponseInfo)},
|
||||
{40, 49, -1, sizeof(::stream::ResponseAny)},
|
||||
{50, -1, -1, sizeof(::stream::LayerData)},
|
||||
{63, -1, -1, sizeof(::stream::LayerDataBlock)},
|
||||
{77, -1, -1, sizeof(::stream::VectorDataBlock)},
|
||||
{89, -1, -1, sizeof(::stream::ChainDataBlock)},
|
||||
{99, -1, -1, sizeof(::stream::Point)},
|
||||
{109, -1, -1, sizeof(::stream::RegResponce)},
|
||||
{118, -1, -1, sizeof(::stream::ImgInfoResponce)},
|
||||
{129, -1, -1, sizeof(::stream::ComResponce)},
|
||||
{18, -1, -1, sizeof(::stream::RequestInfo)},
|
||||
{32, -1, -1, sizeof(::stream::ResponseInfo)},
|
||||
{43, 52, -1, sizeof(::stream::ResponseAny)},
|
||||
{53, -1, -1, sizeof(::stream::LayerData)},
|
||||
{66, -1, -1, sizeof(::stream::LayerDataBlock)},
|
||||
{80, -1, -1, sizeof(::stream::VectorDataBlock)},
|
||||
{92, -1, -1, sizeof(::stream::ChainDataBlock)},
|
||||
{102, -1, -1, sizeof(::stream::Point)},
|
||||
{112, -1, -1, sizeof(::stream::RegResponce)},
|
||||
{121, -1, -1, sizeof(::stream::ImgInfoResponce)},
|
||||
{132, -1, -1, sizeof(::stream::ComResponce)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@ -440,47 +446,48 @@ static const ::_pb::Message* const file_default_instances[] = {
|
||||
};
|
||||
const char descriptor_table_protodef_stream_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
"\n\014stream.proto\022\006stream\032\031google/protobuf/"
|
||||
"any.proto\"\223\001\n\tParamInfo\022\017\n\007nameKey\030\001 \001(\014"
|
||||
"any.proto\"\311\001\n\tParamInfo\022\017\n\007nameKey\030\001 \001(\014"
|
||||
"\022\020\n\010strValue\030\002 \001(\014\022\037\n\tvalueType\030\003 \001(\0162\014."
|
||||
"stream.TYPE\022\017\n\007context\030\004 \001(\014\022\020\n\010isEnable"
|
||||
"\030\005 \001(\010\022\017\n\007isAlarm\030\006 \001(\010\022\016\n\006isShow\030\007 \001(\010\""
|
||||
"\254\001\n\013RequestInfo\022\020\n\010dataType\030\001 \001(\r\022\017\n\007nam"
|
||||
"eKey\030\002 \001(\014\022\020\n\010strValue\030\003 \001(\014\022\037\n\tvalueTyp"
|
||||
"e\030\004 \001(\0162\014.stream.TYPE\022&\n\nhandleType\030\005 \001("
|
||||
"\0162\022.stream.DATAHANDLE\022\037\n\004item\030\006 \003(\0132\021.st"
|
||||
"ream.ParamInfo\"Q\n\014ResponseInfo\022\020\n\010dataTy"
|
||||
"pe\030\001 \001(\r\022\016\n\006result\030\002 \001(\010\022\037\n\004item\030\003 \003(\0132\021"
|
||||
".stream.ParamInfo\"1\n\013ResponseAny\022\"\n\004data"
|
||||
"\030\001 \001(\0132\024.google.protobuf.Any\"\210\001\n\tLayerDa"
|
||||
"ta\022\023\n\013zCooldinate\030\001 \001(\002\022\016\n\006powder\030\002 \001(\002\022"
|
||||
"\026\n\016layerThickness\030\003 \001(\002\022.\n\016layerDataBloc"
|
||||
"k\030\004 \003(\0132\026.stream.LayerDataBlock\022\016\n\006resul"
|
||||
"t\030\005 \001(\010\"\266\001\n\016LayerDataBlock\022\021\n\telementId\030"
|
||||
"\001 \001(\005\022\026\n\016elementParamId\030\002 \001(\005\022\021\n\tblockTy"
|
||||
"pe\030\003 \001(\r\022*\n\tvecBlocks\030\004 \003(\0132\027.stream.Vec"
|
||||
"torDataBlock\022+\n\013chainBlocks\030\005 \003(\0132\026.stre"
|
||||
"am.ChainDataBlock\022\r\n\005order\030\006 \001(\r\"M\n\017Vect"
|
||||
"orDataBlock\022\016\n\006startX\030\001 \001(\002\022\016\n\006startY\030\002 "
|
||||
"\001(\002\022\014\n\004endX\030\003 \001(\002\022\014\n\004endY\030\004 \001(\002\"A\n\016Chain"
|
||||
"DataBlock\022\016\n\006dotNum\030\001 \001(\r\022\037\n\010pointVec\030\002 "
|
||||
"\003(\0132\r.stream.Point\"#\n\005Point\022\014\n\004xPos\030\001 \001("
|
||||
"\002\022\014\n\004yPos\030\002 \001(\002\"\033\n\013RegResponce\022\014\n\004data\030\001"
|
||||
" \001(\005\"D\n\017ImgInfoResponce\022\022\n\nlevelImage\030\001 "
|
||||
"\001(\r\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 \001(\005\"\033\n\013Co"
|
||||
"mResponce\022\014\n\004data\030\001 \001(\014*\223\001\n\004TYPE\022\t\n\005iBOO"
|
||||
"L\020\000\022\n\n\006iSHORT\020\001\022\013\n\007iUSHORT\020\002\022\010\n\004iINT\020\003\022\t"
|
||||
"\n\005iUINT\020\004\022\n\n\006iFLOAT\020\005\022\013\n\007iSTRING\020\006\022\t\n\005iC"
|
||||
"HAR\020\007\022\n\n\006iUCHAR\020\010\022\t\n\005iWORD\020\t\022\013\n\007iDOUBLE\020"
|
||||
"\n\022\n\n\006iTIMET\020\013**\n\nDATAHANDLE\022\n\n\006UPDATE\020\000\022"
|
||||
"\007\n\003ADD\020\001\022\007\n\003DEL\020\0022\372\001\n\006Stream\0224\n\006Simple\022\023"
|
||||
".stream.RequestInfo\032\023.stream.ResponseAny"
|
||||
"\"\000\022=\n\014ServerStream\022\023.stream.RequestInfo\032"
|
||||
"\024.stream.ResponseInfo\"\0000\001\022=\n\014ClientStrea"
|
||||
"m\022\023.stream.RequestInfo\032\024.stream.Response"
|
||||
"Info\"\000(\001\022<\n\tAllStream\022\023.stream.RequestIn"
|
||||
"fo\032\024.stream.ResponseInfo\"\000(\0010\001B-\n\027io.grp"
|
||||
"c.examples.streamB\013StreamProtoP\001\242\002\002STb\006p"
|
||||
"roto3"
|
||||
"\030\005 \001(\010\022\017\n\007isAlarm\030\006 \001(\010\022\016\n\006isShow\030\007 \001(\010\022"
|
||||
"\022\n\nstartLayer\030\010 \001(\005\022\020\n\010endLayer\030\t \001(\005\022\016\n"
|
||||
"\006powder\030\n \001(\002\"\254\001\n\013RequestInfo\022\020\n\010dataTyp"
|
||||
"e\030\001 \001(\r\022\017\n\007nameKey\030\002 \001(\014\022\020\n\010strValue\030\003 \001"
|
||||
"(\014\022\037\n\tvalueType\030\004 \001(\0162\014.stream.TYPE\022&\n\nh"
|
||||
"andleType\030\005 \001(\0162\022.stream.DATAHANDLE\022\037\n\004i"
|
||||
"tem\030\006 \003(\0132\021.stream.ParamInfo\"Q\n\014Response"
|
||||
"Info\022\020\n\010dataType\030\001 \001(\r\022\016\n\006result\030\002 \001(\010\022\037"
|
||||
"\n\004item\030\003 \003(\0132\021.stream.ParamInfo\"1\n\013Respo"
|
||||
"nseAny\022\"\n\004data\030\001 \001(\0132\024.google.protobuf.A"
|
||||
"ny\"\210\001\n\tLayerData\022\023\n\013zCooldinate\030\001 \001(\002\022\016\n"
|
||||
"\006powder\030\002 \001(\002\022\026\n\016layerThickness\030\003 \001(\002\022.\n"
|
||||
"\016layerDataBlock\030\004 \003(\0132\026.stream.LayerData"
|
||||
"Block\022\016\n\006result\030\005 \001(\010\"\266\001\n\016LayerDataBlock"
|
||||
"\022\021\n\telementId\030\001 \001(\005\022\026\n\016elementParamId\030\002 "
|
||||
"\001(\005\022\021\n\tblockType\030\003 \001(\r\022*\n\tvecBlocks\030\004 \003("
|
||||
"\0132\027.stream.VectorDataBlock\022+\n\013chainBlock"
|
||||
"s\030\005 \003(\0132\026.stream.ChainDataBlock\022\r\n\005order"
|
||||
"\030\006 \001(\r\"M\n\017VectorDataBlock\022\016\n\006startX\030\001 \001("
|
||||
"\002\022\016\n\006startY\030\002 \001(\002\022\014\n\004endX\030\003 \001(\002\022\014\n\004endY\030"
|
||||
"\004 \001(\002\"A\n\016ChainDataBlock\022\016\n\006dotNum\030\001 \001(\r\022"
|
||||
"\037\n\010pointVec\030\002 \003(\0132\r.stream.Point\"#\n\005Poin"
|
||||
"t\022\014\n\004xPos\030\001 \001(\002\022\014\n\004yPos\030\002 \001(\002\"\033\n\013RegResp"
|
||||
"once\022\014\n\004data\030\001 \001(\005\"D\n\017ImgInfoResponce\022\022\n"
|
||||
"\nlevelImage\030\001 \001(\r\022\r\n\005width\030\002 \001(\005\022\016\n\006heig"
|
||||
"ht\030\003 \001(\005\"\033\n\013ComResponce\022\014\n\004data\030\001 \001(\014*\223\001"
|
||||
"\n\004TYPE\022\t\n\005iBOOL\020\000\022\n\n\006iSHORT\020\001\022\013\n\007iUSHORT"
|
||||
"\020\002\022\010\n\004iINT\020\003\022\t\n\005iUINT\020\004\022\n\n\006iFLOAT\020\005\022\013\n\007i"
|
||||
"STRING\020\006\022\t\n\005iCHAR\020\007\022\n\n\006iUCHAR\020\010\022\t\n\005iWORD"
|
||||
"\020\t\022\013\n\007iDOUBLE\020\n\022\n\n\006iTIMET\020\013**\n\nDATAHANDL"
|
||||
"E\022\n\n\006UPDATE\020\000\022\007\n\003ADD\020\001\022\007\n\003DEL\020\0022\372\001\n\006Stre"
|
||||
"am\0224\n\006Simple\022\023.stream.RequestInfo\032\023.stre"
|
||||
"am.ResponseAny\"\000\022=\n\014ServerStream\022\023.strea"
|
||||
"m.RequestInfo\032\024.stream.ResponseInfo\"\0000\001\022"
|
||||
"=\n\014ClientStream\022\023.stream.RequestInfo\032\024.s"
|
||||
"tream.ResponseInfo\"\000(\001\022<\n\tAllStream\022\023.st"
|
||||
"ream.RequestInfo\032\024.stream.ResponseInfo\"\000"
|
||||
"(\0010\001B-\n\027io.grpc.examples.streamB\013StreamP"
|
||||
"rotoP\001\242\002\002STb\006proto3"
|
||||
};
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_stream_2eproto_deps[1] =
|
||||
{
|
||||
@ -490,7 +497,7 @@ static ::absl::once_flag descriptor_table_stream_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_stream_2eproto = {
|
||||
false,
|
||||
false,
|
||||
1645,
|
||||
1699,
|
||||
descriptor_table_protodef_stream_2eproto,
|
||||
"stream.proto",
|
||||
&descriptor_table_stream_2eproto_once,
|
||||
@ -582,6 +589,9 @@ ParamInfo::ParamInfo(const ParamInfo& from) : ::google::protobuf::Message() {
|
||||
decltype(_impl_.isenable_){},
|
||||
decltype(_impl_.isalarm_){},
|
||||
decltype(_impl_.isshow_){},
|
||||
decltype(_impl_.startlayer_){},
|
||||
decltype(_impl_.endlayer_){},
|
||||
decltype(_impl_.powder_){},
|
||||
/*decltype(_impl_._cached_size_)*/ {},
|
||||
};
|
||||
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
||||
@ -608,8 +618,8 @@ ParamInfo::ParamInfo(const ParamInfo& from) : ::google::protobuf::Message() {
|
||||
_this->_impl_.context_.Set(from._internal_context(), _this->GetArenaForAllocation());
|
||||
}
|
||||
::memcpy(&_impl_.valuetype_, &from._impl_.valuetype_,
|
||||
static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.isshow_) -
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.isshow_));
|
||||
static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.powder_) -
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.powder_));
|
||||
|
||||
// @@protoc_insertion_point(copy_constructor:stream.ParamInfo)
|
||||
}
|
||||
@ -623,6 +633,9 @@ inline void ParamInfo::SharedCtor(::_pb::Arena* arena) {
|
||||
decltype(_impl_.isenable_){false},
|
||||
decltype(_impl_.isalarm_){false},
|
||||
decltype(_impl_.isshow_){false},
|
||||
decltype(_impl_.startlayer_){0},
|
||||
decltype(_impl_.endlayer_){0},
|
||||
decltype(_impl_.powder_){0},
|
||||
/*decltype(_impl_._cached_size_)*/ {},
|
||||
};
|
||||
_impl_.namekey_.InitDefault();
|
||||
@ -663,8 +676,8 @@ PROTOBUF_NOINLINE void ParamInfo::Clear() {
|
||||
_impl_.strvalue_.ClearToEmpty();
|
||||
_impl_.context_.ClearToEmpty();
|
||||
::memset(&_impl_.valuetype_, 0, static_cast<::size_t>(
|
||||
reinterpret_cast<char*>(&_impl_.isshow_) -
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.isshow_));
|
||||
reinterpret_cast<char*>(&_impl_.powder_) -
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.powder_));
|
||||
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
@ -676,15 +689,15 @@ const char* ParamInfo::_InternalParse(
|
||||
|
||||
|
||||
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
||||
const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
const ::_pbi::TcParseTable<4, 10, 0, 0, 2> ParamInfo::_table_ = {
|
||||
{
|
||||
0, // no _has_bits_
|
||||
0, // no _extensions_
|
||||
7, 56, // max_field_number, fast_idx_mask
|
||||
10, 120, // max_field_number, fast_idx_mask
|
||||
offsetof(decltype(_table_), field_lookup_table),
|
||||
4294967168, // skipmap
|
||||
4294966272, // skipmap
|
||||
offsetof(decltype(_table_), field_entries),
|
||||
7, // num_field_entries
|
||||
10, // num_field_entries
|
||||
0, // num_aux_entries
|
||||
offsetof(decltype(_table_), field_names), // no aux_entries
|
||||
&_ParamInfo_default_instance_._instance,
|
||||
@ -712,6 +725,20 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
// bool isShow = 7;
|
||||
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(ParamInfo, _impl_.isshow_), 63>(),
|
||||
{56, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_)}},
|
||||
// int32 startLayer = 8;
|
||||
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ParamInfo, _impl_.startlayer_), 63>(),
|
||||
{64, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.startlayer_)}},
|
||||
// int32 endLayer = 9;
|
||||
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ParamInfo, _impl_.endlayer_), 63>(),
|
||||
{72, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.endlayer_)}},
|
||||
// float powder = 10;
|
||||
{::_pbi::TcParser::FastF32S1,
|
||||
{85, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.powder_)}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
}}, {{
|
||||
65535, 65535
|
||||
}}, {{
|
||||
@ -736,6 +763,15 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
// bool isShow = 7;
|
||||
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_), 0, 0,
|
||||
(0 | ::_fl::kFcSingular | ::_fl::kBool)},
|
||||
// int32 startLayer = 8;
|
||||
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.startlayer_), 0, 0,
|
||||
(0 | ::_fl::kFcSingular | ::_fl::kInt32)},
|
||||
// int32 endLayer = 9;
|
||||
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.endlayer_), 0, 0,
|
||||
(0 | ::_fl::kFcSingular | ::_fl::kInt32)},
|
||||
// float powder = 10;
|
||||
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.powder_), 0, 0,
|
||||
(0 | ::_fl::kFcSingular | ::_fl::kFloat)},
|
||||
}},
|
||||
// no aux_entries
|
||||
{{
|
||||
@ -795,6 +831,32 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
7, this->_internal_isshow(), target);
|
||||
}
|
||||
|
||||
// int32 startLayer = 8;
|
||||
if (this->_internal_startlayer() != 0) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::
|
||||
WriteInt32ToArrayWithField<8>(
|
||||
stream, this->_internal_startlayer(), target);
|
||||
}
|
||||
|
||||
// int32 endLayer = 9;
|
||||
if (this->_internal_endlayer() != 0) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::
|
||||
WriteInt32ToArrayWithField<9>(
|
||||
stream, this->_internal_endlayer(), target);
|
||||
}
|
||||
|
||||
// float powder = 10;
|
||||
static_assert(sizeof(::uint32_t) == sizeof(float),
|
||||
"Code assumes ::uint32_t and float are the same size.");
|
||||
float tmp_powder = this->_internal_powder();
|
||||
::uint32_t raw_powder;
|
||||
memcpy(&raw_powder, &tmp_powder, sizeof(tmp_powder));
|
||||
if (raw_powder != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteFloatToArray(
|
||||
10, this->_internal_powder(), target);
|
||||
}
|
||||
|
||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||
target =
|
||||
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||
@ -851,6 +913,28 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
total_size += 2;
|
||||
}
|
||||
|
||||
// int32 startLayer = 8;
|
||||
if (this->_internal_startlayer() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
|
||||
this->_internal_startlayer());
|
||||
}
|
||||
|
||||
// int32 endLayer = 9;
|
||||
if (this->_internal_endlayer() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
|
||||
this->_internal_endlayer());
|
||||
}
|
||||
|
||||
// float powder = 10;
|
||||
static_assert(sizeof(::uint32_t) == sizeof(float),
|
||||
"Code assumes ::uint32_t and float are the same size.");
|
||||
float tmp_powder = this->_internal_powder();
|
||||
::uint32_t raw_powder;
|
||||
memcpy(&raw_powder, &tmp_powder, sizeof(tmp_powder));
|
||||
if (raw_powder != 0) {
|
||||
total_size += 5;
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
@ -890,6 +974,20 @@ void ParamInfo::MergeImpl(::google::protobuf::Message& to_msg, const ::google::p
|
||||
if (from._internal_isshow() != 0) {
|
||||
_this->_internal_set_isshow(from._internal_isshow());
|
||||
}
|
||||
if (from._internal_startlayer() != 0) {
|
||||
_this->_internal_set_startlayer(from._internal_startlayer());
|
||||
}
|
||||
if (from._internal_endlayer() != 0) {
|
||||
_this->_internal_set_endlayer(from._internal_endlayer());
|
||||
}
|
||||
static_assert(sizeof(::uint32_t) == sizeof(float),
|
||||
"Code assumes ::uint32_t and float are the same size.");
|
||||
float tmp_powder = from._internal_powder();
|
||||
::uint32_t raw_powder;
|
||||
memcpy(&raw_powder, &tmp_powder, sizeof(tmp_powder));
|
||||
if (raw_powder != 0) {
|
||||
_this->_internal_set_powder(from._internal_powder());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
@ -916,8 +1014,8 @@ void ParamInfo::InternalSwap(ParamInfo* other) {
|
||||
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.context_, lhs_arena,
|
||||
&other->_impl_.context_, rhs_arena);
|
||||
::google::protobuf::internal::memswap<
|
||||
PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_)
|
||||
+ sizeof(ParamInfo::_impl_.isshow_)
|
||||
PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.powder_)
|
||||
+ sizeof(ParamInfo::_impl_.powder_)
|
||||
- PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.valuetype_)>(
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_),
|
||||
reinterpret_cast<char*>(&other->_impl_.valuetype_));
|
||||
|
@ -315,6 +315,9 @@ class ParamInfo final :
|
||||
kIsEnableFieldNumber = 5,
|
||||
kIsAlarmFieldNumber = 6,
|
||||
kIsShowFieldNumber = 7,
|
||||
kStartLayerFieldNumber = 8,
|
||||
kEndLayerFieldNumber = 9,
|
||||
kPowderFieldNumber = 10,
|
||||
};
|
||||
// bytes nameKey = 1;
|
||||
void clear_namekey() ;
|
||||
@ -403,13 +406,43 @@ class ParamInfo final :
|
||||
bool _internal_isshow() const;
|
||||
void _internal_set_isshow(bool value);
|
||||
|
||||
public:
|
||||
// int32 startLayer = 8;
|
||||
void clear_startlayer() ;
|
||||
::int32_t startlayer() const;
|
||||
void set_startlayer(::int32_t value);
|
||||
|
||||
private:
|
||||
::int32_t _internal_startlayer() const;
|
||||
void _internal_set_startlayer(::int32_t value);
|
||||
|
||||
public:
|
||||
// int32 endLayer = 9;
|
||||
void clear_endlayer() ;
|
||||
::int32_t endlayer() const;
|
||||
void set_endlayer(::int32_t value);
|
||||
|
||||
private:
|
||||
::int32_t _internal_endlayer() const;
|
||||
void _internal_set_endlayer(::int32_t value);
|
||||
|
||||
public:
|
||||
// float powder = 10;
|
||||
void clear_powder() ;
|
||||
float powder() const;
|
||||
void set_powder(float value);
|
||||
|
||||
private:
|
||||
float _internal_powder() const;
|
||||
void _internal_set_powder(float value);
|
||||
|
||||
public:
|
||||
// @@protoc_insertion_point(class_scope:stream.ParamInfo)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
friend class ::google::protobuf::internal::TcParser;
|
||||
static const ::google::protobuf::internal::TcParseTable<3, 7, 0, 0, 2> _table_;
|
||||
static const ::google::protobuf::internal::TcParseTable<4, 10, 0, 0, 2> _table_;
|
||||
template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
@ -421,6 +454,9 @@ class ParamInfo final :
|
||||
bool isenable_;
|
||||
bool isalarm_;
|
||||
bool isshow_;
|
||||
::int32_t startlayer_;
|
||||
::int32_t endlayer_;
|
||||
float powder_;
|
||||
mutable ::google::protobuf::internal::CachedSize _cached_size_;
|
||||
PROTOBUF_TSAN_DECLARE_MEMBER
|
||||
};
|
||||
@ -2771,6 +2807,72 @@ inline void ParamInfo::_internal_set_isshow(bool value) {
|
||||
_impl_.isshow_ = value;
|
||||
}
|
||||
|
||||
// int32 startLayer = 8;
|
||||
inline void ParamInfo::clear_startlayer() {
|
||||
_impl_.startlayer_ = 0;
|
||||
}
|
||||
inline ::int32_t ParamInfo::startlayer() const {
|
||||
// @@protoc_insertion_point(field_get:stream.ParamInfo.startLayer)
|
||||
return _internal_startlayer();
|
||||
}
|
||||
inline void ParamInfo::set_startlayer(::int32_t value) {
|
||||
_internal_set_startlayer(value);
|
||||
// @@protoc_insertion_point(field_set:stream.ParamInfo.startLayer)
|
||||
}
|
||||
inline ::int32_t ParamInfo::_internal_startlayer() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.startlayer_;
|
||||
}
|
||||
inline void ParamInfo::_internal_set_startlayer(::int32_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
;
|
||||
_impl_.startlayer_ = value;
|
||||
}
|
||||
|
||||
// int32 endLayer = 9;
|
||||
inline void ParamInfo::clear_endlayer() {
|
||||
_impl_.endlayer_ = 0;
|
||||
}
|
||||
inline ::int32_t ParamInfo::endlayer() const {
|
||||
// @@protoc_insertion_point(field_get:stream.ParamInfo.endLayer)
|
||||
return _internal_endlayer();
|
||||
}
|
||||
inline void ParamInfo::set_endlayer(::int32_t value) {
|
||||
_internal_set_endlayer(value);
|
||||
// @@protoc_insertion_point(field_set:stream.ParamInfo.endLayer)
|
||||
}
|
||||
inline ::int32_t ParamInfo::_internal_endlayer() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.endlayer_;
|
||||
}
|
||||
inline void ParamInfo::_internal_set_endlayer(::int32_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
;
|
||||
_impl_.endlayer_ = value;
|
||||
}
|
||||
|
||||
// float powder = 10;
|
||||
inline void ParamInfo::clear_powder() {
|
||||
_impl_.powder_ = 0;
|
||||
}
|
||||
inline float ParamInfo::powder() const {
|
||||
// @@protoc_insertion_point(field_get:stream.ParamInfo.powder)
|
||||
return _internal_powder();
|
||||
}
|
||||
inline void ParamInfo::set_powder(float value) {
|
||||
_internal_set_powder(value);
|
||||
// @@protoc_insertion_point(field_set:stream.ParamInfo.powder)
|
||||
}
|
||||
inline float ParamInfo::_internal_powder() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.powder_;
|
||||
}
|
||||
inline void ParamInfo::_internal_set_powder(float value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
;
|
||||
_impl_.powder_ = value;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// RequestInfo
|
||||
|
@ -44,6 +44,10 @@ message ParamInfo{
|
||||
bool isEnable = 5;
|
||||
bool isAlarm = 6;
|
||||
bool isShow = 7;
|
||||
|
||||
int32 startLayer = 8; //层供粉量配置使用 struct PowderSet
|
||||
int32 endLayer = 9;
|
||||
float powder = 10;
|
||||
}
|
||||
|
||||
message RequestInfo { //读
|
||||
|
@ -83,9 +83,12 @@ void DataHandle::PrintValue(const ReadData& msg){
|
||||
it->nameKey;
|
||||
string valueType = m_dataTypeMp[(*it).valueType];
|
||||
if (msg.dataType >= STOPALARMCFGPARAM && msg.dataType <= WARNALARMCFGPARAM) {
|
||||
printf("接收:dataType:%d,nameKey:%*s, strvalue:%*s, valueType:%s,content:%s,isEnable:%d,isAlarm:%d,isShow:%d\n",
|
||||
msg.dataType, 33, it->nameKey.data(), 13, it->strValue.data(), valueType.data(),
|
||||
it->content.c_str(), it->isEnable, it->isAlarm, it->isShow);
|
||||
printf("接收:dataType:%d,nameKey:%*s, content:%s,isEnable:%d,isAlarm:%d,isShow:%d\n",
|
||||
msg.dataType, 33, it->nameKey.data(), it->content.c_str(), it->isEnable, it->isAlarm, it->isShow);
|
||||
}
|
||||
else if (msg.dataType == POWDERSETPARAM) {
|
||||
printf("接收:dataType:%d,startLayer:%d,endLayer:%d,powder:%.2f\n",
|
||||
msg.dataType,it->start_layer, it->end_layer, it->powder);
|
||||
}
|
||||
else {
|
||||
printf("接收:dataType:%d,nameKey:%*s, strvalue:%*s, valueType:%s\n",
|
||||
@ -181,18 +184,19 @@ void DataHandle::ParamReadUsage() {
|
||||
printf(" 36: " COLOR_YELLOW "print stopalarm cfg param data...\n" COLOR_RESET);
|
||||
printf(" 37: " COLOR_YELLOW "print pausealarm cfg param data...\n" COLOR_RESET);
|
||||
printf(" 38: " COLOR_YELLOW "print warnalarm cfg param data...\n" COLOR_RESET);
|
||||
printf(" 39: " COLOR_YELLOW "print powder cfg param data...\n" COLOR_RESET);
|
||||
|
||||
printf(" 39: " COLOR_YELLOW "print moldcfg param data...\n" COLOR_RESET);
|
||||
printf(" 40: " COLOR_YELLOW "print loadcfg param data...\n" COLOR_RESET);
|
||||
printf(" 41: " COLOR_YELLOW "print armcfgparam data...\n" COLOR_RESET);
|
||||
printf(" 42: " COLOR_YELLOW "print supplycfgparam data...\n" COLOR_RESET);
|
||||
printf(" 43: " COLOR_YELLOW "print cleancfgparam data...\n" COLOR_RESET);
|
||||
printf(" 44: " COLOR_YELLOW "print elecfgparam data...\n" COLOR_RESET);
|
||||
printf(" 45: " COLOR_YELLOW "print loadparamrsp data...\n" COLOR_RESET);
|
||||
printf(" 46: " COLOR_YELLOW "print scan ctrl state data...\n" COLOR_RESET);
|
||||
printf(" 47: " COLOR_YELLOW "print scan ctrl Param data...\n" COLOR_RESET);
|
||||
printf(" 48: " COLOR_YELLOW "print xy scan state data...\n" COLOR_RESET);
|
||||
printf(" 49: " COLOR_YELLOW "print camera param data...\n" COLOR_RESET);
|
||||
printf(" 40: " COLOR_YELLOW "print moldcfg param data...\n" COLOR_RESET);
|
||||
printf(" 41: " COLOR_YELLOW "print loadcfg param data...\n" COLOR_RESET);
|
||||
printf(" 42: " COLOR_YELLOW "print armcfgparam data...\n" COLOR_RESET);
|
||||
printf(" 43: " COLOR_YELLOW "print supplycfgparam data...\n" COLOR_RESET);
|
||||
printf(" 44: " COLOR_YELLOW "print cleancfgparam data...\n" COLOR_RESET);
|
||||
printf(" 45: " COLOR_YELLOW "print elecfgparam data...\n" COLOR_RESET);
|
||||
printf(" 46: " COLOR_YELLOW "print loadparamrsp data...\n" COLOR_RESET);
|
||||
printf(" 47: " COLOR_YELLOW "print scan ctrl state data...\n" COLOR_RESET);
|
||||
printf(" 48: " COLOR_YELLOW "print scan ctrl Param data...\n" COLOR_RESET);
|
||||
printf(" 49: " COLOR_YELLOW "print xy scan state data...\n" COLOR_RESET);
|
||||
printf(" 50: " COLOR_YELLOW "print camera param data...\n" COLOR_RESET);
|
||||
}
|
||||
|
||||
int DataHandle::Request(int index) {
|
||||
@ -287,7 +291,7 @@ void DataHandle::ParamRequest(int index) {
|
||||
|
||||
//选择一个参数更新到服务
|
||||
void DataHandle::UpdateParam(const string& input) {
|
||||
|
||||
WriteData writeData;
|
||||
int index = ConverType::TryToI(input.substr(5));
|
||||
switch (index) {
|
||||
case PARAMLIMITCFGPARAM:
|
||||
@ -329,6 +333,11 @@ void DataHandle::UpdateParam(const string& input) {
|
||||
case WARNALARMCFGPARAM: //AlarmCfgWrapper warn参数
|
||||
PushMsg(ALARMCFG, "SupplyPipeBlockWarn", to_string(0), iINT);
|
||||
break;
|
||||
case POWDERSETPARAM: //PowderSet参数
|
||||
writeData = WriteData{ POWDERSET, "", "", UNKNOW,TOTAL };
|
||||
writeData.items.emplace_back(Item{"","",UNKNOW,"",0,0,0,1,100,2});
|
||||
PushMsg(writeData);
|
||||
break;
|
||||
case ELECFGPARAM:
|
||||
break;
|
||||
case LOADPARAMRSP:
|
||||
|
@ -50,6 +50,7 @@ enum READTYPE {
|
||||
STOPALARMCFGPARAM, //AlarmCfgWrapper stop参数
|
||||
PAUSEALARMCFGPARAM, //AlarmCfgWrapper pause参数
|
||||
WARNALARMCFGPARAM, //AlarmCfgWrapper warn参数
|
||||
POWDERSETPARAM, //PowderSet 参数
|
||||
|
||||
MOLDCFGPARAM,
|
||||
LOADCFGPARAM,
|
||||
@ -97,6 +98,11 @@ struct Item {
|
||||
bool isEnable;
|
||||
bool isAlarm;
|
||||
bool isShow;
|
||||
|
||||
//层供粉量配置使用 struct PowderSet
|
||||
int start_layer;
|
||||
int end_layer;
|
||||
float powder;
|
||||
};
|
||||
|
||||
struct ReadData {
|
||||
@ -138,6 +144,7 @@ enum WRITETYPE {
|
||||
POWDERESTIMATECFG,
|
||||
COMMUNICATIONCFG,
|
||||
ALARMCFG,
|
||||
POWDERSET,
|
||||
|
||||
LOADPARAM, //装载参数
|
||||
SCANCTRLFUNC, //振镜控制函数
|
||||
@ -149,6 +156,7 @@ enum DATAHANDLE {
|
||||
UPDATE = 0,
|
||||
ADD = 1,
|
||||
DEL = 2,
|
||||
TOTAL, //发全量信息
|
||||
};
|
||||
|
||||
struct WriteData {
|
||||
|
@ -74,7 +74,8 @@ void StreamClient::AllStream() {
|
||||
|
||||
for (const ::stream::ParamInfo& it : readInfo.item()) {
|
||||
readData.its.emplace_back(Item{ it.namekey(),it.strvalue(),(DATATYPE)it.valuetype()
|
||||
,it.context(),it.isenable(),it.isalarm(),it.isshow()});
|
||||
,it.context(),it.isenable(),it.isalarm(),it.isshow()
|
||||
,it.startlayer(),it.endlayer(),it.powder() });
|
||||
//printf("接收到服务端消息:dataType:%d,nameKey:%s, strvalue:%s,valueType:%d\n",
|
||||
// readData.dataType, it.namekey().data(), it.strvalue().c_str(), it.valuetype());
|
||||
}
|
||||
@ -102,6 +103,10 @@ void StreamClient::AllStream() {
|
||||
paramInfo->set_namekey((*wd).nameKey);
|
||||
paramInfo->set_strvalue((*wd).strValue);
|
||||
paramInfo->set_valuetype((stream::TYPE)(*wd).valueType);
|
||||
|
||||
paramInfo->set_startlayer((*wd).start_layer);
|
||||
paramInfo->set_endlayer((*wd).end_layer);
|
||||
paramInfo->set_powder((*wd).powder);
|
||||
}
|
||||
|
||||
stream->Write(request);
|
||||
|
@ -40,6 +40,9 @@ PROTOBUF_CONSTEXPR ParamInfo::ParamInfo(::_pbi::ConstantInitialized)
|
||||
/*decltype(_impl_.isenable_)*/ false,
|
||||
/*decltype(_impl_.isalarm_)*/ false,
|
||||
/*decltype(_impl_.isshow_)*/ false,
|
||||
/*decltype(_impl_.startlayer_)*/ 0,
|
||||
/*decltype(_impl_.endlayer_)*/ 0,
|
||||
/*decltype(_impl_.powder_)*/ 0,
|
||||
/*decltype(_impl_._cached_size_)*/ {},
|
||||
} {}
|
||||
struct ParamInfoDefaultTypeInternal {
|
||||
@ -283,6 +286,9 @@ const ::uint32_t TableStruct_stream_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isenable_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isalarm_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isshow_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.startlayer_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.endlayer_),
|
||||
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.powder_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::stream::RequestInfo, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
@ -411,17 +417,17 @@ const ::uint32_t TableStruct_stream_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE
|
||||
static const ::_pbi::MigrationSchema
|
||||
schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{0, -1, -1, sizeof(::stream::ParamInfo)},
|
||||
{15, -1, -1, sizeof(::stream::RequestInfo)},
|
||||
{29, -1, -1, sizeof(::stream::ResponseInfo)},
|
||||
{40, 49, -1, sizeof(::stream::ResponseAny)},
|
||||
{50, -1, -1, sizeof(::stream::LayerData)},
|
||||
{63, -1, -1, sizeof(::stream::LayerDataBlock)},
|
||||
{77, -1, -1, sizeof(::stream::VectorDataBlock)},
|
||||
{89, -1, -1, sizeof(::stream::ChainDataBlock)},
|
||||
{99, -1, -1, sizeof(::stream::Point)},
|
||||
{109, -1, -1, sizeof(::stream::RegResponce)},
|
||||
{118, -1, -1, sizeof(::stream::ImgInfoResponce)},
|
||||
{129, -1, -1, sizeof(::stream::ComResponce)},
|
||||
{18, -1, -1, sizeof(::stream::RequestInfo)},
|
||||
{32, -1, -1, sizeof(::stream::ResponseInfo)},
|
||||
{43, 52, -1, sizeof(::stream::ResponseAny)},
|
||||
{53, -1, -1, sizeof(::stream::LayerData)},
|
||||
{66, -1, -1, sizeof(::stream::LayerDataBlock)},
|
||||
{80, -1, -1, sizeof(::stream::VectorDataBlock)},
|
||||
{92, -1, -1, sizeof(::stream::ChainDataBlock)},
|
||||
{102, -1, -1, sizeof(::stream::Point)},
|
||||
{112, -1, -1, sizeof(::stream::RegResponce)},
|
||||
{121, -1, -1, sizeof(::stream::ImgInfoResponce)},
|
||||
{132, -1, -1, sizeof(::stream::ComResponce)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@ -440,47 +446,48 @@ static const ::_pb::Message* const file_default_instances[] = {
|
||||
};
|
||||
const char descriptor_table_protodef_stream_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
"\n\014stream.proto\022\006stream\032\031google/protobuf/"
|
||||
"any.proto\"\223\001\n\tParamInfo\022\017\n\007nameKey\030\001 \001(\014"
|
||||
"any.proto\"\311\001\n\tParamInfo\022\017\n\007nameKey\030\001 \001(\014"
|
||||
"\022\020\n\010strValue\030\002 \001(\014\022\037\n\tvalueType\030\003 \001(\0162\014."
|
||||
"stream.TYPE\022\017\n\007context\030\004 \001(\014\022\020\n\010isEnable"
|
||||
"\030\005 \001(\010\022\017\n\007isAlarm\030\006 \001(\010\022\016\n\006isShow\030\007 \001(\010\""
|
||||
"\254\001\n\013RequestInfo\022\020\n\010dataType\030\001 \001(\r\022\017\n\007nam"
|
||||
"eKey\030\002 \001(\014\022\020\n\010strValue\030\003 \001(\014\022\037\n\tvalueTyp"
|
||||
"e\030\004 \001(\0162\014.stream.TYPE\022&\n\nhandleType\030\005 \001("
|
||||
"\0162\022.stream.DATAHANDLE\022\037\n\004item\030\006 \003(\0132\021.st"
|
||||
"ream.ParamInfo\"Q\n\014ResponseInfo\022\020\n\010dataTy"
|
||||
"pe\030\001 \001(\r\022\016\n\006result\030\002 \001(\010\022\037\n\004item\030\003 \003(\0132\021"
|
||||
".stream.ParamInfo\"1\n\013ResponseAny\022\"\n\004data"
|
||||
"\030\001 \001(\0132\024.google.protobuf.Any\"\210\001\n\tLayerDa"
|
||||
"ta\022\023\n\013zCooldinate\030\001 \001(\002\022\016\n\006powder\030\002 \001(\002\022"
|
||||
"\026\n\016layerThickness\030\003 \001(\002\022.\n\016layerDataBloc"
|
||||
"k\030\004 \003(\0132\026.stream.LayerDataBlock\022\016\n\006resul"
|
||||
"t\030\005 \001(\010\"\266\001\n\016LayerDataBlock\022\021\n\telementId\030"
|
||||
"\001 \001(\005\022\026\n\016elementParamId\030\002 \001(\005\022\021\n\tblockTy"
|
||||
"pe\030\003 \001(\r\022*\n\tvecBlocks\030\004 \003(\0132\027.stream.Vec"
|
||||
"torDataBlock\022+\n\013chainBlocks\030\005 \003(\0132\026.stre"
|
||||
"am.ChainDataBlock\022\r\n\005order\030\006 \001(\r\"M\n\017Vect"
|
||||
"orDataBlock\022\016\n\006startX\030\001 \001(\002\022\016\n\006startY\030\002 "
|
||||
"\001(\002\022\014\n\004endX\030\003 \001(\002\022\014\n\004endY\030\004 \001(\002\"A\n\016Chain"
|
||||
"DataBlock\022\016\n\006dotNum\030\001 \001(\r\022\037\n\010pointVec\030\002 "
|
||||
"\003(\0132\r.stream.Point\"#\n\005Point\022\014\n\004xPos\030\001 \001("
|
||||
"\002\022\014\n\004yPos\030\002 \001(\002\"\033\n\013RegResponce\022\014\n\004data\030\001"
|
||||
" \001(\005\"D\n\017ImgInfoResponce\022\022\n\nlevelImage\030\001 "
|
||||
"\001(\r\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 \001(\005\"\033\n\013Co"
|
||||
"mResponce\022\014\n\004data\030\001 \001(\014*\223\001\n\004TYPE\022\t\n\005iBOO"
|
||||
"L\020\000\022\n\n\006iSHORT\020\001\022\013\n\007iUSHORT\020\002\022\010\n\004iINT\020\003\022\t"
|
||||
"\n\005iUINT\020\004\022\n\n\006iFLOAT\020\005\022\013\n\007iSTRING\020\006\022\t\n\005iC"
|
||||
"HAR\020\007\022\n\n\006iUCHAR\020\010\022\t\n\005iWORD\020\t\022\013\n\007iDOUBLE\020"
|
||||
"\n\022\n\n\006iTIMET\020\013**\n\nDATAHANDLE\022\n\n\006UPDATE\020\000\022"
|
||||
"\007\n\003ADD\020\001\022\007\n\003DEL\020\0022\372\001\n\006Stream\0224\n\006Simple\022\023"
|
||||
".stream.RequestInfo\032\023.stream.ResponseAny"
|
||||
"\"\000\022=\n\014ServerStream\022\023.stream.RequestInfo\032"
|
||||
"\024.stream.ResponseInfo\"\0000\001\022=\n\014ClientStrea"
|
||||
"m\022\023.stream.RequestInfo\032\024.stream.Response"
|
||||
"Info\"\000(\001\022<\n\tAllStream\022\023.stream.RequestIn"
|
||||
"fo\032\024.stream.ResponseInfo\"\000(\0010\001B-\n\027io.grp"
|
||||
"c.examples.streamB\013StreamProtoP\001\242\002\002STb\006p"
|
||||
"roto3"
|
||||
"\030\005 \001(\010\022\017\n\007isAlarm\030\006 \001(\010\022\016\n\006isShow\030\007 \001(\010\022"
|
||||
"\022\n\nstartLayer\030\010 \001(\005\022\020\n\010endLayer\030\t \001(\005\022\016\n"
|
||||
"\006powder\030\n \001(\002\"\254\001\n\013RequestInfo\022\020\n\010dataTyp"
|
||||
"e\030\001 \001(\r\022\017\n\007nameKey\030\002 \001(\014\022\020\n\010strValue\030\003 \001"
|
||||
"(\014\022\037\n\tvalueType\030\004 \001(\0162\014.stream.TYPE\022&\n\nh"
|
||||
"andleType\030\005 \001(\0162\022.stream.DATAHANDLE\022\037\n\004i"
|
||||
"tem\030\006 \003(\0132\021.stream.ParamInfo\"Q\n\014Response"
|
||||
"Info\022\020\n\010dataType\030\001 \001(\r\022\016\n\006result\030\002 \001(\010\022\037"
|
||||
"\n\004item\030\003 \003(\0132\021.stream.ParamInfo\"1\n\013Respo"
|
||||
"nseAny\022\"\n\004data\030\001 \001(\0132\024.google.protobuf.A"
|
||||
"ny\"\210\001\n\tLayerData\022\023\n\013zCooldinate\030\001 \001(\002\022\016\n"
|
||||
"\006powder\030\002 \001(\002\022\026\n\016layerThickness\030\003 \001(\002\022.\n"
|
||||
"\016layerDataBlock\030\004 \003(\0132\026.stream.LayerData"
|
||||
"Block\022\016\n\006result\030\005 \001(\010\"\266\001\n\016LayerDataBlock"
|
||||
"\022\021\n\telementId\030\001 \001(\005\022\026\n\016elementParamId\030\002 "
|
||||
"\001(\005\022\021\n\tblockType\030\003 \001(\r\022*\n\tvecBlocks\030\004 \003("
|
||||
"\0132\027.stream.VectorDataBlock\022+\n\013chainBlock"
|
||||
"s\030\005 \003(\0132\026.stream.ChainDataBlock\022\r\n\005order"
|
||||
"\030\006 \001(\r\"M\n\017VectorDataBlock\022\016\n\006startX\030\001 \001("
|
||||
"\002\022\016\n\006startY\030\002 \001(\002\022\014\n\004endX\030\003 \001(\002\022\014\n\004endY\030"
|
||||
"\004 \001(\002\"A\n\016ChainDataBlock\022\016\n\006dotNum\030\001 \001(\r\022"
|
||||
"\037\n\010pointVec\030\002 \003(\0132\r.stream.Point\"#\n\005Poin"
|
||||
"t\022\014\n\004xPos\030\001 \001(\002\022\014\n\004yPos\030\002 \001(\002\"\033\n\013RegResp"
|
||||
"once\022\014\n\004data\030\001 \001(\005\"D\n\017ImgInfoResponce\022\022\n"
|
||||
"\nlevelImage\030\001 \001(\r\022\r\n\005width\030\002 \001(\005\022\016\n\006heig"
|
||||
"ht\030\003 \001(\005\"\033\n\013ComResponce\022\014\n\004data\030\001 \001(\014*\223\001"
|
||||
"\n\004TYPE\022\t\n\005iBOOL\020\000\022\n\n\006iSHORT\020\001\022\013\n\007iUSHORT"
|
||||
"\020\002\022\010\n\004iINT\020\003\022\t\n\005iUINT\020\004\022\n\n\006iFLOAT\020\005\022\013\n\007i"
|
||||
"STRING\020\006\022\t\n\005iCHAR\020\007\022\n\n\006iUCHAR\020\010\022\t\n\005iWORD"
|
||||
"\020\t\022\013\n\007iDOUBLE\020\n\022\n\n\006iTIMET\020\013**\n\nDATAHANDL"
|
||||
"E\022\n\n\006UPDATE\020\000\022\007\n\003ADD\020\001\022\007\n\003DEL\020\0022\372\001\n\006Stre"
|
||||
"am\0224\n\006Simple\022\023.stream.RequestInfo\032\023.stre"
|
||||
"am.ResponseAny\"\000\022=\n\014ServerStream\022\023.strea"
|
||||
"m.RequestInfo\032\024.stream.ResponseInfo\"\0000\001\022"
|
||||
"=\n\014ClientStream\022\023.stream.RequestInfo\032\024.s"
|
||||
"tream.ResponseInfo\"\000(\001\022<\n\tAllStream\022\023.st"
|
||||
"ream.RequestInfo\032\024.stream.ResponseInfo\"\000"
|
||||
"(\0010\001B-\n\027io.grpc.examples.streamB\013StreamP"
|
||||
"rotoP\001\242\002\002STb\006proto3"
|
||||
};
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_stream_2eproto_deps[1] =
|
||||
{
|
||||
@ -490,7 +497,7 @@ static ::absl::once_flag descriptor_table_stream_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_stream_2eproto = {
|
||||
false,
|
||||
false,
|
||||
1645,
|
||||
1699,
|
||||
descriptor_table_protodef_stream_2eproto,
|
||||
"stream.proto",
|
||||
&descriptor_table_stream_2eproto_once,
|
||||
@ -582,6 +589,9 @@ ParamInfo::ParamInfo(const ParamInfo& from) : ::google::protobuf::Message() {
|
||||
decltype(_impl_.isenable_){},
|
||||
decltype(_impl_.isalarm_){},
|
||||
decltype(_impl_.isshow_){},
|
||||
decltype(_impl_.startlayer_){},
|
||||
decltype(_impl_.endlayer_){},
|
||||
decltype(_impl_.powder_){},
|
||||
/*decltype(_impl_._cached_size_)*/ {},
|
||||
};
|
||||
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
||||
@ -608,8 +618,8 @@ ParamInfo::ParamInfo(const ParamInfo& from) : ::google::protobuf::Message() {
|
||||
_this->_impl_.context_.Set(from._internal_context(), _this->GetArenaForAllocation());
|
||||
}
|
||||
::memcpy(&_impl_.valuetype_, &from._impl_.valuetype_,
|
||||
static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.isshow_) -
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.isshow_));
|
||||
static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.powder_) -
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.powder_));
|
||||
|
||||
// @@protoc_insertion_point(copy_constructor:stream.ParamInfo)
|
||||
}
|
||||
@ -623,6 +633,9 @@ inline void ParamInfo::SharedCtor(::_pb::Arena* arena) {
|
||||
decltype(_impl_.isenable_){false},
|
||||
decltype(_impl_.isalarm_){false},
|
||||
decltype(_impl_.isshow_){false},
|
||||
decltype(_impl_.startlayer_){0},
|
||||
decltype(_impl_.endlayer_){0},
|
||||
decltype(_impl_.powder_){0},
|
||||
/*decltype(_impl_._cached_size_)*/ {},
|
||||
};
|
||||
_impl_.namekey_.InitDefault();
|
||||
@ -663,8 +676,8 @@ PROTOBUF_NOINLINE void ParamInfo::Clear() {
|
||||
_impl_.strvalue_.ClearToEmpty();
|
||||
_impl_.context_.ClearToEmpty();
|
||||
::memset(&_impl_.valuetype_, 0, static_cast<::size_t>(
|
||||
reinterpret_cast<char*>(&_impl_.isshow_) -
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.isshow_));
|
||||
reinterpret_cast<char*>(&_impl_.powder_) -
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.powder_));
|
||||
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
@ -676,15 +689,15 @@ const char* ParamInfo::_InternalParse(
|
||||
|
||||
|
||||
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
||||
const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
const ::_pbi::TcParseTable<4, 10, 0, 0, 2> ParamInfo::_table_ = {
|
||||
{
|
||||
0, // no _has_bits_
|
||||
0, // no _extensions_
|
||||
7, 56, // max_field_number, fast_idx_mask
|
||||
10, 120, // max_field_number, fast_idx_mask
|
||||
offsetof(decltype(_table_), field_lookup_table),
|
||||
4294967168, // skipmap
|
||||
4294966272, // skipmap
|
||||
offsetof(decltype(_table_), field_entries),
|
||||
7, // num_field_entries
|
||||
10, // num_field_entries
|
||||
0, // num_aux_entries
|
||||
offsetof(decltype(_table_), field_names), // no aux_entries
|
||||
&_ParamInfo_default_instance_._instance,
|
||||
@ -712,6 +725,20 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
// bool isShow = 7;
|
||||
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(ParamInfo, _impl_.isshow_), 63>(),
|
||||
{56, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_)}},
|
||||
// int32 startLayer = 8;
|
||||
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ParamInfo, _impl_.startlayer_), 63>(),
|
||||
{64, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.startlayer_)}},
|
||||
// int32 endLayer = 9;
|
||||
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ParamInfo, _impl_.endlayer_), 63>(),
|
||||
{72, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.endlayer_)}},
|
||||
// float powder = 10;
|
||||
{::_pbi::TcParser::FastF32S1,
|
||||
{85, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.powder_)}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
{::_pbi::TcParser::MiniParse, {}},
|
||||
}}, {{
|
||||
65535, 65535
|
||||
}}, {{
|
||||
@ -736,6 +763,15 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
// bool isShow = 7;
|
||||
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_), 0, 0,
|
||||
(0 | ::_fl::kFcSingular | ::_fl::kBool)},
|
||||
// int32 startLayer = 8;
|
||||
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.startlayer_), 0, 0,
|
||||
(0 | ::_fl::kFcSingular | ::_fl::kInt32)},
|
||||
// int32 endLayer = 9;
|
||||
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.endlayer_), 0, 0,
|
||||
(0 | ::_fl::kFcSingular | ::_fl::kInt32)},
|
||||
// float powder = 10;
|
||||
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.powder_), 0, 0,
|
||||
(0 | ::_fl::kFcSingular | ::_fl::kFloat)},
|
||||
}},
|
||||
// no aux_entries
|
||||
{{
|
||||
@ -795,6 +831,32 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
7, this->_internal_isshow(), target);
|
||||
}
|
||||
|
||||
// int32 startLayer = 8;
|
||||
if (this->_internal_startlayer() != 0) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::
|
||||
WriteInt32ToArrayWithField<8>(
|
||||
stream, this->_internal_startlayer(), target);
|
||||
}
|
||||
|
||||
// int32 endLayer = 9;
|
||||
if (this->_internal_endlayer() != 0) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::
|
||||
WriteInt32ToArrayWithField<9>(
|
||||
stream, this->_internal_endlayer(), target);
|
||||
}
|
||||
|
||||
// float powder = 10;
|
||||
static_assert(sizeof(::uint32_t) == sizeof(float),
|
||||
"Code assumes ::uint32_t and float are the same size.");
|
||||
float tmp_powder = this->_internal_powder();
|
||||
::uint32_t raw_powder;
|
||||
memcpy(&raw_powder, &tmp_powder, sizeof(tmp_powder));
|
||||
if (raw_powder != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteFloatToArray(
|
||||
10, this->_internal_powder(), target);
|
||||
}
|
||||
|
||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||
target =
|
||||
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||
@ -851,6 +913,28 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
|
||||
total_size += 2;
|
||||
}
|
||||
|
||||
// int32 startLayer = 8;
|
||||
if (this->_internal_startlayer() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
|
||||
this->_internal_startlayer());
|
||||
}
|
||||
|
||||
// int32 endLayer = 9;
|
||||
if (this->_internal_endlayer() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
|
||||
this->_internal_endlayer());
|
||||
}
|
||||
|
||||
// float powder = 10;
|
||||
static_assert(sizeof(::uint32_t) == sizeof(float),
|
||||
"Code assumes ::uint32_t and float are the same size.");
|
||||
float tmp_powder = this->_internal_powder();
|
||||
::uint32_t raw_powder;
|
||||
memcpy(&raw_powder, &tmp_powder, sizeof(tmp_powder));
|
||||
if (raw_powder != 0) {
|
||||
total_size += 5;
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
@ -890,6 +974,20 @@ void ParamInfo::MergeImpl(::google::protobuf::Message& to_msg, const ::google::p
|
||||
if (from._internal_isshow() != 0) {
|
||||
_this->_internal_set_isshow(from._internal_isshow());
|
||||
}
|
||||
if (from._internal_startlayer() != 0) {
|
||||
_this->_internal_set_startlayer(from._internal_startlayer());
|
||||
}
|
||||
if (from._internal_endlayer() != 0) {
|
||||
_this->_internal_set_endlayer(from._internal_endlayer());
|
||||
}
|
||||
static_assert(sizeof(::uint32_t) == sizeof(float),
|
||||
"Code assumes ::uint32_t and float are the same size.");
|
||||
float tmp_powder = from._internal_powder();
|
||||
::uint32_t raw_powder;
|
||||
memcpy(&raw_powder, &tmp_powder, sizeof(tmp_powder));
|
||||
if (raw_powder != 0) {
|
||||
_this->_internal_set_powder(from._internal_powder());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
@ -916,8 +1014,8 @@ void ParamInfo::InternalSwap(ParamInfo* other) {
|
||||
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.context_, lhs_arena,
|
||||
&other->_impl_.context_, rhs_arena);
|
||||
::google::protobuf::internal::memswap<
|
||||
PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_)
|
||||
+ sizeof(ParamInfo::_impl_.isshow_)
|
||||
PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.powder_)
|
||||
+ sizeof(ParamInfo::_impl_.powder_)
|
||||
- PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.valuetype_)>(
|
||||
reinterpret_cast<char*>(&_impl_.valuetype_),
|
||||
reinterpret_cast<char*>(&other->_impl_.valuetype_));
|
||||
|
@ -315,6 +315,9 @@ class ParamInfo final :
|
||||
kIsEnableFieldNumber = 5,
|
||||
kIsAlarmFieldNumber = 6,
|
||||
kIsShowFieldNumber = 7,
|
||||
kStartLayerFieldNumber = 8,
|
||||
kEndLayerFieldNumber = 9,
|
||||
kPowderFieldNumber = 10,
|
||||
};
|
||||
// bytes nameKey = 1;
|
||||
void clear_namekey() ;
|
||||
@ -403,13 +406,43 @@ class ParamInfo final :
|
||||
bool _internal_isshow() const;
|
||||
void _internal_set_isshow(bool value);
|
||||
|
||||
public:
|
||||
// int32 startLayer = 8;
|
||||
void clear_startlayer() ;
|
||||
::int32_t startlayer() const;
|
||||
void set_startlayer(::int32_t value);
|
||||
|
||||
private:
|
||||
::int32_t _internal_startlayer() const;
|
||||
void _internal_set_startlayer(::int32_t value);
|
||||
|
||||
public:
|
||||
// int32 endLayer = 9;
|
||||
void clear_endlayer() ;
|
||||
::int32_t endlayer() const;
|
||||
void set_endlayer(::int32_t value);
|
||||
|
||||
private:
|
||||
::int32_t _internal_endlayer() const;
|
||||
void _internal_set_endlayer(::int32_t value);
|
||||
|
||||
public:
|
||||
// float powder = 10;
|
||||
void clear_powder() ;
|
||||
float powder() const;
|
||||
void set_powder(float value);
|
||||
|
||||
private:
|
||||
float _internal_powder() const;
|
||||
void _internal_set_powder(float value);
|
||||
|
||||
public:
|
||||
// @@protoc_insertion_point(class_scope:stream.ParamInfo)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
friend class ::google::protobuf::internal::TcParser;
|
||||
static const ::google::protobuf::internal::TcParseTable<3, 7, 0, 0, 2> _table_;
|
||||
static const ::google::protobuf::internal::TcParseTable<4, 10, 0, 0, 2> _table_;
|
||||
template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
@ -421,6 +454,9 @@ class ParamInfo final :
|
||||
bool isenable_;
|
||||
bool isalarm_;
|
||||
bool isshow_;
|
||||
::int32_t startlayer_;
|
||||
::int32_t endlayer_;
|
||||
float powder_;
|
||||
mutable ::google::protobuf::internal::CachedSize _cached_size_;
|
||||
PROTOBUF_TSAN_DECLARE_MEMBER
|
||||
};
|
||||
@ -2771,6 +2807,72 @@ inline void ParamInfo::_internal_set_isshow(bool value) {
|
||||
_impl_.isshow_ = value;
|
||||
}
|
||||
|
||||
// int32 startLayer = 8;
|
||||
inline void ParamInfo::clear_startlayer() {
|
||||
_impl_.startlayer_ = 0;
|
||||
}
|
||||
inline ::int32_t ParamInfo::startlayer() const {
|
||||
// @@protoc_insertion_point(field_get:stream.ParamInfo.startLayer)
|
||||
return _internal_startlayer();
|
||||
}
|
||||
inline void ParamInfo::set_startlayer(::int32_t value) {
|
||||
_internal_set_startlayer(value);
|
||||
// @@protoc_insertion_point(field_set:stream.ParamInfo.startLayer)
|
||||
}
|
||||
inline ::int32_t ParamInfo::_internal_startlayer() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.startlayer_;
|
||||
}
|
||||
inline void ParamInfo::_internal_set_startlayer(::int32_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
;
|
||||
_impl_.startlayer_ = value;
|
||||
}
|
||||
|
||||
// int32 endLayer = 9;
|
||||
inline void ParamInfo::clear_endlayer() {
|
||||
_impl_.endlayer_ = 0;
|
||||
}
|
||||
inline ::int32_t ParamInfo::endlayer() const {
|
||||
// @@protoc_insertion_point(field_get:stream.ParamInfo.endLayer)
|
||||
return _internal_endlayer();
|
||||
}
|
||||
inline void ParamInfo::set_endlayer(::int32_t value) {
|
||||
_internal_set_endlayer(value);
|
||||
// @@protoc_insertion_point(field_set:stream.ParamInfo.endLayer)
|
||||
}
|
||||
inline ::int32_t ParamInfo::_internal_endlayer() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.endlayer_;
|
||||
}
|
||||
inline void ParamInfo::_internal_set_endlayer(::int32_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
;
|
||||
_impl_.endlayer_ = value;
|
||||
}
|
||||
|
||||
// float powder = 10;
|
||||
inline void ParamInfo::clear_powder() {
|
||||
_impl_.powder_ = 0;
|
||||
}
|
||||
inline float ParamInfo::powder() const {
|
||||
// @@protoc_insertion_point(field_get:stream.ParamInfo.powder)
|
||||
return _internal_powder();
|
||||
}
|
||||
inline void ParamInfo::set_powder(float value) {
|
||||
_internal_set_powder(value);
|
||||
// @@protoc_insertion_point(field_set:stream.ParamInfo.powder)
|
||||
}
|
||||
inline float ParamInfo::_internal_powder() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.powder_;
|
||||
}
|
||||
inline void ParamInfo::_internal_set_powder(float value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
;
|
||||
_impl_.powder_ = value;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// RequestInfo
|
||||
|
@ -44,6 +44,10 @@ message ParamInfo{
|
||||
bool isEnable = 5;
|
||||
bool isAlarm = 6;
|
||||
bool isShow = 7;
|
||||
|
||||
int32 startLayer = 8; //层供粉量配置使用 struct PowderSet
|
||||
int32 endLayer = 9;
|
||||
float powder = 10;
|
||||
}
|
||||
|
||||
message RequestInfo { //读
|
||||
|
Loading…
x
Reference in New Issue
Block a user