This commit is contained in:
wangxx1809 2024-06-25 15:25:46 +08:00
parent 76833fe1f4
commit 02922e116f
22 changed files with 782 additions and 257 deletions

View File

@ -490,40 +490,15 @@ void ConfigManager::SendCfgToClients() {
++commuCfgitem; ++commuCfgitem;
} }
list<Item> lst; SendAlarmCfg();
auto start = m_AlarmCfgWrapper->m_StopAlarmCfgMap.begin(); SendPowderCfg();
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(); //int index = 0;
start = m_AlarmCfgWrapper->m_PauseAlarmCfgMap.begin(); //auto item = m_ScannerControlCfgDao->m_ScannerControlCfgMap.begin();
while (start != m_AlarmCfgWrapper->m_PauseAlarmCfgMap.end()) { //while (item != m_ScannerControlCfgDao->m_ScannerControlCfgMap.end()) {
lst.emplace_back(Item{ start->first,"",UNKNOW,(*start).second->m_Content, (*start).second->m_IsEnable, // //item->second->SendToClients();
(*start).second->m_IsAlarm, (*start).second->m_IsShow }); // ++item;
++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;
}
m_MoldCfg->SendToClients(MOLDCFGPARAM); m_MoldCfg->SendToClients(MOLDCFGPARAM);
m_LoadCfg->SendToClients(LOADCFGPARAM); 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) { void ConfigManager::UpdateCfg(const ReadData& rd) {
switch (rd.dataType) switch (rd.dataType)
@ -617,8 +639,15 @@ void ConfigManager::UpdateCfg(const ReadData& rd) {
case COMMUNICATIONCFG: case COMMUNICATIONCFG:
UpdateCommunicationCfg(rd); break; UpdateCommunicationCfg(rd); break;
case ALARMCFG: 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: default:
break; break;
} }

View File

@ -103,7 +103,7 @@ public:
HbdLanguage* GetLanguage(int id); //无用 HbdLanguage* GetLanguage(int id); //无用
void GetDefaultText(map<string,string>& textmap); //无用 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; } //map<int, LaserCfg*>* GetLaserCfgMap() { return &m_pLaserCfgDao->m_LaserCfgMap; }
//vector<LaserCfg*>* GetLaserCfgs() { return &m_pLaserCfgDao->m_LaserCfgs; } //vector<LaserCfg*>* GetLaserCfgs() { return &m_pLaserCfgDao->m_LaserCfgs; }
map<int,ScannerControlCfg*>* GetScannerControlCfg() { return &m_ScannerControlCfgDao->m_ScannerControlCfgMap; } //传 map<int,ScannerControlCfg*>* GetScannerControlCfg() { return &m_ScannerControlCfgDao->m_ScannerControlCfgMap; } //传
@ -152,6 +152,8 @@ private:
string GetIOVersionStrs(int machineid); //io版本 字符串返回 string GetIOVersionStrs(int machineid); //io版本 字符串返回
void RedTestCfgStart(); void RedTestCfgStart();
void RedTestCfgStop(); void RedTestCfgStop();
void SendAlarmCfg();
void SendPowderCfg();
private: private:
SQLite::Database* m_pDB; SQLite::Database* m_pDB;
HbdLanguageDao* m_pHbdLanguageDao; HbdLanguageDao* m_pHbdLanguageDao;

View File

@ -326,4 +326,6 @@ void AlarmCfgWrapper::UpdateCfg(const string& key, bool isEnable) {
break; break;
} }
} while (false); } while (false);
} }

View File

@ -1,4 +1,4 @@
#include "ParamSetCfg.h" #include "ParamSetCfg.h"
ParamSetCfg::ParamSetCfg() ParamSetCfg::ParamSetCfg()
{} {}
@ -103,72 +103,100 @@ void ParamSetCfg::Generate(vector<string>& ins)
void ParamSetCfg::GetUpdateSql(vector<string>& ups) void ParamSetCfg::GetUpdateSql(vector<string>& ups)
{} {}
bool ParamSetCfg::Add(string name) //bool ParamSetCfg::Add(string name)
{ //{
for (auto pps : ParamSetVec) // for (auto pps : ParamSetVec)
{ // {
if (pps->ConfigName == name) // if (pps->ConfigName == name)
return false; // 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++)
{ void ParamSetCfg::GetPowderCfg(vector<PowderSet>& powderVec) {
PowderSet* src = ParamSetVec.front()->PowderSets[i]; std::shared_lock<std::shared_mutex> lck(m_sMtx);
PowderSet* pps = new PowderSet; if (ParamSetVec.empty()) return;
pps->end_layer = src->end_layer; for (auto item = ParamSetVec[0]->PowderSets.begin(); item != ParamSetVec[0]->PowderSets.end(); ++item) {
pps->start_layer = src->start_layer; powderVec.emplace_back(PowderSet{ (*item)->start_layer,(*item)->end_layer, (*item)->powder });
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;
} }
const string ParamSetCfg::TABLE_NAME = "ParamSet"; const string ParamSetCfg::TABLE_NAME = "ParamSet";

View File

@ -1,7 +1,10 @@
#pragma once #pragma once
#include <string> #include <string>
#include <vector> #include <vector>
#include <map> #include <map>
#include <shared_mutex>
#include "../DataManage/RWData.h"
using namespace std; using namespace std;
class ParamSetCfg class ParamSetCfg
@ -20,12 +23,13 @@ public:
int end_layer; int end_layer;
float powder; float powder;
PowderSet():start_layer(1),end_layer(10),powder(2){} 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; } PowderSet;
typedef struct ParamSet typedef struct ParamSet
{ {
string ConfigName; string ConfigName;
std::map<string, LaserSet*> LaserSetMap; std::map<string, LaserSet*> LaserSetMap; //没用到
std::vector<PowderSet*> PowderSets; std::vector<PowderSet*> PowderSets;
} ParamSet; } ParamSet;
@ -35,9 +39,11 @@ public:
static void Generate(vector<string>& ins); static void Generate(vector<string>& ins);
void GetUpdateSql(vector<string>& ups); void GetUpdateSql(vector<string>& ups);
bool Add(string name); //bool Add(string name); //没用到
bool Delete(string name); //bool Delete(string name); //没用到
void GetPowderCfg(vector<PowderSet>& powderVec);
void UpdatePowderCfg(const ReadData& wd);
public: public:
static const string TABLE_NAME; static const string TABLE_NAME;
static const string FIELD_ID; static const string FIELD_ID;
@ -48,6 +54,7 @@ public:
static const string FIELD_DATA3; static const string FIELD_DATA3;
public: public:
std::shared_mutex m_sMtx;
std::vector<ParamSet*> ParamSetVec; std::vector<ParamSet*> ParamSetVec;
}; };

View File

@ -3,8 +3,8 @@
ScannerControlCfg::ScannerControlCfg() ScannerControlCfg::ScannerControlCfg()
: m_Index(new IntData("Index")) : /*m_Index(new IntData("Index"))
, m_SeqNo(new IntData("SeqNo")) ,*/ m_SeqNo(new IntData("SeqNo"))
, m_ControlNo(new IntData("ControlNo")) , m_ControlNo(new IntData("ControlNo"))
, m_SerialNo(new IntData("SerialNo")) , m_SerialNo(new IntData("SerialNo"))
, m_ControlType(new IntData("ControlType")) , m_ControlType(new IntData("ControlType"))

View File

@ -24,8 +24,8 @@ public:
void Init(); void Init();
ScanParamCfg* GetScanParamCfg(string str); ScanParamCfg* GetScanParamCfg(string str);
public: public:
IntData* m_Index; //编号 配合ConfigManager中的map //IntData* m_Index;
IntData* m_SeqNo; IntData* m_SeqNo; //编号 配合ConfigManager中的map
IntData* m_ControlNo; IntData* m_ControlNo;
IntData* m_SerialNo; IntData* m_SerialNo;
IntData* m_ControlType; IntData* m_ControlType;

View File

@ -3,6 +3,7 @@
#include <typeinfo> #include <typeinfo>
#include "../SystemInfo.h" #include "../SystemInfo.h"
//接收数据的回调
void DataHandle::DataCallBackProc(void* pthis, const ReadData& msg, const std::list<Item>& its) { void DataHandle::DataCallBackProc(void* pthis, const ReadData& msg, const std::list<Item>& its) {
DataHandle* p = (DataHandle*)pthis; DataHandle* p = (DataHandle*)pthis;
ReadData rd = msg; ReadData rd = msg;
@ -10,7 +11,7 @@ void DataHandle::DataCallBackProc(void* pthis, const ReadData& msg, const std::l
p->DataCallBackHandle(rd, lst); 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; DataHandle* p = (DataHandle*)pthis;
int index = atoi(msg.strValue.data()); int index = atoi(msg.strValue.data());
@ -50,7 +51,7 @@ void DataHandle::Init() {
m_config->Init(); m_config->Init();
m_streamServer = new StreamServer(m_config->GetMachine()); 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_streamServer->Init();
m_controller = new Controller(); m_controller = new Controller();
@ -119,6 +120,7 @@ void DataHandle::DataCallBackHandle(const ReadData& msg, const std::list<Item>&
case POWDERESTIMATECFG: case POWDERESTIMATECFG:
case COMMUNICATIONCFG: case COMMUNICATIONCFG:
case ALARMCFG: case ALARMCFG:
case POWDERSET:
ConfigManager::GetInstance()->UpdateCfg(msg); ConfigManager::GetInstance()->UpdateCfg(msg);
break; break;
case REQUEST: case REQUEST:

View File

@ -7,7 +7,7 @@
class DataHandle{ class DataHandle{
typedef void (*DataCallBack)(void* pthis, const ReadData& msg); 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: public:
DataHandle(); DataHandle();
~DataHandle(); ~DataHandle();
@ -17,7 +17,7 @@ public:
void Stop(); void Stop();
static void DataCallBackProc(void* pthis, const ReadData& msg,const std::list<Item>& its); 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: private:
//DataCallBack m_dataCallBack; //DataCallBack m_dataCallBack;
//std::thread m_testTd; //std::thread m_testTd;

View File

@ -34,6 +34,7 @@ enum READTYPE {
POWDERESTIMATECFG, POWDERESTIMATECFG,
COMMUNICATIONCFG, COMMUNICATIONCFG,
ALARMCFG, ALARMCFG,
POWDERSET,
LOADPARAM, //装载参数 LOADPARAM, //装载参数
@ -63,6 +64,7 @@ enum DATAHANDLE {
UPDATE = 0, UPDATE = 0,
ADD, ADD,
DEL, DEL,
TOTAL, //发全量信息
}; };
@ -115,7 +117,7 @@ enum WRITETYPE {
STOPALARMCFGPARAM, //AlarmCfgWrapper stop参数 STOPALARMCFGPARAM, //AlarmCfgWrapper stop参数
PAUSEALARMCFGPARAM, //AlarmCfgWrapper pause参数 PAUSEALARMCFGPARAM, //AlarmCfgWrapper pause参数
WARNALARMCFGPARAM, //AlarmCfgWrapper warn参数 WARNALARMCFGPARAM, //AlarmCfgWrapper warn参数
POWDERSETPARAM, //PowderSet 参数
MOLDCFGPARAM, MOLDCFGPARAM,
LOADCFGPARAM, LOADCFGPARAM,
@ -144,6 +146,23 @@ struct Item {
bool isEnable; bool isEnable;
bool isAlarm; bool isAlarm;
bool isShow; 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; class ClientInfo;

View File

@ -32,8 +32,8 @@ StreamServer::~StreamServer() {
paramLst.emplace_back(Item{ it.namekey(),it.strvalue() ,(DATATYPE)it.valuetype() }); //直接加到readData.its上面后续的请求无法收到不知道为啥 paramLst.emplace_back(Item{ it.namekey(),it.strvalue() ,(DATATYPE)it.valuetype() }); //直接加到readData.its上面后续的请求无法收到不知道为啥
} }
if (m_layerDataCallBack) if (m_funcDataCallBack)
m_layerDataCallBack(m_handlePtr, readData, paramLst, &response); m_funcDataCallBack(m_handlePtr, readData, paramLst, &response);
return Status::OK; return Status::OK;
} }
@ -64,12 +64,14 @@ Status StreamServer::AllStream(ServerContext* context, grpc::ServerReaderWriter<
//函数参数 //函数参数
std::list<Item> paramLst; // std::list<Item> paramLst; //
for (const ::stream::ParamInfo it : request.item()) { 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", 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()); readData.dataType, readData.nameKey.c_str(), readData.strValue.c_str(), readData.valueType, paramLst.size());
if (m_dataCallBack) { if (m_dataCallBack) {
readData.its = paramLst;
m_dataCallBack(m_handlePtr,readData, 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_isenable(wd->isEnable);
paramInfo->set_isalarm(wd->isAlarm); paramInfo->set_isalarm(wd->isAlarm);
paramInfo->set_isshow(wd->isShow); 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); stream->Write(response);
} }

View File

@ -19,7 +19,7 @@ using stream::ResponseInfo;
class StreamServer final : public Stream::Service { class StreamServer final : public Stream::Service {
typedef void (*DataCallBack)(void* pthis,const ReadData& msg, const std::list<Item>& its); 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: public:
@ -30,10 +30,10 @@ public:
void Run(); void Run();
void Stop(); void Stop();
void SetCallBackFunc(void* pdata,DataCallBack dataCallBack, LayerDataCallBack layerCB) { void SetCallBackFunc(void* pdata,DataCallBack dataCallBack, FuncDataCallBack layerCB) {
m_dataCallBack = dataCallBack; m_dataCallBack = dataCallBack;
m_handlePtr = pdata; m_handlePtr = pdata;
m_layerDataCallBack = layerCB; m_funcDataCallBack = layerCB;
} }
private: private:
@ -44,7 +44,7 @@ private:
std::thread m_checkCloseTd; //检测客户端关闭线程 std::thread m_checkCloseTd; //检测客户端关闭线程
bool m_checkQuitFlag; bool m_checkQuitFlag;
DataCallBack m_dataCallBack; DataCallBack m_dataCallBack;
LayerDataCallBack m_layerDataCallBack; FuncDataCallBack m_funcDataCallBack;
int m_port; //监听端口 int m_port; //监听端口
void* m_handlePtr; void* m_handlePtr;

Binary file not shown.

View File

@ -40,6 +40,9 @@ PROTOBUF_CONSTEXPR ParamInfo::ParamInfo(::_pbi::ConstantInitialized)
/*decltype(_impl_.isenable_)*/ false, /*decltype(_impl_.isenable_)*/ false,
/*decltype(_impl_.isalarm_)*/ false, /*decltype(_impl_.isalarm_)*/ false,
/*decltype(_impl_.isshow_)*/ false, /*decltype(_impl_.isshow_)*/ false,
/*decltype(_impl_.startlayer_)*/ 0,
/*decltype(_impl_.endlayer_)*/ 0,
/*decltype(_impl_.powder_)*/ 0,
/*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._cached_size_)*/ {},
} {} } {}
struct ParamInfoDefaultTypeInternal { 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_.isenable_),
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isalarm_), PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isalarm_),
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isshow_), 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_ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::stream::RequestInfo, _internal_metadata_), PROTOBUF_FIELD_OFFSET(::stream::RequestInfo, _internal_metadata_),
~0u, // no _extensions_ ~0u, // no _extensions_
@ -411,17 +417,17 @@ const ::uint32_t TableStruct_stream_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE
static const ::_pbi::MigrationSchema static const ::_pbi::MigrationSchema
schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{0, -1, -1, sizeof(::stream::ParamInfo)}, {0, -1, -1, sizeof(::stream::ParamInfo)},
{15, -1, -1, sizeof(::stream::RequestInfo)}, {18, -1, -1, sizeof(::stream::RequestInfo)},
{29, -1, -1, sizeof(::stream::ResponseInfo)}, {32, -1, -1, sizeof(::stream::ResponseInfo)},
{40, 49, -1, sizeof(::stream::ResponseAny)}, {43, 52, -1, sizeof(::stream::ResponseAny)},
{50, -1, -1, sizeof(::stream::LayerData)}, {53, -1, -1, sizeof(::stream::LayerData)},
{63, -1, -1, sizeof(::stream::LayerDataBlock)}, {66, -1, -1, sizeof(::stream::LayerDataBlock)},
{77, -1, -1, sizeof(::stream::VectorDataBlock)}, {80, -1, -1, sizeof(::stream::VectorDataBlock)},
{89, -1, -1, sizeof(::stream::ChainDataBlock)}, {92, -1, -1, sizeof(::stream::ChainDataBlock)},
{99, -1, -1, sizeof(::stream::Point)}, {102, -1, -1, sizeof(::stream::Point)},
{109, -1, -1, sizeof(::stream::RegResponce)}, {112, -1, -1, sizeof(::stream::RegResponce)},
{118, -1, -1, sizeof(::stream::ImgInfoResponce)}, {121, -1, -1, sizeof(::stream::ImgInfoResponce)},
{129, -1, -1, sizeof(::stream::ComResponce)}, {132, -1, -1, sizeof(::stream::ComResponce)},
}; };
static const ::_pb::Message* const file_default_instances[] = { 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) = { const char descriptor_table_protodef_stream_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
"\n\014stream.proto\022\006stream\032\031google/protobuf/" "\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." "\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" "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\"" "\030\005 \001(\010\022\017\n\007isAlarm\030\006 \001(\010\022\016\n\006isShow\030\007 \001(\010\022"
"\254\001\n\013RequestInfo\022\020\n\010dataType\030\001 \001(\r\022\017\n\007nam" "\022\n\nstartLayer\030\010 \001(\005\022\020\n\010endLayer\030\t \001(\005\022\016\n"
"eKey\030\002 \001(\014\022\020\n\010strValue\030\003 \001(\014\022\037\n\tvalueTyp" "\006powder\030\n \001(\002\"\254\001\n\013RequestInfo\022\020\n\010dataTyp"
"e\030\004 \001(\0162\014.stream.TYPE\022&\n\nhandleType\030\005 \001(" "e\030\001 \001(\r\022\017\n\007nameKey\030\002 \001(\014\022\020\n\010strValue\030\003 \001"
"\0162\022.stream.DATAHANDLE\022\037\n\004item\030\006 \003(\0132\021.st" "(\014\022\037\n\tvalueType\030\004 \001(\0162\014.stream.TYPE\022&\n\nh"
"ream.ParamInfo\"Q\n\014ResponseInfo\022\020\n\010dataTy" "andleType\030\005 \001(\0162\022.stream.DATAHANDLE\022\037\n\004i"
"pe\030\001 \001(\r\022\016\n\006result\030\002 \001(\010\022\037\n\004item\030\003 \003(\0132\021" "tem\030\006 \003(\0132\021.stream.ParamInfo\"Q\n\014Response"
".stream.ParamInfo\"1\n\013ResponseAny\022\"\n\004data" "Info\022\020\n\010dataType\030\001 \001(\r\022\016\n\006result\030\002 \001(\010\022\037"
"\030\001 \001(\0132\024.google.protobuf.Any\"\210\001\n\tLayerDa" "\n\004item\030\003 \003(\0132\021.stream.ParamInfo\"1\n\013Respo"
"ta\022\023\n\013zCooldinate\030\001 \001(\002\022\016\n\006powder\030\002 \001(\002\022" "nseAny\022\"\n\004data\030\001 \001(\0132\024.google.protobuf.A"
"\026\n\016layerThickness\030\003 \001(\002\022.\n\016layerDataBloc" "ny\"\210\001\n\tLayerData\022\023\n\013zCooldinate\030\001 \001(\002\022\016\n"
"k\030\004 \003(\0132\026.stream.LayerDataBlock\022\016\n\006resul" "\006powder\030\002 \001(\002\022\026\n\016layerThickness\030\003 \001(\002\022.\n"
"t\030\005 \001(\010\"\266\001\n\016LayerDataBlock\022\021\n\telementId\030" "\016layerDataBlock\030\004 \003(\0132\026.stream.LayerData"
"\001 \001(\005\022\026\n\016elementParamId\030\002 \001(\005\022\021\n\tblockTy" "Block\022\016\n\006result\030\005 \001(\010\"\266\001\n\016LayerDataBlock"
"pe\030\003 \001(\r\022*\n\tvecBlocks\030\004 \003(\0132\027.stream.Vec" "\022\021\n\telementId\030\001 \001(\005\022\026\n\016elementParamId\030\002 "
"torDataBlock\022+\n\013chainBlocks\030\005 \003(\0132\026.stre" "\001(\005\022\021\n\tblockType\030\003 \001(\r\022*\n\tvecBlocks\030\004 \003("
"am.ChainDataBlock\022\r\n\005order\030\006 \001(\r\"M\n\017Vect" "\0132\027.stream.VectorDataBlock\022+\n\013chainBlock"
"orDataBlock\022\016\n\006startX\030\001 \001(\002\022\016\n\006startY\030\002 " "s\030\005 \003(\0132\026.stream.ChainDataBlock\022\r\n\005order"
"\001(\002\022\014\n\004endX\030\003 \001(\002\022\014\n\004endY\030\004 \001(\002\"A\n\016Chain" "\030\006 \001(\r\"M\n\017VectorDataBlock\022\016\n\006startX\030\001 \001("
"DataBlock\022\016\n\006dotNum\030\001 \001(\r\022\037\n\010pointVec\030\002 " "\002\022\016\n\006startY\030\002 \001(\002\022\014\n\004endX\030\003 \001(\002\022\014\n\004endY\030"
"\003(\0132\r.stream.Point\"#\n\005Point\022\014\n\004xPos\030\001 \001(" "\004 \001(\002\"A\n\016ChainDataBlock\022\016\n\006dotNum\030\001 \001(\r\022"
"\002\022\014\n\004yPos\030\002 \001(\002\"\033\n\013RegResponce\022\014\n\004data\030\001" "\037\n\010pointVec\030\002 \003(\0132\r.stream.Point\"#\n\005Poin"
" \001(\005\"D\n\017ImgInfoResponce\022\022\n\nlevelImage\030\001 " "t\022\014\n\004xPos\030\001 \001(\002\022\014\n\004yPos\030\002 \001(\002\"\033\n\013RegResp"
"\001(\r\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 \001(\005\"\033\n\013Co" "once\022\014\n\004data\030\001 \001(\005\"D\n\017ImgInfoResponce\022\022\n"
"mResponce\022\014\n\004data\030\001 \001(\014*\223\001\n\004TYPE\022\t\n\005iBOO" "\nlevelImage\030\001 \001(\r\022\r\n\005width\030\002 \001(\005\022\016\n\006heig"
"L\020\000\022\n\n\006iSHORT\020\001\022\013\n\007iUSHORT\020\002\022\010\n\004iINT\020\003\022\t" "ht\030\003 \001(\005\"\033\n\013ComResponce\022\014\n\004data\030\001 \001(\014*\223\001"
"\n\005iUINT\020\004\022\n\n\006iFLOAT\020\005\022\013\n\007iSTRING\020\006\022\t\n\005iC" "\n\004TYPE\022\t\n\005iBOOL\020\000\022\n\n\006iSHORT\020\001\022\013\n\007iUSHORT"
"HAR\020\007\022\n\n\006iUCHAR\020\010\022\t\n\005iWORD\020\t\022\013\n\007iDOUBLE\020" "\020\002\022\010\n\004iINT\020\003\022\t\n\005iUINT\020\004\022\n\n\006iFLOAT\020\005\022\013\n\007i"
"\n\022\n\n\006iTIMET\020\013**\n\nDATAHANDLE\022\n\n\006UPDATE\020\000\022" "STRING\020\006\022\t\n\005iCHAR\020\007\022\n\n\006iUCHAR\020\010\022\t\n\005iWORD"
"\007\n\003ADD\020\001\022\007\n\003DEL\020\0022\372\001\n\006Stream\0224\n\006Simple\022\023" "\020\t\022\013\n\007iDOUBLE\020\n\022\n\n\006iTIMET\020\013**\n\nDATAHANDL"
".stream.RequestInfo\032\023.stream.ResponseAny" "E\022\n\n\006UPDATE\020\000\022\007\n\003ADD\020\001\022\007\n\003DEL\020\0022\372\001\n\006Stre"
"\"\000\022=\n\014ServerStream\022\023.stream.RequestInfo\032" "am\0224\n\006Simple\022\023.stream.RequestInfo\032\023.stre"
"\024.stream.ResponseInfo\"\0000\001\022=\n\014ClientStrea" "am.ResponseAny\"\000\022=\n\014ServerStream\022\023.strea"
"m\022\023.stream.RequestInfo\032\024.stream.Response" "m.RequestInfo\032\024.stream.ResponseInfo\"\0000\001\022"
"Info\"\000(\001\022<\n\tAllStream\022\023.stream.RequestIn" "=\n\014ClientStream\022\023.stream.RequestInfo\032\024.s"
"fo\032\024.stream.ResponseInfo\"\000(\0010\001B-\n\027io.grp" "tream.ResponseInfo\"\000(\001\022<\n\tAllStream\022\023.st"
"c.examples.streamB\013StreamProtoP\001\242\002\002STb\006p" "ream.RequestInfo\032\024.stream.ResponseInfo\"\000"
"roto3" "(\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] = 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 = { const ::_pbi::DescriptorTable descriptor_table_stream_2eproto = {
false, false,
false, false,
1645, 1699,
descriptor_table_protodef_stream_2eproto, descriptor_table_protodef_stream_2eproto,
"stream.proto", "stream.proto",
&descriptor_table_stream_2eproto_once, &descriptor_table_stream_2eproto_once,
@ -582,6 +589,9 @@ ParamInfo::ParamInfo(const ParamInfo& from) : ::google::protobuf::Message() {
decltype(_impl_.isenable_){}, decltype(_impl_.isenable_){},
decltype(_impl_.isalarm_){}, decltype(_impl_.isalarm_){},
decltype(_impl_.isshow_){}, decltype(_impl_.isshow_){},
decltype(_impl_.startlayer_){},
decltype(_impl_.endlayer_){},
decltype(_impl_.powder_){},
/*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._cached_size_)*/ {},
}; };
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( _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()); _this->_impl_.context_.Set(from._internal_context(), _this->GetArenaForAllocation());
} }
::memcpy(&_impl_.valuetype_, &from._impl_.valuetype_, ::memcpy(&_impl_.valuetype_, &from._impl_.valuetype_,
static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.isshow_) - static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.powder_) -
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.isshow_)); reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.powder_));
// @@protoc_insertion_point(copy_constructor:stream.ParamInfo) // @@protoc_insertion_point(copy_constructor:stream.ParamInfo)
} }
@ -623,6 +633,9 @@ inline void ParamInfo::SharedCtor(::_pb::Arena* arena) {
decltype(_impl_.isenable_){false}, decltype(_impl_.isenable_){false},
decltype(_impl_.isalarm_){false}, decltype(_impl_.isalarm_){false},
decltype(_impl_.isshow_){false}, decltype(_impl_.isshow_){false},
decltype(_impl_.startlayer_){0},
decltype(_impl_.endlayer_){0},
decltype(_impl_.powder_){0},
/*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._cached_size_)*/ {},
}; };
_impl_.namekey_.InitDefault(); _impl_.namekey_.InitDefault();
@ -663,8 +676,8 @@ PROTOBUF_NOINLINE void ParamInfo::Clear() {
_impl_.strvalue_.ClearToEmpty(); _impl_.strvalue_.ClearToEmpty();
_impl_.context_.ClearToEmpty(); _impl_.context_.ClearToEmpty();
::memset(&_impl_.valuetype_, 0, static_cast<::size_t>( ::memset(&_impl_.valuetype_, 0, static_cast<::size_t>(
reinterpret_cast<char*>(&_impl_.isshow_) - reinterpret_cast<char*>(&_impl_.powder_) -
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.isshow_)); reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.powder_));
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
} }
@ -676,15 +689,15 @@ const char* ParamInfo::_InternalParse(
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 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 _has_bits_
0, // no _extensions_ 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), offsetof(decltype(_table_), field_lookup_table),
4294967168, // skipmap 4294966272, // skipmap
offsetof(decltype(_table_), field_entries), offsetof(decltype(_table_), field_entries),
7, // num_field_entries 10, // num_field_entries
0, // num_aux_entries 0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries offsetof(decltype(_table_), field_names), // no aux_entries
&_ParamInfo_default_instance_._instance, &_ParamInfo_default_instance_._instance,
@ -712,6 +725,20 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
// bool isShow = 7; // bool isShow = 7;
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(ParamInfo, _impl_.isshow_), 63>(), {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(ParamInfo, _impl_.isshow_), 63>(),
{56, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_)}}, {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 65535, 65535
}}, {{ }}, {{
@ -736,6 +763,15 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
// bool isShow = 7; // bool isShow = 7;
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_), 0, 0, {PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBool)}, (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 // no aux_entries
{{ {{
@ -795,6 +831,32 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
7, this->_internal_isshow(), target); 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())) { if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
@ -851,6 +913,28 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
total_size += 2; 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_); 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) { if (from._internal_isshow() != 0) {
_this->_internal_set_isshow(from._internal_isshow()); _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_); _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, ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.context_, lhs_arena,
&other->_impl_.context_, rhs_arena); &other->_impl_.context_, rhs_arena);
::google::protobuf::internal::memswap< ::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_) PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.powder_)
+ sizeof(ParamInfo::_impl_.isshow_) + sizeof(ParamInfo::_impl_.powder_)
- PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.valuetype_)>( - PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.valuetype_)>(
reinterpret_cast<char*>(&_impl_.valuetype_), reinterpret_cast<char*>(&_impl_.valuetype_),
reinterpret_cast<char*>(&other->_impl_.valuetype_)); reinterpret_cast<char*>(&other->_impl_.valuetype_));

View File

@ -315,6 +315,9 @@ class ParamInfo final :
kIsEnableFieldNumber = 5, kIsEnableFieldNumber = 5,
kIsAlarmFieldNumber = 6, kIsAlarmFieldNumber = 6,
kIsShowFieldNumber = 7, kIsShowFieldNumber = 7,
kStartLayerFieldNumber = 8,
kEndLayerFieldNumber = 9,
kPowderFieldNumber = 10,
}; };
// bytes nameKey = 1; // bytes nameKey = 1;
void clear_namekey() ; void clear_namekey() ;
@ -403,13 +406,43 @@ class ParamInfo final :
bool _internal_isshow() const; bool _internal_isshow() const;
void _internal_set_isshow(bool value); 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: public:
// @@protoc_insertion_point(class_scope:stream.ParamInfo) // @@protoc_insertion_point(class_scope:stream.ParamInfo)
private: private:
class _Internal; class _Internal;
friend class ::google::protobuf::internal::TcParser; 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; template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
typedef void InternalArenaConstructable_; typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_; typedef void DestructorSkippable_;
@ -421,6 +454,9 @@ class ParamInfo final :
bool isenable_; bool isenable_;
bool isalarm_; bool isalarm_;
bool isshow_; bool isshow_;
::int32_t startlayer_;
::int32_t endlayer_;
float powder_;
mutable ::google::protobuf::internal::CachedSize _cached_size_; mutable ::google::protobuf::internal::CachedSize _cached_size_;
PROTOBUF_TSAN_DECLARE_MEMBER PROTOBUF_TSAN_DECLARE_MEMBER
}; };
@ -2771,6 +2807,72 @@ inline void ParamInfo::_internal_set_isshow(bool value) {
_impl_.isshow_ = 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 // RequestInfo

View File

@ -44,6 +44,10 @@ message ParamInfo{
bool isEnable = 5; bool isEnable = 5;
bool isAlarm = 6; bool isAlarm = 6;
bool isShow = 7; bool isShow = 7;
int32 startLayer = 8; //使 struct PowderSet
int32 endLayer = 9;
float powder = 10;
} }
message RequestInfo { // message RequestInfo { //

View File

@ -83,9 +83,12 @@ void DataHandle::PrintValue(const ReadData& msg){
it->nameKey; it->nameKey;
string valueType = m_dataTypeMp[(*it).valueType]; string valueType = m_dataTypeMp[(*it).valueType];
if (msg.dataType >= STOPALARMCFGPARAM && msg.dataType <= WARNALARMCFGPARAM) { 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", printf("接收:dataType:%d,nameKey:%*s, content:%s,isEnable:%d,isAlarm:%d,isShow:%d\n",
msg.dataType, 33, it->nameKey.data(), 13, it->strValue.data(), valueType.data(), msg.dataType, 33, it->nameKey.data(), it->content.c_str(), it->isEnable, it->isAlarm, it->isShow);
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 { else {
printf("接收:dataType:%d,nameKey:%*s, strvalue:%*s, valueType:%s\n", 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(" 36: " COLOR_YELLOW "print stopalarm cfg param data...\n" COLOR_RESET);
printf(" 37: " COLOR_YELLOW "print pausealarm 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(" 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 moldcfg param data...\n" COLOR_RESET);
printf(" 40: " COLOR_YELLOW "print loadcfg param data...\n" COLOR_RESET); printf(" 41: " COLOR_YELLOW "print loadcfg param data...\n" COLOR_RESET);
printf(" 41: " COLOR_YELLOW "print armcfgparam data...\n" COLOR_RESET); printf(" 42: " COLOR_YELLOW "print armcfgparam data...\n" COLOR_RESET);
printf(" 42: " COLOR_YELLOW "print supplycfgparam data...\n" COLOR_RESET); printf(" 43: " COLOR_YELLOW "print supplycfgparam data...\n" COLOR_RESET);
printf(" 43: " COLOR_YELLOW "print cleancfgparam data...\n" COLOR_RESET); printf(" 44: " COLOR_YELLOW "print cleancfgparam data...\n" COLOR_RESET);
printf(" 44: " COLOR_YELLOW "print elecfgparam data...\n" COLOR_RESET); printf(" 45: " COLOR_YELLOW "print elecfgparam data...\n" COLOR_RESET);
printf(" 45: " COLOR_YELLOW "print loadparamrsp data...\n" COLOR_RESET); printf(" 46: " 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 state data...\n" COLOR_RESET);
printf(" 47: " COLOR_YELLOW "print scan ctrl Param data...\n" COLOR_RESET); printf(" 48: " 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 xy scan state data...\n" COLOR_RESET);
printf(" 49: " COLOR_YELLOW "print camera param data...\n" COLOR_RESET); printf(" 50: " COLOR_YELLOW "print camera param data...\n" COLOR_RESET);
} }
int DataHandle::Request(int index) { int DataHandle::Request(int index) {
@ -287,7 +291,7 @@ void DataHandle::ParamRequest(int index) {
//选择一个参数更新到服务 //选择一个参数更新到服务
void DataHandle::UpdateParam(const string& input) { void DataHandle::UpdateParam(const string& input) {
WriteData writeData;
int index = ConverType::TryToI(input.substr(5)); int index = ConverType::TryToI(input.substr(5));
switch (index) { switch (index) {
case PARAMLIMITCFGPARAM: case PARAMLIMITCFGPARAM:
@ -329,6 +333,11 @@ void DataHandle::UpdateParam(const string& input) {
case WARNALARMCFGPARAM: //AlarmCfgWrapper warn参数 case WARNALARMCFGPARAM: //AlarmCfgWrapper warn参数
PushMsg(ALARMCFG, "SupplyPipeBlockWarn", to_string(0), iINT); PushMsg(ALARMCFG, "SupplyPipeBlockWarn", to_string(0), iINT);
break; 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: case ELECFGPARAM:
break; break;
case LOADPARAMRSP: case LOADPARAMRSP:

View File

@ -50,6 +50,7 @@ enum READTYPE {
STOPALARMCFGPARAM, //AlarmCfgWrapper stop参数 STOPALARMCFGPARAM, //AlarmCfgWrapper stop参数
PAUSEALARMCFGPARAM, //AlarmCfgWrapper pause参数 PAUSEALARMCFGPARAM, //AlarmCfgWrapper pause参数
WARNALARMCFGPARAM, //AlarmCfgWrapper warn参数 WARNALARMCFGPARAM, //AlarmCfgWrapper warn参数
POWDERSETPARAM, //PowderSet 参数
MOLDCFGPARAM, MOLDCFGPARAM,
LOADCFGPARAM, LOADCFGPARAM,
@ -97,6 +98,11 @@ struct Item {
bool isEnable; bool isEnable;
bool isAlarm; bool isAlarm;
bool isShow; bool isShow;
//层供粉量配置使用 struct PowderSet
int start_layer;
int end_layer;
float powder;
}; };
struct ReadData { struct ReadData {
@ -138,6 +144,7 @@ enum WRITETYPE {
POWDERESTIMATECFG, POWDERESTIMATECFG,
COMMUNICATIONCFG, COMMUNICATIONCFG,
ALARMCFG, ALARMCFG,
POWDERSET,
LOADPARAM, //装载参数 LOADPARAM, //装载参数
SCANCTRLFUNC, //振镜控制函数 SCANCTRLFUNC, //振镜控制函数
@ -149,6 +156,7 @@ enum DATAHANDLE {
UPDATE = 0, UPDATE = 0,
ADD = 1, ADD = 1,
DEL = 2, DEL = 2,
TOTAL, //发全量信息
}; };
struct WriteData { struct WriteData {

View File

@ -74,7 +74,8 @@ void StreamClient::AllStream() {
for (const ::stream::ParamInfo& it : readInfo.item()) { for (const ::stream::ParamInfo& it : readInfo.item()) {
readData.its.emplace_back(Item{ it.namekey(),it.strvalue(),(DATATYPE)it.valuetype() 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", //printf("接收到服务端消息dataType:%d,nameKey:%s, strvalue:%s,valueType:%d\n",
// readData.dataType, it.namekey().data(), it.strvalue().c_str(), it.valuetype()); // 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_namekey((*wd).nameKey);
paramInfo->set_strvalue((*wd).strValue); paramInfo->set_strvalue((*wd).strValue);
paramInfo->set_valuetype((stream::TYPE)(*wd).valueType); 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); stream->Write(request);

View File

@ -40,6 +40,9 @@ PROTOBUF_CONSTEXPR ParamInfo::ParamInfo(::_pbi::ConstantInitialized)
/*decltype(_impl_.isenable_)*/ false, /*decltype(_impl_.isenable_)*/ false,
/*decltype(_impl_.isalarm_)*/ false, /*decltype(_impl_.isalarm_)*/ false,
/*decltype(_impl_.isshow_)*/ false, /*decltype(_impl_.isshow_)*/ false,
/*decltype(_impl_.startlayer_)*/ 0,
/*decltype(_impl_.endlayer_)*/ 0,
/*decltype(_impl_.powder_)*/ 0,
/*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._cached_size_)*/ {},
} {} } {}
struct ParamInfoDefaultTypeInternal { 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_.isenable_),
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isalarm_), PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isalarm_),
PROTOBUF_FIELD_OFFSET(::stream::ParamInfo, _impl_.isshow_), 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_ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::stream::RequestInfo, _internal_metadata_), PROTOBUF_FIELD_OFFSET(::stream::RequestInfo, _internal_metadata_),
~0u, // no _extensions_ ~0u, // no _extensions_
@ -411,17 +417,17 @@ const ::uint32_t TableStruct_stream_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE
static const ::_pbi::MigrationSchema static const ::_pbi::MigrationSchema
schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{0, -1, -1, sizeof(::stream::ParamInfo)}, {0, -1, -1, sizeof(::stream::ParamInfo)},
{15, -1, -1, sizeof(::stream::RequestInfo)}, {18, -1, -1, sizeof(::stream::RequestInfo)},
{29, -1, -1, sizeof(::stream::ResponseInfo)}, {32, -1, -1, sizeof(::stream::ResponseInfo)},
{40, 49, -1, sizeof(::stream::ResponseAny)}, {43, 52, -1, sizeof(::stream::ResponseAny)},
{50, -1, -1, sizeof(::stream::LayerData)}, {53, -1, -1, sizeof(::stream::LayerData)},
{63, -1, -1, sizeof(::stream::LayerDataBlock)}, {66, -1, -1, sizeof(::stream::LayerDataBlock)},
{77, -1, -1, sizeof(::stream::VectorDataBlock)}, {80, -1, -1, sizeof(::stream::VectorDataBlock)},
{89, -1, -1, sizeof(::stream::ChainDataBlock)}, {92, -1, -1, sizeof(::stream::ChainDataBlock)},
{99, -1, -1, sizeof(::stream::Point)}, {102, -1, -1, sizeof(::stream::Point)},
{109, -1, -1, sizeof(::stream::RegResponce)}, {112, -1, -1, sizeof(::stream::RegResponce)},
{118, -1, -1, sizeof(::stream::ImgInfoResponce)}, {121, -1, -1, sizeof(::stream::ImgInfoResponce)},
{129, -1, -1, sizeof(::stream::ComResponce)}, {132, -1, -1, sizeof(::stream::ComResponce)},
}; };
static const ::_pb::Message* const file_default_instances[] = { 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) = { const char descriptor_table_protodef_stream_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
"\n\014stream.proto\022\006stream\032\031google/protobuf/" "\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." "\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" "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\"" "\030\005 \001(\010\022\017\n\007isAlarm\030\006 \001(\010\022\016\n\006isShow\030\007 \001(\010\022"
"\254\001\n\013RequestInfo\022\020\n\010dataType\030\001 \001(\r\022\017\n\007nam" "\022\n\nstartLayer\030\010 \001(\005\022\020\n\010endLayer\030\t \001(\005\022\016\n"
"eKey\030\002 \001(\014\022\020\n\010strValue\030\003 \001(\014\022\037\n\tvalueTyp" "\006powder\030\n \001(\002\"\254\001\n\013RequestInfo\022\020\n\010dataTyp"
"e\030\004 \001(\0162\014.stream.TYPE\022&\n\nhandleType\030\005 \001(" "e\030\001 \001(\r\022\017\n\007nameKey\030\002 \001(\014\022\020\n\010strValue\030\003 \001"
"\0162\022.stream.DATAHANDLE\022\037\n\004item\030\006 \003(\0132\021.st" "(\014\022\037\n\tvalueType\030\004 \001(\0162\014.stream.TYPE\022&\n\nh"
"ream.ParamInfo\"Q\n\014ResponseInfo\022\020\n\010dataTy" "andleType\030\005 \001(\0162\022.stream.DATAHANDLE\022\037\n\004i"
"pe\030\001 \001(\r\022\016\n\006result\030\002 \001(\010\022\037\n\004item\030\003 \003(\0132\021" "tem\030\006 \003(\0132\021.stream.ParamInfo\"Q\n\014Response"
".stream.ParamInfo\"1\n\013ResponseAny\022\"\n\004data" "Info\022\020\n\010dataType\030\001 \001(\r\022\016\n\006result\030\002 \001(\010\022\037"
"\030\001 \001(\0132\024.google.protobuf.Any\"\210\001\n\tLayerDa" "\n\004item\030\003 \003(\0132\021.stream.ParamInfo\"1\n\013Respo"
"ta\022\023\n\013zCooldinate\030\001 \001(\002\022\016\n\006powder\030\002 \001(\002\022" "nseAny\022\"\n\004data\030\001 \001(\0132\024.google.protobuf.A"
"\026\n\016layerThickness\030\003 \001(\002\022.\n\016layerDataBloc" "ny\"\210\001\n\tLayerData\022\023\n\013zCooldinate\030\001 \001(\002\022\016\n"
"k\030\004 \003(\0132\026.stream.LayerDataBlock\022\016\n\006resul" "\006powder\030\002 \001(\002\022\026\n\016layerThickness\030\003 \001(\002\022.\n"
"t\030\005 \001(\010\"\266\001\n\016LayerDataBlock\022\021\n\telementId\030" "\016layerDataBlock\030\004 \003(\0132\026.stream.LayerData"
"\001 \001(\005\022\026\n\016elementParamId\030\002 \001(\005\022\021\n\tblockTy" "Block\022\016\n\006result\030\005 \001(\010\"\266\001\n\016LayerDataBlock"
"pe\030\003 \001(\r\022*\n\tvecBlocks\030\004 \003(\0132\027.stream.Vec" "\022\021\n\telementId\030\001 \001(\005\022\026\n\016elementParamId\030\002 "
"torDataBlock\022+\n\013chainBlocks\030\005 \003(\0132\026.stre" "\001(\005\022\021\n\tblockType\030\003 \001(\r\022*\n\tvecBlocks\030\004 \003("
"am.ChainDataBlock\022\r\n\005order\030\006 \001(\r\"M\n\017Vect" "\0132\027.stream.VectorDataBlock\022+\n\013chainBlock"
"orDataBlock\022\016\n\006startX\030\001 \001(\002\022\016\n\006startY\030\002 " "s\030\005 \003(\0132\026.stream.ChainDataBlock\022\r\n\005order"
"\001(\002\022\014\n\004endX\030\003 \001(\002\022\014\n\004endY\030\004 \001(\002\"A\n\016Chain" "\030\006 \001(\r\"M\n\017VectorDataBlock\022\016\n\006startX\030\001 \001("
"DataBlock\022\016\n\006dotNum\030\001 \001(\r\022\037\n\010pointVec\030\002 " "\002\022\016\n\006startY\030\002 \001(\002\022\014\n\004endX\030\003 \001(\002\022\014\n\004endY\030"
"\003(\0132\r.stream.Point\"#\n\005Point\022\014\n\004xPos\030\001 \001(" "\004 \001(\002\"A\n\016ChainDataBlock\022\016\n\006dotNum\030\001 \001(\r\022"
"\002\022\014\n\004yPos\030\002 \001(\002\"\033\n\013RegResponce\022\014\n\004data\030\001" "\037\n\010pointVec\030\002 \003(\0132\r.stream.Point\"#\n\005Poin"
" \001(\005\"D\n\017ImgInfoResponce\022\022\n\nlevelImage\030\001 " "t\022\014\n\004xPos\030\001 \001(\002\022\014\n\004yPos\030\002 \001(\002\"\033\n\013RegResp"
"\001(\r\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 \001(\005\"\033\n\013Co" "once\022\014\n\004data\030\001 \001(\005\"D\n\017ImgInfoResponce\022\022\n"
"mResponce\022\014\n\004data\030\001 \001(\014*\223\001\n\004TYPE\022\t\n\005iBOO" "\nlevelImage\030\001 \001(\r\022\r\n\005width\030\002 \001(\005\022\016\n\006heig"
"L\020\000\022\n\n\006iSHORT\020\001\022\013\n\007iUSHORT\020\002\022\010\n\004iINT\020\003\022\t" "ht\030\003 \001(\005\"\033\n\013ComResponce\022\014\n\004data\030\001 \001(\014*\223\001"
"\n\005iUINT\020\004\022\n\n\006iFLOAT\020\005\022\013\n\007iSTRING\020\006\022\t\n\005iC" "\n\004TYPE\022\t\n\005iBOOL\020\000\022\n\n\006iSHORT\020\001\022\013\n\007iUSHORT"
"HAR\020\007\022\n\n\006iUCHAR\020\010\022\t\n\005iWORD\020\t\022\013\n\007iDOUBLE\020" "\020\002\022\010\n\004iINT\020\003\022\t\n\005iUINT\020\004\022\n\n\006iFLOAT\020\005\022\013\n\007i"
"\n\022\n\n\006iTIMET\020\013**\n\nDATAHANDLE\022\n\n\006UPDATE\020\000\022" "STRING\020\006\022\t\n\005iCHAR\020\007\022\n\n\006iUCHAR\020\010\022\t\n\005iWORD"
"\007\n\003ADD\020\001\022\007\n\003DEL\020\0022\372\001\n\006Stream\0224\n\006Simple\022\023" "\020\t\022\013\n\007iDOUBLE\020\n\022\n\n\006iTIMET\020\013**\n\nDATAHANDL"
".stream.RequestInfo\032\023.stream.ResponseAny" "E\022\n\n\006UPDATE\020\000\022\007\n\003ADD\020\001\022\007\n\003DEL\020\0022\372\001\n\006Stre"
"\"\000\022=\n\014ServerStream\022\023.stream.RequestInfo\032" "am\0224\n\006Simple\022\023.stream.RequestInfo\032\023.stre"
"\024.stream.ResponseInfo\"\0000\001\022=\n\014ClientStrea" "am.ResponseAny\"\000\022=\n\014ServerStream\022\023.strea"
"m\022\023.stream.RequestInfo\032\024.stream.Response" "m.RequestInfo\032\024.stream.ResponseInfo\"\0000\001\022"
"Info\"\000(\001\022<\n\tAllStream\022\023.stream.RequestIn" "=\n\014ClientStream\022\023.stream.RequestInfo\032\024.s"
"fo\032\024.stream.ResponseInfo\"\000(\0010\001B-\n\027io.grp" "tream.ResponseInfo\"\000(\001\022<\n\tAllStream\022\023.st"
"c.examples.streamB\013StreamProtoP\001\242\002\002STb\006p" "ream.RequestInfo\032\024.stream.ResponseInfo\"\000"
"roto3" "(\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] = 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 = { const ::_pbi::DescriptorTable descriptor_table_stream_2eproto = {
false, false,
false, false,
1645, 1699,
descriptor_table_protodef_stream_2eproto, descriptor_table_protodef_stream_2eproto,
"stream.proto", "stream.proto",
&descriptor_table_stream_2eproto_once, &descriptor_table_stream_2eproto_once,
@ -582,6 +589,9 @@ ParamInfo::ParamInfo(const ParamInfo& from) : ::google::protobuf::Message() {
decltype(_impl_.isenable_){}, decltype(_impl_.isenable_){},
decltype(_impl_.isalarm_){}, decltype(_impl_.isalarm_){},
decltype(_impl_.isshow_){}, decltype(_impl_.isshow_){},
decltype(_impl_.startlayer_){},
decltype(_impl_.endlayer_){},
decltype(_impl_.powder_){},
/*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._cached_size_)*/ {},
}; };
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( _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()); _this->_impl_.context_.Set(from._internal_context(), _this->GetArenaForAllocation());
} }
::memcpy(&_impl_.valuetype_, &from._impl_.valuetype_, ::memcpy(&_impl_.valuetype_, &from._impl_.valuetype_,
static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.isshow_) - static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.powder_) -
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.isshow_)); reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.powder_));
// @@protoc_insertion_point(copy_constructor:stream.ParamInfo) // @@protoc_insertion_point(copy_constructor:stream.ParamInfo)
} }
@ -623,6 +633,9 @@ inline void ParamInfo::SharedCtor(::_pb::Arena* arena) {
decltype(_impl_.isenable_){false}, decltype(_impl_.isenable_){false},
decltype(_impl_.isalarm_){false}, decltype(_impl_.isalarm_){false},
decltype(_impl_.isshow_){false}, decltype(_impl_.isshow_){false},
decltype(_impl_.startlayer_){0},
decltype(_impl_.endlayer_){0},
decltype(_impl_.powder_){0},
/*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._cached_size_)*/ {},
}; };
_impl_.namekey_.InitDefault(); _impl_.namekey_.InitDefault();
@ -663,8 +676,8 @@ PROTOBUF_NOINLINE void ParamInfo::Clear() {
_impl_.strvalue_.ClearToEmpty(); _impl_.strvalue_.ClearToEmpty();
_impl_.context_.ClearToEmpty(); _impl_.context_.ClearToEmpty();
::memset(&_impl_.valuetype_, 0, static_cast<::size_t>( ::memset(&_impl_.valuetype_, 0, static_cast<::size_t>(
reinterpret_cast<char*>(&_impl_.isshow_) - reinterpret_cast<char*>(&_impl_.powder_) -
reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.isshow_)); reinterpret_cast<char*>(&_impl_.valuetype_)) + sizeof(_impl_.powder_));
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
} }
@ -676,15 +689,15 @@ const char* ParamInfo::_InternalParse(
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 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 _has_bits_
0, // no _extensions_ 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), offsetof(decltype(_table_), field_lookup_table),
4294967168, // skipmap 4294966272, // skipmap
offsetof(decltype(_table_), field_entries), offsetof(decltype(_table_), field_entries),
7, // num_field_entries 10, // num_field_entries
0, // num_aux_entries 0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries offsetof(decltype(_table_), field_names), // no aux_entries
&_ParamInfo_default_instance_._instance, &_ParamInfo_default_instance_._instance,
@ -712,6 +725,20 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
// bool isShow = 7; // bool isShow = 7;
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(ParamInfo, _impl_.isshow_), 63>(), {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(ParamInfo, _impl_.isshow_), 63>(),
{56, 63, 0, PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_)}}, {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 65535, 65535
}}, {{ }}, {{
@ -736,6 +763,15 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
// bool isShow = 7; // bool isShow = 7;
{PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_), 0, 0, {PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBool)}, (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 // no aux_entries
{{ {{
@ -795,6 +831,32 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
7, this->_internal_isshow(), target); 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())) { if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
@ -851,6 +913,28 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> ParamInfo::_table_ = {
total_size += 2; 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_); 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) { if (from._internal_isshow() != 0) {
_this->_internal_set_isshow(from._internal_isshow()); _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_); _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, ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.context_, lhs_arena,
&other->_impl_.context_, rhs_arena); &other->_impl_.context_, rhs_arena);
::google::protobuf::internal::memswap< ::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.isshow_) PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.powder_)
+ sizeof(ParamInfo::_impl_.isshow_) + sizeof(ParamInfo::_impl_.powder_)
- PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.valuetype_)>( - PROTOBUF_FIELD_OFFSET(ParamInfo, _impl_.valuetype_)>(
reinterpret_cast<char*>(&_impl_.valuetype_), reinterpret_cast<char*>(&_impl_.valuetype_),
reinterpret_cast<char*>(&other->_impl_.valuetype_)); reinterpret_cast<char*>(&other->_impl_.valuetype_));

View File

@ -315,6 +315,9 @@ class ParamInfo final :
kIsEnableFieldNumber = 5, kIsEnableFieldNumber = 5,
kIsAlarmFieldNumber = 6, kIsAlarmFieldNumber = 6,
kIsShowFieldNumber = 7, kIsShowFieldNumber = 7,
kStartLayerFieldNumber = 8,
kEndLayerFieldNumber = 9,
kPowderFieldNumber = 10,
}; };
// bytes nameKey = 1; // bytes nameKey = 1;
void clear_namekey() ; void clear_namekey() ;
@ -403,13 +406,43 @@ class ParamInfo final :
bool _internal_isshow() const; bool _internal_isshow() const;
void _internal_set_isshow(bool value); 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: public:
// @@protoc_insertion_point(class_scope:stream.ParamInfo) // @@protoc_insertion_point(class_scope:stream.ParamInfo)
private: private:
class _Internal; class _Internal;
friend class ::google::protobuf::internal::TcParser; 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; template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
typedef void InternalArenaConstructable_; typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_; typedef void DestructorSkippable_;
@ -421,6 +454,9 @@ class ParamInfo final :
bool isenable_; bool isenable_;
bool isalarm_; bool isalarm_;
bool isshow_; bool isshow_;
::int32_t startlayer_;
::int32_t endlayer_;
float powder_;
mutable ::google::protobuf::internal::CachedSize _cached_size_; mutable ::google::protobuf::internal::CachedSize _cached_size_;
PROTOBUF_TSAN_DECLARE_MEMBER PROTOBUF_TSAN_DECLARE_MEMBER
}; };
@ -2771,6 +2807,72 @@ inline void ParamInfo::_internal_set_isshow(bool value) {
_impl_.isshow_ = 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 // RequestInfo

View File

@ -44,6 +44,10 @@ message ParamInfo{
bool isEnable = 5; bool isEnable = 5;
bool isAlarm = 6; bool isAlarm = 6;
bool isShow = 7; bool isShow = 7;
int32 startLayer = 8; //使 struct PowderSet
int32 endLayer = 9;
float powder = 10;
} }
message RequestInfo { // message RequestInfo { //