measure_message.pb.cc 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: measure_message.proto
  3. #include "measure_message.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_message_5fbase_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_message_5fbase_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Base_info;
  20. extern PROTOBUF_INTERNAL_EXPORT_protobuf_message_5fbase_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Error_manager;
  21. extern PROTOBUF_INTERNAL_EXPORT_protobuf_message_5fbase_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Locate_information;
  22. } // namespace protobuf_message_5fbase_2eproto
  23. namespace message {
  24. class Measure_status_msgDefaultTypeInternal {
  25. public:
  26. ::google::protobuf::internal::ExplicitlyConstructed<Measure_status_msg>
  27. _instance;
  28. } _Measure_status_msg_default_instance_;
  29. class Measure_request_msgDefaultTypeInternal {
  30. public:
  31. ::google::protobuf::internal::ExplicitlyConstructed<Measure_request_msg>
  32. _instance;
  33. } _Measure_request_msg_default_instance_;
  34. class Measure_response_msgDefaultTypeInternal {
  35. public:
  36. ::google::protobuf::internal::ExplicitlyConstructed<Measure_response_msg>
  37. _instance;
  38. } _Measure_response_msg_default_instance_;
  39. } // namespace message
  40. namespace protobuf_measure_5fmessage_2eproto {
  41. static void InitDefaultsMeasure_status_msg() {
  42. GOOGLE_PROTOBUF_VERIFY_VERSION;
  43. {
  44. void* ptr = &::message::_Measure_status_msg_default_instance_;
  45. new (ptr) ::message::Measure_status_msg();
  46. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  47. }
  48. ::message::Measure_status_msg::InitAsDefaultInstance();
  49. }
  50. ::google::protobuf::internal::SCCInfo<3> scc_info_Measure_status_msg =
  51. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsMeasure_status_msg}, {
  52. &protobuf_message_5fbase_2eproto::scc_info_Base_info.base,
  53. &protobuf_message_5fbase_2eproto::scc_info_Locate_information.base,
  54. &protobuf_message_5fbase_2eproto::scc_info_Error_manager.base,}};
  55. static void InitDefaultsMeasure_request_msg() {
  56. GOOGLE_PROTOBUF_VERIFY_VERSION;
  57. {
  58. void* ptr = &::message::_Measure_request_msg_default_instance_;
  59. new (ptr) ::message::Measure_request_msg();
  60. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  61. }
  62. ::message::Measure_request_msg::InitAsDefaultInstance();
  63. }
  64. ::google::protobuf::internal::SCCInfo<1> scc_info_Measure_request_msg =
  65. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMeasure_request_msg}, {
  66. &protobuf_message_5fbase_2eproto::scc_info_Base_info.base,}};
  67. static void InitDefaultsMeasure_response_msg() {
  68. GOOGLE_PROTOBUF_VERIFY_VERSION;
  69. {
  70. void* ptr = &::message::_Measure_response_msg_default_instance_;
  71. new (ptr) ::message::Measure_response_msg();
  72. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  73. }
  74. ::message::Measure_response_msg::InitAsDefaultInstance();
  75. }
  76. ::google::protobuf::internal::SCCInfo<3> scc_info_Measure_response_msg =
  77. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsMeasure_response_msg}, {
  78. &protobuf_message_5fbase_2eproto::scc_info_Base_info.base,
  79. &protobuf_message_5fbase_2eproto::scc_info_Locate_information.base,
  80. &protobuf_message_5fbase_2eproto::scc_info_Error_manager.base,}};
  81. void InitDefaults() {
  82. ::google::protobuf::internal::InitSCC(&scc_info_Measure_status_msg.base);
  83. ::google::protobuf::internal::InitSCC(&scc_info_Measure_request_msg.base);
  84. ::google::protobuf::internal::InitSCC(&scc_info_Measure_response_msg.base);
  85. }
  86. ::google::protobuf::Metadata file_level_metadata[3];
  87. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[3];
  88. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  89. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, _has_bits_),
  90. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, _internal_metadata_),
  91. ~0u, // no _extensions_
  92. ~0u, // no _oneof_case_
  93. ~0u, // no _weak_field_map_
  94. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, base_info_),
  95. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, terminal_id_),
  96. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, laser_manager_status_),
  97. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, laser_statu_vector_),
  98. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, locate_manager_status_),
  99. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, locate_information_realtime_),
  100. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, error_manager_),
  101. 0,
  102. 3,
  103. 4,
  104. ~0u,
  105. 5,
  106. 1,
  107. 2,
  108. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_request_msg, _has_bits_),
  109. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_request_msg, _internal_metadata_),
  110. ~0u, // no _extensions_
  111. ~0u, // no _oneof_case_
  112. ~0u, // no _weak_field_map_
  113. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_request_msg, base_info_),
  114. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_request_msg, command_key_),
  115. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_request_msg, terminal_id_),
  116. 1,
  117. 0,
  118. 2,
  119. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, _has_bits_),
  120. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, _internal_metadata_),
  121. ~0u, // no _extensions_
  122. ~0u, // no _oneof_case_
  123. ~0u, // no _weak_field_map_
  124. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, base_info_),
  125. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, command_key_),
  126. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, terminal_id_),
  127. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, locate_information_),
  128. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, error_manager_),
  129. 1,
  130. 0,
  131. 4,
  132. 2,
  133. 3,
  134. };
  135. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  136. { 0, 12, sizeof(::message::Measure_status_msg)},
  137. { 19, 27, sizeof(::message::Measure_request_msg)},
  138. { 30, 40, sizeof(::message::Measure_response_msg)},
  139. };
  140. static ::google::protobuf::Message const * const file_default_instances[] = {
  141. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Measure_status_msg_default_instance_),
  142. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Measure_request_msg_default_instance_),
  143. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Measure_response_msg_default_instance_),
  144. };
  145. void protobuf_AssignDescriptors() {
  146. AddDescriptors();
  147. AssignDescriptors(
  148. "measure_message.proto", schemas, file_default_instances, TableStruct::offsets,
  149. file_level_metadata, file_level_enum_descriptors, NULL);
  150. }
  151. void protobuf_AssignDescriptorsOnce() {
  152. static ::google::protobuf::internal::once_flag once;
  153. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  154. }
  155. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  156. void protobuf_RegisterTypes(const ::std::string&) {
  157. protobuf_AssignDescriptorsOnce();
  158. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
  159. }
  160. void AddDescriptorsImpl() {
  161. InitDefaults();
  162. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  163. "\n\025measure_message.proto\022\007message\032\022messag"
  164. "e_base.proto\"\357\002\n\022Measure_status_msg\022%\n\tb"
  165. "ase_info\030\001 \002(\0132\022.message.Base_info\022\023\n\013te"
  166. "rminal_id\030\002 \002(\005\022;\n\024laser_manager_status\030"
  167. "\003 \002(\0162\035.message.Laser_manager_status\0220\n\022"
  168. "laser_statu_vector\030\004 \003(\0162\024.message.Laser"
  169. "_statu\022=\n\025locate_manager_status\030\005 \002(\0162\036."
  170. "message.Locate_manager_status\022@\n\033locate_"
  171. "information_realtime\030\006 \001(\0132\033.message.Loc"
  172. "ate_information\022-\n\rerror_manager\030\007 \002(\0132\026"
  173. ".message.Error_manager\"f\n\023Measure_reques"
  174. "t_msg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_"
  175. "info\022\023\n\013command_key\030\002 \002(\t\022\023\n\013terminal_id"
  176. "\030\003 \002(\005\"\317\001\n\024Measure_response_msg\022%\n\tbase_"
  177. "info\030\001 \002(\0132\022.message.Base_info\022\023\n\013comman"
  178. "d_key\030\002 \002(\t\022\023\n\013terminal_id\030\003 \002(\005\0227\n\022loca"
  179. "te_information\030\004 \001(\0132\033.message.Locate_in"
  180. "formation\022-\n\rerror_manager\030\005 \002(\0132\026.messa"
  181. "ge.Error_manager*\237\001\n\024Laser_manager_statu"
  182. "s\022\030\n\024LASER_MANAGER_UNKNOW\020\000\022\027\n\023LASER_MAN"
  183. "AGER_READY\020\001\022\035\n\031LASER_MANAGER_ISSUED_TAS"
  184. "K\020\002\022\034\n\030LASER_MANAGER_WAIT_REPLY\020\003\022\027\n\023LAS"
  185. "ER_MANAGER_FAULT\020\004*U\n\013Laser_statu\022\024\n\020LAS"
  186. "ER_DISCONNECT\020\000\022\017\n\013LASER_READY\020\001\022\016\n\nLASE"
  187. "R_BUSY\020\002\022\017\n\013LASER_FAULT\020\003*\261\001\n\025Locate_man"
  188. "ager_status\022\031\n\025LOCATE_MANAGER_UNKNOW\020\000\022\030"
  189. "\n\024LOCATE_MANAGER_READY\020\001\022\027\n\023LOCATE_MANAG"
  190. "ER_SIFT\020\002\022\026\n\022LOCATE_MANAGER_CAR\020\003\022\030\n\024LOC"
  191. "ATE_MANAGER_WHEEL\020\004\022\030\n\024LOCATE_MANAGER_FA"
  192. "ULT\020\005"
  193. };
  194. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  195. descriptor, 1165);
  196. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  197. "measure_message.proto", &protobuf_RegisterTypes);
  198. ::protobuf_message_5fbase_2eproto::AddDescriptors();
  199. }
  200. void AddDescriptors() {
  201. static ::google::protobuf::internal::once_flag once;
  202. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  203. }
  204. // Force AddDescriptors() to be called at dynamic initialization time.
  205. struct StaticDescriptorInitializer {
  206. StaticDescriptorInitializer() {
  207. AddDescriptors();
  208. }
  209. } static_descriptor_initializer;
  210. } // namespace protobuf_measure_5fmessage_2eproto
  211. namespace message {
  212. const ::google::protobuf::EnumDescriptor* Laser_manager_status_descriptor() {
  213. protobuf_measure_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  214. return protobuf_measure_5fmessage_2eproto::file_level_enum_descriptors[0];
  215. }
  216. bool Laser_manager_status_IsValid(int value) {
  217. switch (value) {
  218. case 0:
  219. case 1:
  220. case 2:
  221. case 3:
  222. case 4:
  223. return true;
  224. default:
  225. return false;
  226. }
  227. }
  228. const ::google::protobuf::EnumDescriptor* Laser_statu_descriptor() {
  229. protobuf_measure_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  230. return protobuf_measure_5fmessage_2eproto::file_level_enum_descriptors[1];
  231. }
  232. bool Laser_statu_IsValid(int value) {
  233. switch (value) {
  234. case 0:
  235. case 1:
  236. case 2:
  237. case 3:
  238. return true;
  239. default:
  240. return false;
  241. }
  242. }
  243. const ::google::protobuf::EnumDescriptor* Locate_manager_status_descriptor() {
  244. protobuf_measure_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  245. return protobuf_measure_5fmessage_2eproto::file_level_enum_descriptors[2];
  246. }
  247. bool Locate_manager_status_IsValid(int value) {
  248. switch (value) {
  249. case 0:
  250. case 1:
  251. case 2:
  252. case 3:
  253. case 4:
  254. case 5:
  255. return true;
  256. default:
  257. return false;
  258. }
  259. }
  260. // ===================================================================
  261. void Measure_status_msg::InitAsDefaultInstance() {
  262. ::message::_Measure_status_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
  263. ::message::Base_info::internal_default_instance());
  264. ::message::_Measure_status_msg_default_instance_._instance.get_mutable()->locate_information_realtime_ = const_cast< ::message::Locate_information*>(
  265. ::message::Locate_information::internal_default_instance());
  266. ::message::_Measure_status_msg_default_instance_._instance.get_mutable()->error_manager_ = const_cast< ::message::Error_manager*>(
  267. ::message::Error_manager::internal_default_instance());
  268. }
  269. void Measure_status_msg::clear_base_info() {
  270. if (base_info_ != NULL) base_info_->Clear();
  271. clear_has_base_info();
  272. }
  273. void Measure_status_msg::clear_locate_information_realtime() {
  274. if (locate_information_realtime_ != NULL) locate_information_realtime_->Clear();
  275. clear_has_locate_information_realtime();
  276. }
  277. void Measure_status_msg::clear_error_manager() {
  278. if (error_manager_ != NULL) error_manager_->Clear();
  279. clear_has_error_manager();
  280. }
  281. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  282. const int Measure_status_msg::kBaseInfoFieldNumber;
  283. const int Measure_status_msg::kTerminalIdFieldNumber;
  284. const int Measure_status_msg::kLaserManagerStatusFieldNumber;
  285. const int Measure_status_msg::kLaserStatuVectorFieldNumber;
  286. const int Measure_status_msg::kLocateManagerStatusFieldNumber;
  287. const int Measure_status_msg::kLocateInformationRealtimeFieldNumber;
  288. const int Measure_status_msg::kErrorManagerFieldNumber;
  289. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  290. Measure_status_msg::Measure_status_msg()
  291. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  292. ::google::protobuf::internal::InitSCC(
  293. &protobuf_measure_5fmessage_2eproto::scc_info_Measure_status_msg.base);
  294. SharedCtor();
  295. // @@protoc_insertion_point(constructor:message.Measure_status_msg)
  296. }
  297. Measure_status_msg::Measure_status_msg(const Measure_status_msg& from)
  298. : ::google::protobuf::Message(),
  299. _internal_metadata_(NULL),
  300. _has_bits_(from._has_bits_),
  301. laser_statu_vector_(from.laser_statu_vector_) {
  302. _internal_metadata_.MergeFrom(from._internal_metadata_);
  303. if (from.has_base_info()) {
  304. base_info_ = new ::message::Base_info(*from.base_info_);
  305. } else {
  306. base_info_ = NULL;
  307. }
  308. if (from.has_locate_information_realtime()) {
  309. locate_information_realtime_ = new ::message::Locate_information(*from.locate_information_realtime_);
  310. } else {
  311. locate_information_realtime_ = NULL;
  312. }
  313. if (from.has_error_manager()) {
  314. error_manager_ = new ::message::Error_manager(*from.error_manager_);
  315. } else {
  316. error_manager_ = NULL;
  317. }
  318. ::memcpy(&terminal_id_, &from.terminal_id_,
  319. static_cast<size_t>(reinterpret_cast<char*>(&locate_manager_status_) -
  320. reinterpret_cast<char*>(&terminal_id_)) + sizeof(locate_manager_status_));
  321. // @@protoc_insertion_point(copy_constructor:message.Measure_status_msg)
  322. }
  323. void Measure_status_msg::SharedCtor() {
  324. ::memset(&base_info_, 0, static_cast<size_t>(
  325. reinterpret_cast<char*>(&locate_manager_status_) -
  326. reinterpret_cast<char*>(&base_info_)) + sizeof(locate_manager_status_));
  327. }
  328. Measure_status_msg::~Measure_status_msg() {
  329. // @@protoc_insertion_point(destructor:message.Measure_status_msg)
  330. SharedDtor();
  331. }
  332. void Measure_status_msg::SharedDtor() {
  333. if (this != internal_default_instance()) delete base_info_;
  334. if (this != internal_default_instance()) delete locate_information_realtime_;
  335. if (this != internal_default_instance()) delete error_manager_;
  336. }
  337. void Measure_status_msg::SetCachedSize(int size) const {
  338. _cached_size_.Set(size);
  339. }
  340. const ::google::protobuf::Descriptor* Measure_status_msg::descriptor() {
  341. ::protobuf_measure_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  342. return ::protobuf_measure_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  343. }
  344. const Measure_status_msg& Measure_status_msg::default_instance() {
  345. ::google::protobuf::internal::InitSCC(&protobuf_measure_5fmessage_2eproto::scc_info_Measure_status_msg.base);
  346. return *internal_default_instance();
  347. }
  348. void Measure_status_msg::Clear() {
  349. // @@protoc_insertion_point(message_clear_start:message.Measure_status_msg)
  350. ::google::protobuf::uint32 cached_has_bits = 0;
  351. // Prevent compiler warnings about cached_has_bits being unused
  352. (void) cached_has_bits;
  353. laser_statu_vector_.Clear();
  354. cached_has_bits = _has_bits_[0];
  355. if (cached_has_bits & 7u) {
  356. if (cached_has_bits & 0x00000001u) {
  357. GOOGLE_DCHECK(base_info_ != NULL);
  358. base_info_->Clear();
  359. }
  360. if (cached_has_bits & 0x00000002u) {
  361. GOOGLE_DCHECK(locate_information_realtime_ != NULL);
  362. locate_information_realtime_->Clear();
  363. }
  364. if (cached_has_bits & 0x00000004u) {
  365. GOOGLE_DCHECK(error_manager_ != NULL);
  366. error_manager_->Clear();
  367. }
  368. }
  369. if (cached_has_bits & 56u) {
  370. ::memset(&terminal_id_, 0, static_cast<size_t>(
  371. reinterpret_cast<char*>(&locate_manager_status_) -
  372. reinterpret_cast<char*>(&terminal_id_)) + sizeof(locate_manager_status_));
  373. }
  374. _has_bits_.Clear();
  375. _internal_metadata_.Clear();
  376. }
  377. bool Measure_status_msg::MergePartialFromCodedStream(
  378. ::google::protobuf::io::CodedInputStream* input) {
  379. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  380. ::google::protobuf::uint32 tag;
  381. // @@protoc_insertion_point(parse_start:message.Measure_status_msg)
  382. for (;;) {
  383. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  384. tag = p.first;
  385. if (!p.second) goto handle_unusual;
  386. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  387. // required .message.Base_info base_info = 1;
  388. case 1: {
  389. if (static_cast< ::google::protobuf::uint8>(tag) ==
  390. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  391. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  392. input, mutable_base_info()));
  393. } else {
  394. goto handle_unusual;
  395. }
  396. break;
  397. }
  398. // required int32 terminal_id = 2;
  399. case 2: {
  400. if (static_cast< ::google::protobuf::uint8>(tag) ==
  401. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  402. set_has_terminal_id();
  403. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  404. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  405. input, &terminal_id_)));
  406. } else {
  407. goto handle_unusual;
  408. }
  409. break;
  410. }
  411. // required .message.Laser_manager_status laser_manager_status = 3;
  412. case 3: {
  413. if (static_cast< ::google::protobuf::uint8>(tag) ==
  414. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  415. int value;
  416. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  417. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  418. input, &value)));
  419. if (::message::Laser_manager_status_IsValid(value)) {
  420. set_laser_manager_status(static_cast< ::message::Laser_manager_status >(value));
  421. } else {
  422. mutable_unknown_fields()->AddVarint(
  423. 3, static_cast< ::google::protobuf::uint64>(value));
  424. }
  425. } else {
  426. goto handle_unusual;
  427. }
  428. break;
  429. }
  430. // repeated .message.Laser_statu laser_statu_vector = 4;
  431. case 4: {
  432. if (static_cast< ::google::protobuf::uint8>(tag) ==
  433. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  434. int value;
  435. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  436. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  437. input, &value)));
  438. if (::message::Laser_statu_IsValid(value)) {
  439. add_laser_statu_vector(static_cast< ::message::Laser_statu >(value));
  440. } else {
  441. mutable_unknown_fields()->AddVarint(
  442. 4, static_cast< ::google::protobuf::uint64>(value));
  443. }
  444. } else if (
  445. static_cast< ::google::protobuf::uint8>(tag) ==
  446. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  447. DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
  448. input,
  449. 4,
  450. ::message::Laser_statu_IsValid,
  451. mutable_unknown_fields(),
  452. this->mutable_laser_statu_vector())));
  453. } else {
  454. goto handle_unusual;
  455. }
  456. break;
  457. }
  458. // required .message.Locate_manager_status locate_manager_status = 5;
  459. case 5: {
  460. if (static_cast< ::google::protobuf::uint8>(tag) ==
  461. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  462. int value;
  463. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  464. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  465. input, &value)));
  466. if (::message::Locate_manager_status_IsValid(value)) {
  467. set_locate_manager_status(static_cast< ::message::Locate_manager_status >(value));
  468. } else {
  469. mutable_unknown_fields()->AddVarint(
  470. 5, static_cast< ::google::protobuf::uint64>(value));
  471. }
  472. } else {
  473. goto handle_unusual;
  474. }
  475. break;
  476. }
  477. // optional .message.Locate_information locate_information_realtime = 6;
  478. case 6: {
  479. if (static_cast< ::google::protobuf::uint8>(tag) ==
  480. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  481. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  482. input, mutable_locate_information_realtime()));
  483. } else {
  484. goto handle_unusual;
  485. }
  486. break;
  487. }
  488. // required .message.Error_manager error_manager = 7;
  489. case 7: {
  490. if (static_cast< ::google::protobuf::uint8>(tag) ==
  491. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  492. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  493. input, mutable_error_manager()));
  494. } else {
  495. goto handle_unusual;
  496. }
  497. break;
  498. }
  499. default: {
  500. handle_unusual:
  501. if (tag == 0) {
  502. goto success;
  503. }
  504. DO_(::google::protobuf::internal::WireFormat::SkipField(
  505. input, tag, _internal_metadata_.mutable_unknown_fields()));
  506. break;
  507. }
  508. }
  509. }
  510. success:
  511. // @@protoc_insertion_point(parse_success:message.Measure_status_msg)
  512. return true;
  513. failure:
  514. // @@protoc_insertion_point(parse_failure:message.Measure_status_msg)
  515. return false;
  516. #undef DO_
  517. }
  518. void Measure_status_msg::SerializeWithCachedSizes(
  519. ::google::protobuf::io::CodedOutputStream* output) const {
  520. // @@protoc_insertion_point(serialize_start:message.Measure_status_msg)
  521. ::google::protobuf::uint32 cached_has_bits = 0;
  522. (void) cached_has_bits;
  523. cached_has_bits = _has_bits_[0];
  524. // required .message.Base_info base_info = 1;
  525. if (cached_has_bits & 0x00000001u) {
  526. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  527. 1, this->_internal_base_info(), output);
  528. }
  529. // required int32 terminal_id = 2;
  530. if (cached_has_bits & 0x00000008u) {
  531. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->terminal_id(), output);
  532. }
  533. // required .message.Laser_manager_status laser_manager_status = 3;
  534. if (cached_has_bits & 0x00000010u) {
  535. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  536. 3, this->laser_manager_status(), output);
  537. }
  538. // repeated .message.Laser_statu laser_statu_vector = 4;
  539. for (int i = 0, n = this->laser_statu_vector_size(); i < n; i++) {
  540. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  541. 4, this->laser_statu_vector(i), output);
  542. }
  543. // required .message.Locate_manager_status locate_manager_status = 5;
  544. if (cached_has_bits & 0x00000020u) {
  545. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  546. 5, this->locate_manager_status(), output);
  547. }
  548. // optional .message.Locate_information locate_information_realtime = 6;
  549. if (cached_has_bits & 0x00000002u) {
  550. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  551. 6, this->_internal_locate_information_realtime(), output);
  552. }
  553. // required .message.Error_manager error_manager = 7;
  554. if (cached_has_bits & 0x00000004u) {
  555. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  556. 7, this->_internal_error_manager(), output);
  557. }
  558. if (_internal_metadata_.have_unknown_fields()) {
  559. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  560. _internal_metadata_.unknown_fields(), output);
  561. }
  562. // @@protoc_insertion_point(serialize_end:message.Measure_status_msg)
  563. }
  564. ::google::protobuf::uint8* Measure_status_msg::InternalSerializeWithCachedSizesToArray(
  565. bool deterministic, ::google::protobuf::uint8* target) const {
  566. (void)deterministic; // Unused
  567. // @@protoc_insertion_point(serialize_to_array_start:message.Measure_status_msg)
  568. ::google::protobuf::uint32 cached_has_bits = 0;
  569. (void) cached_has_bits;
  570. cached_has_bits = _has_bits_[0];
  571. // required .message.Base_info base_info = 1;
  572. if (cached_has_bits & 0x00000001u) {
  573. target = ::google::protobuf::internal::WireFormatLite::
  574. InternalWriteMessageToArray(
  575. 1, this->_internal_base_info(), deterministic, target);
  576. }
  577. // required int32 terminal_id = 2;
  578. if (cached_has_bits & 0x00000008u) {
  579. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->terminal_id(), target);
  580. }
  581. // required .message.Laser_manager_status laser_manager_status = 3;
  582. if (cached_has_bits & 0x00000010u) {
  583. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  584. 3, this->laser_manager_status(), target);
  585. }
  586. // repeated .message.Laser_statu laser_statu_vector = 4;
  587. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  588. 4, this->laser_statu_vector_, target);
  589. // required .message.Locate_manager_status locate_manager_status = 5;
  590. if (cached_has_bits & 0x00000020u) {
  591. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  592. 5, this->locate_manager_status(), target);
  593. }
  594. // optional .message.Locate_information locate_information_realtime = 6;
  595. if (cached_has_bits & 0x00000002u) {
  596. target = ::google::protobuf::internal::WireFormatLite::
  597. InternalWriteMessageToArray(
  598. 6, this->_internal_locate_information_realtime(), deterministic, target);
  599. }
  600. // required .message.Error_manager error_manager = 7;
  601. if (cached_has_bits & 0x00000004u) {
  602. target = ::google::protobuf::internal::WireFormatLite::
  603. InternalWriteMessageToArray(
  604. 7, this->_internal_error_manager(), deterministic, target);
  605. }
  606. if (_internal_metadata_.have_unknown_fields()) {
  607. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  608. _internal_metadata_.unknown_fields(), target);
  609. }
  610. // @@protoc_insertion_point(serialize_to_array_end:message.Measure_status_msg)
  611. return target;
  612. }
  613. size_t Measure_status_msg::RequiredFieldsByteSizeFallback() const {
  614. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Measure_status_msg)
  615. size_t total_size = 0;
  616. if (has_base_info()) {
  617. // required .message.Base_info base_info = 1;
  618. total_size += 1 +
  619. ::google::protobuf::internal::WireFormatLite::MessageSize(
  620. *base_info_);
  621. }
  622. if (has_error_manager()) {
  623. // required .message.Error_manager error_manager = 7;
  624. total_size += 1 +
  625. ::google::protobuf::internal::WireFormatLite::MessageSize(
  626. *error_manager_);
  627. }
  628. if (has_terminal_id()) {
  629. // required int32 terminal_id = 2;
  630. total_size += 1 +
  631. ::google::protobuf::internal::WireFormatLite::Int32Size(
  632. this->terminal_id());
  633. }
  634. if (has_laser_manager_status()) {
  635. // required .message.Laser_manager_status laser_manager_status = 3;
  636. total_size += 1 +
  637. ::google::protobuf::internal::WireFormatLite::EnumSize(this->laser_manager_status());
  638. }
  639. if (has_locate_manager_status()) {
  640. // required .message.Locate_manager_status locate_manager_status = 5;
  641. total_size += 1 +
  642. ::google::protobuf::internal::WireFormatLite::EnumSize(this->locate_manager_status());
  643. }
  644. return total_size;
  645. }
  646. size_t Measure_status_msg::ByteSizeLong() const {
  647. // @@protoc_insertion_point(message_byte_size_start:message.Measure_status_msg)
  648. size_t total_size = 0;
  649. if (_internal_metadata_.have_unknown_fields()) {
  650. total_size +=
  651. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  652. _internal_metadata_.unknown_fields());
  653. }
  654. if (((_has_bits_[0] & 0x0000003d) ^ 0x0000003d) == 0) { // All required fields are present.
  655. // required .message.Base_info base_info = 1;
  656. total_size += 1 +
  657. ::google::protobuf::internal::WireFormatLite::MessageSize(
  658. *base_info_);
  659. // required .message.Error_manager error_manager = 7;
  660. total_size += 1 +
  661. ::google::protobuf::internal::WireFormatLite::MessageSize(
  662. *error_manager_);
  663. // required int32 terminal_id = 2;
  664. total_size += 1 +
  665. ::google::protobuf::internal::WireFormatLite::Int32Size(
  666. this->terminal_id());
  667. // required .message.Laser_manager_status laser_manager_status = 3;
  668. total_size += 1 +
  669. ::google::protobuf::internal::WireFormatLite::EnumSize(this->laser_manager_status());
  670. // required .message.Locate_manager_status locate_manager_status = 5;
  671. total_size += 1 +
  672. ::google::protobuf::internal::WireFormatLite::EnumSize(this->locate_manager_status());
  673. } else {
  674. total_size += RequiredFieldsByteSizeFallback();
  675. }
  676. // repeated .message.Laser_statu laser_statu_vector = 4;
  677. {
  678. size_t data_size = 0;
  679. unsigned int count = static_cast<unsigned int>(this->laser_statu_vector_size());for (unsigned int i = 0; i < count; i++) {
  680. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  681. this->laser_statu_vector(static_cast<int>(i)));
  682. }
  683. total_size += (1UL * count) + data_size;
  684. }
  685. // optional .message.Locate_information locate_information_realtime = 6;
  686. if (has_locate_information_realtime()) {
  687. total_size += 1 +
  688. ::google::protobuf::internal::WireFormatLite::MessageSize(
  689. *locate_information_realtime_);
  690. }
  691. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  692. SetCachedSize(cached_size);
  693. return total_size;
  694. }
  695. void Measure_status_msg::MergeFrom(const ::google::protobuf::Message& from) {
  696. // @@protoc_insertion_point(generalized_merge_from_start:message.Measure_status_msg)
  697. GOOGLE_DCHECK_NE(&from, this);
  698. const Measure_status_msg* source =
  699. ::google::protobuf::internal::DynamicCastToGenerated<const Measure_status_msg>(
  700. &from);
  701. if (source == NULL) {
  702. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Measure_status_msg)
  703. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  704. } else {
  705. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Measure_status_msg)
  706. MergeFrom(*source);
  707. }
  708. }
  709. void Measure_status_msg::MergeFrom(const Measure_status_msg& from) {
  710. // @@protoc_insertion_point(class_specific_merge_from_start:message.Measure_status_msg)
  711. GOOGLE_DCHECK_NE(&from, this);
  712. _internal_metadata_.MergeFrom(from._internal_metadata_);
  713. ::google::protobuf::uint32 cached_has_bits = 0;
  714. (void) cached_has_bits;
  715. laser_statu_vector_.MergeFrom(from.laser_statu_vector_);
  716. cached_has_bits = from._has_bits_[0];
  717. if (cached_has_bits & 63u) {
  718. if (cached_has_bits & 0x00000001u) {
  719. mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
  720. }
  721. if (cached_has_bits & 0x00000002u) {
  722. mutable_locate_information_realtime()->::message::Locate_information::MergeFrom(from.locate_information_realtime());
  723. }
  724. if (cached_has_bits & 0x00000004u) {
  725. mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
  726. }
  727. if (cached_has_bits & 0x00000008u) {
  728. terminal_id_ = from.terminal_id_;
  729. }
  730. if (cached_has_bits & 0x00000010u) {
  731. laser_manager_status_ = from.laser_manager_status_;
  732. }
  733. if (cached_has_bits & 0x00000020u) {
  734. locate_manager_status_ = from.locate_manager_status_;
  735. }
  736. _has_bits_[0] |= cached_has_bits;
  737. }
  738. }
  739. void Measure_status_msg::CopyFrom(const ::google::protobuf::Message& from) {
  740. // @@protoc_insertion_point(generalized_copy_from_start:message.Measure_status_msg)
  741. if (&from == this) return;
  742. Clear();
  743. MergeFrom(from);
  744. }
  745. void Measure_status_msg::CopyFrom(const Measure_status_msg& from) {
  746. // @@protoc_insertion_point(class_specific_copy_from_start:message.Measure_status_msg)
  747. if (&from == this) return;
  748. Clear();
  749. MergeFrom(from);
  750. }
  751. bool Measure_status_msg::IsInitialized() const {
  752. if ((_has_bits_[0] & 0x0000003d) != 0x0000003d) return false;
  753. if (has_base_info()) {
  754. if (!this->base_info_->IsInitialized()) return false;
  755. }
  756. if (has_error_manager()) {
  757. if (!this->error_manager_->IsInitialized()) return false;
  758. }
  759. return true;
  760. }
  761. void Measure_status_msg::Swap(Measure_status_msg* other) {
  762. if (other == this) return;
  763. InternalSwap(other);
  764. }
  765. void Measure_status_msg::InternalSwap(Measure_status_msg* other) {
  766. using std::swap;
  767. laser_statu_vector_.InternalSwap(&other->laser_statu_vector_);
  768. swap(base_info_, other->base_info_);
  769. swap(locate_information_realtime_, other->locate_information_realtime_);
  770. swap(error_manager_, other->error_manager_);
  771. swap(terminal_id_, other->terminal_id_);
  772. swap(laser_manager_status_, other->laser_manager_status_);
  773. swap(locate_manager_status_, other->locate_manager_status_);
  774. swap(_has_bits_[0], other->_has_bits_[0]);
  775. _internal_metadata_.Swap(&other->_internal_metadata_);
  776. }
  777. ::google::protobuf::Metadata Measure_status_msg::GetMetadata() const {
  778. protobuf_measure_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  779. return ::protobuf_measure_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  780. }
  781. // ===================================================================
  782. void Measure_request_msg::InitAsDefaultInstance() {
  783. ::message::_Measure_request_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
  784. ::message::Base_info::internal_default_instance());
  785. }
  786. void Measure_request_msg::clear_base_info() {
  787. if (base_info_ != NULL) base_info_->Clear();
  788. clear_has_base_info();
  789. }
  790. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  791. const int Measure_request_msg::kBaseInfoFieldNumber;
  792. const int Measure_request_msg::kCommandKeyFieldNumber;
  793. const int Measure_request_msg::kTerminalIdFieldNumber;
  794. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  795. Measure_request_msg::Measure_request_msg()
  796. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  797. ::google::protobuf::internal::InitSCC(
  798. &protobuf_measure_5fmessage_2eproto::scc_info_Measure_request_msg.base);
  799. SharedCtor();
  800. // @@protoc_insertion_point(constructor:message.Measure_request_msg)
  801. }
  802. Measure_request_msg::Measure_request_msg(const Measure_request_msg& from)
  803. : ::google::protobuf::Message(),
  804. _internal_metadata_(NULL),
  805. _has_bits_(from._has_bits_) {
  806. _internal_metadata_.MergeFrom(from._internal_metadata_);
  807. command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  808. if (from.has_command_key()) {
  809. command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
  810. }
  811. if (from.has_base_info()) {
  812. base_info_ = new ::message::Base_info(*from.base_info_);
  813. } else {
  814. base_info_ = NULL;
  815. }
  816. terminal_id_ = from.terminal_id_;
  817. // @@protoc_insertion_point(copy_constructor:message.Measure_request_msg)
  818. }
  819. void Measure_request_msg::SharedCtor() {
  820. command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  821. ::memset(&base_info_, 0, static_cast<size_t>(
  822. reinterpret_cast<char*>(&terminal_id_) -
  823. reinterpret_cast<char*>(&base_info_)) + sizeof(terminal_id_));
  824. }
  825. Measure_request_msg::~Measure_request_msg() {
  826. // @@protoc_insertion_point(destructor:message.Measure_request_msg)
  827. SharedDtor();
  828. }
  829. void Measure_request_msg::SharedDtor() {
  830. command_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  831. if (this != internal_default_instance()) delete base_info_;
  832. }
  833. void Measure_request_msg::SetCachedSize(int size) const {
  834. _cached_size_.Set(size);
  835. }
  836. const ::google::protobuf::Descriptor* Measure_request_msg::descriptor() {
  837. ::protobuf_measure_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  838. return ::protobuf_measure_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  839. }
  840. const Measure_request_msg& Measure_request_msg::default_instance() {
  841. ::google::protobuf::internal::InitSCC(&protobuf_measure_5fmessage_2eproto::scc_info_Measure_request_msg.base);
  842. return *internal_default_instance();
  843. }
  844. void Measure_request_msg::Clear() {
  845. // @@protoc_insertion_point(message_clear_start:message.Measure_request_msg)
  846. ::google::protobuf::uint32 cached_has_bits = 0;
  847. // Prevent compiler warnings about cached_has_bits being unused
  848. (void) cached_has_bits;
  849. cached_has_bits = _has_bits_[0];
  850. if (cached_has_bits & 3u) {
  851. if (cached_has_bits & 0x00000001u) {
  852. command_key_.ClearNonDefaultToEmptyNoArena();
  853. }
  854. if (cached_has_bits & 0x00000002u) {
  855. GOOGLE_DCHECK(base_info_ != NULL);
  856. base_info_->Clear();
  857. }
  858. }
  859. terminal_id_ = 0;
  860. _has_bits_.Clear();
  861. _internal_metadata_.Clear();
  862. }
  863. bool Measure_request_msg::MergePartialFromCodedStream(
  864. ::google::protobuf::io::CodedInputStream* input) {
  865. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  866. ::google::protobuf::uint32 tag;
  867. // @@protoc_insertion_point(parse_start:message.Measure_request_msg)
  868. for (;;) {
  869. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  870. tag = p.first;
  871. if (!p.second) goto handle_unusual;
  872. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  873. // required .message.Base_info base_info = 1;
  874. case 1: {
  875. if (static_cast< ::google::protobuf::uint8>(tag) ==
  876. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  877. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  878. input, mutable_base_info()));
  879. } else {
  880. goto handle_unusual;
  881. }
  882. break;
  883. }
  884. // required string command_key = 2;
  885. case 2: {
  886. if (static_cast< ::google::protobuf::uint8>(tag) ==
  887. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  888. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  889. input, this->mutable_command_key()));
  890. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  891. this->command_key().data(), static_cast<int>(this->command_key().length()),
  892. ::google::protobuf::internal::WireFormat::PARSE,
  893. "message.Measure_request_msg.command_key");
  894. } else {
  895. goto handle_unusual;
  896. }
  897. break;
  898. }
  899. // required int32 terminal_id = 3;
  900. case 3: {
  901. if (static_cast< ::google::protobuf::uint8>(tag) ==
  902. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  903. set_has_terminal_id();
  904. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  905. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  906. input, &terminal_id_)));
  907. } else {
  908. goto handle_unusual;
  909. }
  910. break;
  911. }
  912. default: {
  913. handle_unusual:
  914. if (tag == 0) {
  915. goto success;
  916. }
  917. DO_(::google::protobuf::internal::WireFormat::SkipField(
  918. input, tag, _internal_metadata_.mutable_unknown_fields()));
  919. break;
  920. }
  921. }
  922. }
  923. success:
  924. // @@protoc_insertion_point(parse_success:message.Measure_request_msg)
  925. return true;
  926. failure:
  927. // @@protoc_insertion_point(parse_failure:message.Measure_request_msg)
  928. return false;
  929. #undef DO_
  930. }
  931. void Measure_request_msg::SerializeWithCachedSizes(
  932. ::google::protobuf::io::CodedOutputStream* output) const {
  933. // @@protoc_insertion_point(serialize_start:message.Measure_request_msg)
  934. ::google::protobuf::uint32 cached_has_bits = 0;
  935. (void) cached_has_bits;
  936. cached_has_bits = _has_bits_[0];
  937. // required .message.Base_info base_info = 1;
  938. if (cached_has_bits & 0x00000002u) {
  939. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  940. 1, this->_internal_base_info(), output);
  941. }
  942. // required string command_key = 2;
  943. if (cached_has_bits & 0x00000001u) {
  944. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  945. this->command_key().data(), static_cast<int>(this->command_key().length()),
  946. ::google::protobuf::internal::WireFormat::SERIALIZE,
  947. "message.Measure_request_msg.command_key");
  948. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  949. 2, this->command_key(), output);
  950. }
  951. // required int32 terminal_id = 3;
  952. if (cached_has_bits & 0x00000004u) {
  953. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->terminal_id(), output);
  954. }
  955. if (_internal_metadata_.have_unknown_fields()) {
  956. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  957. _internal_metadata_.unknown_fields(), output);
  958. }
  959. // @@protoc_insertion_point(serialize_end:message.Measure_request_msg)
  960. }
  961. ::google::protobuf::uint8* Measure_request_msg::InternalSerializeWithCachedSizesToArray(
  962. bool deterministic, ::google::protobuf::uint8* target) const {
  963. (void)deterministic; // Unused
  964. // @@protoc_insertion_point(serialize_to_array_start:message.Measure_request_msg)
  965. ::google::protobuf::uint32 cached_has_bits = 0;
  966. (void) cached_has_bits;
  967. cached_has_bits = _has_bits_[0];
  968. // required .message.Base_info base_info = 1;
  969. if (cached_has_bits & 0x00000002u) {
  970. target = ::google::protobuf::internal::WireFormatLite::
  971. InternalWriteMessageToArray(
  972. 1, this->_internal_base_info(), deterministic, target);
  973. }
  974. // required string command_key = 2;
  975. if (cached_has_bits & 0x00000001u) {
  976. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  977. this->command_key().data(), static_cast<int>(this->command_key().length()),
  978. ::google::protobuf::internal::WireFormat::SERIALIZE,
  979. "message.Measure_request_msg.command_key");
  980. target =
  981. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  982. 2, this->command_key(), target);
  983. }
  984. // required int32 terminal_id = 3;
  985. if (cached_has_bits & 0x00000004u) {
  986. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->terminal_id(), target);
  987. }
  988. if (_internal_metadata_.have_unknown_fields()) {
  989. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  990. _internal_metadata_.unknown_fields(), target);
  991. }
  992. // @@protoc_insertion_point(serialize_to_array_end:message.Measure_request_msg)
  993. return target;
  994. }
  995. size_t Measure_request_msg::RequiredFieldsByteSizeFallback() const {
  996. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Measure_request_msg)
  997. size_t total_size = 0;
  998. if (has_command_key()) {
  999. // required string command_key = 2;
  1000. total_size += 1 +
  1001. ::google::protobuf::internal::WireFormatLite::StringSize(
  1002. this->command_key());
  1003. }
  1004. if (has_base_info()) {
  1005. // required .message.Base_info base_info = 1;
  1006. total_size += 1 +
  1007. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1008. *base_info_);
  1009. }
  1010. if (has_terminal_id()) {
  1011. // required int32 terminal_id = 3;
  1012. total_size += 1 +
  1013. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1014. this->terminal_id());
  1015. }
  1016. return total_size;
  1017. }
  1018. size_t Measure_request_msg::ByteSizeLong() const {
  1019. // @@protoc_insertion_point(message_byte_size_start:message.Measure_request_msg)
  1020. size_t total_size = 0;
  1021. if (_internal_metadata_.have_unknown_fields()) {
  1022. total_size +=
  1023. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1024. _internal_metadata_.unknown_fields());
  1025. }
  1026. if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
  1027. // required string command_key = 2;
  1028. total_size += 1 +
  1029. ::google::protobuf::internal::WireFormatLite::StringSize(
  1030. this->command_key());
  1031. // required .message.Base_info base_info = 1;
  1032. total_size += 1 +
  1033. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1034. *base_info_);
  1035. // required int32 terminal_id = 3;
  1036. total_size += 1 +
  1037. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1038. this->terminal_id());
  1039. } else {
  1040. total_size += RequiredFieldsByteSizeFallback();
  1041. }
  1042. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1043. SetCachedSize(cached_size);
  1044. return total_size;
  1045. }
  1046. void Measure_request_msg::MergeFrom(const ::google::protobuf::Message& from) {
  1047. // @@protoc_insertion_point(generalized_merge_from_start:message.Measure_request_msg)
  1048. GOOGLE_DCHECK_NE(&from, this);
  1049. const Measure_request_msg* source =
  1050. ::google::protobuf::internal::DynamicCastToGenerated<const Measure_request_msg>(
  1051. &from);
  1052. if (source == NULL) {
  1053. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Measure_request_msg)
  1054. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1055. } else {
  1056. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Measure_request_msg)
  1057. MergeFrom(*source);
  1058. }
  1059. }
  1060. void Measure_request_msg::MergeFrom(const Measure_request_msg& from) {
  1061. // @@protoc_insertion_point(class_specific_merge_from_start:message.Measure_request_msg)
  1062. GOOGLE_DCHECK_NE(&from, this);
  1063. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1064. ::google::protobuf::uint32 cached_has_bits = 0;
  1065. (void) cached_has_bits;
  1066. cached_has_bits = from._has_bits_[0];
  1067. if (cached_has_bits & 7u) {
  1068. if (cached_has_bits & 0x00000001u) {
  1069. set_has_command_key();
  1070. command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
  1071. }
  1072. if (cached_has_bits & 0x00000002u) {
  1073. mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
  1074. }
  1075. if (cached_has_bits & 0x00000004u) {
  1076. terminal_id_ = from.terminal_id_;
  1077. }
  1078. _has_bits_[0] |= cached_has_bits;
  1079. }
  1080. }
  1081. void Measure_request_msg::CopyFrom(const ::google::protobuf::Message& from) {
  1082. // @@protoc_insertion_point(generalized_copy_from_start:message.Measure_request_msg)
  1083. if (&from == this) return;
  1084. Clear();
  1085. MergeFrom(from);
  1086. }
  1087. void Measure_request_msg::CopyFrom(const Measure_request_msg& from) {
  1088. // @@protoc_insertion_point(class_specific_copy_from_start:message.Measure_request_msg)
  1089. if (&from == this) return;
  1090. Clear();
  1091. MergeFrom(from);
  1092. }
  1093. bool Measure_request_msg::IsInitialized() const {
  1094. if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  1095. if (has_base_info()) {
  1096. if (!this->base_info_->IsInitialized()) return false;
  1097. }
  1098. return true;
  1099. }
  1100. void Measure_request_msg::Swap(Measure_request_msg* other) {
  1101. if (other == this) return;
  1102. InternalSwap(other);
  1103. }
  1104. void Measure_request_msg::InternalSwap(Measure_request_msg* other) {
  1105. using std::swap;
  1106. command_key_.Swap(&other->command_key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1107. GetArenaNoVirtual());
  1108. swap(base_info_, other->base_info_);
  1109. swap(terminal_id_, other->terminal_id_);
  1110. swap(_has_bits_[0], other->_has_bits_[0]);
  1111. _internal_metadata_.Swap(&other->_internal_metadata_);
  1112. }
  1113. ::google::protobuf::Metadata Measure_request_msg::GetMetadata() const {
  1114. protobuf_measure_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1115. return ::protobuf_measure_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  1116. }
  1117. // ===================================================================
  1118. void Measure_response_msg::InitAsDefaultInstance() {
  1119. ::message::_Measure_response_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
  1120. ::message::Base_info::internal_default_instance());
  1121. ::message::_Measure_response_msg_default_instance_._instance.get_mutable()->locate_information_ = const_cast< ::message::Locate_information*>(
  1122. ::message::Locate_information::internal_default_instance());
  1123. ::message::_Measure_response_msg_default_instance_._instance.get_mutable()->error_manager_ = const_cast< ::message::Error_manager*>(
  1124. ::message::Error_manager::internal_default_instance());
  1125. }
  1126. void Measure_response_msg::clear_base_info() {
  1127. if (base_info_ != NULL) base_info_->Clear();
  1128. clear_has_base_info();
  1129. }
  1130. void Measure_response_msg::clear_locate_information() {
  1131. if (locate_information_ != NULL) locate_information_->Clear();
  1132. clear_has_locate_information();
  1133. }
  1134. void Measure_response_msg::clear_error_manager() {
  1135. if (error_manager_ != NULL) error_manager_->Clear();
  1136. clear_has_error_manager();
  1137. }
  1138. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1139. const int Measure_response_msg::kBaseInfoFieldNumber;
  1140. const int Measure_response_msg::kCommandKeyFieldNumber;
  1141. const int Measure_response_msg::kTerminalIdFieldNumber;
  1142. const int Measure_response_msg::kLocateInformationFieldNumber;
  1143. const int Measure_response_msg::kErrorManagerFieldNumber;
  1144. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1145. Measure_response_msg::Measure_response_msg()
  1146. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1147. ::google::protobuf::internal::InitSCC(
  1148. &protobuf_measure_5fmessage_2eproto::scc_info_Measure_response_msg.base);
  1149. SharedCtor();
  1150. // @@protoc_insertion_point(constructor:message.Measure_response_msg)
  1151. }
  1152. Measure_response_msg::Measure_response_msg(const Measure_response_msg& from)
  1153. : ::google::protobuf::Message(),
  1154. _internal_metadata_(NULL),
  1155. _has_bits_(from._has_bits_) {
  1156. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1157. command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1158. if (from.has_command_key()) {
  1159. command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
  1160. }
  1161. if (from.has_base_info()) {
  1162. base_info_ = new ::message::Base_info(*from.base_info_);
  1163. } else {
  1164. base_info_ = NULL;
  1165. }
  1166. if (from.has_locate_information()) {
  1167. locate_information_ = new ::message::Locate_information(*from.locate_information_);
  1168. } else {
  1169. locate_information_ = NULL;
  1170. }
  1171. if (from.has_error_manager()) {
  1172. error_manager_ = new ::message::Error_manager(*from.error_manager_);
  1173. } else {
  1174. error_manager_ = NULL;
  1175. }
  1176. terminal_id_ = from.terminal_id_;
  1177. // @@protoc_insertion_point(copy_constructor:message.Measure_response_msg)
  1178. }
  1179. void Measure_response_msg::SharedCtor() {
  1180. command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1181. ::memset(&base_info_, 0, static_cast<size_t>(
  1182. reinterpret_cast<char*>(&terminal_id_) -
  1183. reinterpret_cast<char*>(&base_info_)) + sizeof(terminal_id_));
  1184. }
  1185. Measure_response_msg::~Measure_response_msg() {
  1186. // @@protoc_insertion_point(destructor:message.Measure_response_msg)
  1187. SharedDtor();
  1188. }
  1189. void Measure_response_msg::SharedDtor() {
  1190. command_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1191. if (this != internal_default_instance()) delete base_info_;
  1192. if (this != internal_default_instance()) delete locate_information_;
  1193. if (this != internal_default_instance()) delete error_manager_;
  1194. }
  1195. void Measure_response_msg::SetCachedSize(int size) const {
  1196. _cached_size_.Set(size);
  1197. }
  1198. const ::google::protobuf::Descriptor* Measure_response_msg::descriptor() {
  1199. ::protobuf_measure_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1200. return ::protobuf_measure_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1201. }
  1202. const Measure_response_msg& Measure_response_msg::default_instance() {
  1203. ::google::protobuf::internal::InitSCC(&protobuf_measure_5fmessage_2eproto::scc_info_Measure_response_msg.base);
  1204. return *internal_default_instance();
  1205. }
  1206. void Measure_response_msg::Clear() {
  1207. // @@protoc_insertion_point(message_clear_start:message.Measure_response_msg)
  1208. ::google::protobuf::uint32 cached_has_bits = 0;
  1209. // Prevent compiler warnings about cached_has_bits being unused
  1210. (void) cached_has_bits;
  1211. cached_has_bits = _has_bits_[0];
  1212. if (cached_has_bits & 15u) {
  1213. if (cached_has_bits & 0x00000001u) {
  1214. command_key_.ClearNonDefaultToEmptyNoArena();
  1215. }
  1216. if (cached_has_bits & 0x00000002u) {
  1217. GOOGLE_DCHECK(base_info_ != NULL);
  1218. base_info_->Clear();
  1219. }
  1220. if (cached_has_bits & 0x00000004u) {
  1221. GOOGLE_DCHECK(locate_information_ != NULL);
  1222. locate_information_->Clear();
  1223. }
  1224. if (cached_has_bits & 0x00000008u) {
  1225. GOOGLE_DCHECK(error_manager_ != NULL);
  1226. error_manager_->Clear();
  1227. }
  1228. }
  1229. terminal_id_ = 0;
  1230. _has_bits_.Clear();
  1231. _internal_metadata_.Clear();
  1232. }
  1233. bool Measure_response_msg::MergePartialFromCodedStream(
  1234. ::google::protobuf::io::CodedInputStream* input) {
  1235. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1236. ::google::protobuf::uint32 tag;
  1237. // @@protoc_insertion_point(parse_start:message.Measure_response_msg)
  1238. for (;;) {
  1239. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1240. tag = p.first;
  1241. if (!p.second) goto handle_unusual;
  1242. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1243. // required .message.Base_info base_info = 1;
  1244. case 1: {
  1245. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1246. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1247. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1248. input, mutable_base_info()));
  1249. } else {
  1250. goto handle_unusual;
  1251. }
  1252. break;
  1253. }
  1254. // required string command_key = 2;
  1255. case 2: {
  1256. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1257. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1258. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1259. input, this->mutable_command_key()));
  1260. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1261. this->command_key().data(), static_cast<int>(this->command_key().length()),
  1262. ::google::protobuf::internal::WireFormat::PARSE,
  1263. "message.Measure_response_msg.command_key");
  1264. } else {
  1265. goto handle_unusual;
  1266. }
  1267. break;
  1268. }
  1269. // required int32 terminal_id = 3;
  1270. case 3: {
  1271. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1272. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  1273. set_has_terminal_id();
  1274. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1275. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1276. input, &terminal_id_)));
  1277. } else {
  1278. goto handle_unusual;
  1279. }
  1280. break;
  1281. }
  1282. // optional .message.Locate_information locate_information = 4;
  1283. case 4: {
  1284. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1285. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1286. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1287. input, mutable_locate_information()));
  1288. } else {
  1289. goto handle_unusual;
  1290. }
  1291. break;
  1292. }
  1293. // required .message.Error_manager error_manager = 5;
  1294. case 5: {
  1295. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1296. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1297. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1298. input, mutable_error_manager()));
  1299. } else {
  1300. goto handle_unusual;
  1301. }
  1302. break;
  1303. }
  1304. default: {
  1305. handle_unusual:
  1306. if (tag == 0) {
  1307. goto success;
  1308. }
  1309. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1310. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1311. break;
  1312. }
  1313. }
  1314. }
  1315. success:
  1316. // @@protoc_insertion_point(parse_success:message.Measure_response_msg)
  1317. return true;
  1318. failure:
  1319. // @@protoc_insertion_point(parse_failure:message.Measure_response_msg)
  1320. return false;
  1321. #undef DO_
  1322. }
  1323. void Measure_response_msg::SerializeWithCachedSizes(
  1324. ::google::protobuf::io::CodedOutputStream* output) const {
  1325. // @@protoc_insertion_point(serialize_start:message.Measure_response_msg)
  1326. ::google::protobuf::uint32 cached_has_bits = 0;
  1327. (void) cached_has_bits;
  1328. cached_has_bits = _has_bits_[0];
  1329. // required .message.Base_info base_info = 1;
  1330. if (cached_has_bits & 0x00000002u) {
  1331. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1332. 1, this->_internal_base_info(), output);
  1333. }
  1334. // required string command_key = 2;
  1335. if (cached_has_bits & 0x00000001u) {
  1336. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1337. this->command_key().data(), static_cast<int>(this->command_key().length()),
  1338. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1339. "message.Measure_response_msg.command_key");
  1340. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1341. 2, this->command_key(), output);
  1342. }
  1343. // required int32 terminal_id = 3;
  1344. if (cached_has_bits & 0x00000010u) {
  1345. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->terminal_id(), output);
  1346. }
  1347. // optional .message.Locate_information locate_information = 4;
  1348. if (cached_has_bits & 0x00000004u) {
  1349. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1350. 4, this->_internal_locate_information(), output);
  1351. }
  1352. // required .message.Error_manager error_manager = 5;
  1353. if (cached_has_bits & 0x00000008u) {
  1354. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1355. 5, this->_internal_error_manager(), output);
  1356. }
  1357. if (_internal_metadata_.have_unknown_fields()) {
  1358. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1359. _internal_metadata_.unknown_fields(), output);
  1360. }
  1361. // @@protoc_insertion_point(serialize_end:message.Measure_response_msg)
  1362. }
  1363. ::google::protobuf::uint8* Measure_response_msg::InternalSerializeWithCachedSizesToArray(
  1364. bool deterministic, ::google::protobuf::uint8* target) const {
  1365. (void)deterministic; // Unused
  1366. // @@protoc_insertion_point(serialize_to_array_start:message.Measure_response_msg)
  1367. ::google::protobuf::uint32 cached_has_bits = 0;
  1368. (void) cached_has_bits;
  1369. cached_has_bits = _has_bits_[0];
  1370. // required .message.Base_info base_info = 1;
  1371. if (cached_has_bits & 0x00000002u) {
  1372. target = ::google::protobuf::internal::WireFormatLite::
  1373. InternalWriteMessageToArray(
  1374. 1, this->_internal_base_info(), deterministic, target);
  1375. }
  1376. // required string command_key = 2;
  1377. if (cached_has_bits & 0x00000001u) {
  1378. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1379. this->command_key().data(), static_cast<int>(this->command_key().length()),
  1380. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1381. "message.Measure_response_msg.command_key");
  1382. target =
  1383. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1384. 2, this->command_key(), target);
  1385. }
  1386. // required int32 terminal_id = 3;
  1387. if (cached_has_bits & 0x00000010u) {
  1388. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->terminal_id(), target);
  1389. }
  1390. // optional .message.Locate_information locate_information = 4;
  1391. if (cached_has_bits & 0x00000004u) {
  1392. target = ::google::protobuf::internal::WireFormatLite::
  1393. InternalWriteMessageToArray(
  1394. 4, this->_internal_locate_information(), deterministic, target);
  1395. }
  1396. // required .message.Error_manager error_manager = 5;
  1397. if (cached_has_bits & 0x00000008u) {
  1398. target = ::google::protobuf::internal::WireFormatLite::
  1399. InternalWriteMessageToArray(
  1400. 5, this->_internal_error_manager(), deterministic, target);
  1401. }
  1402. if (_internal_metadata_.have_unknown_fields()) {
  1403. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1404. _internal_metadata_.unknown_fields(), target);
  1405. }
  1406. // @@protoc_insertion_point(serialize_to_array_end:message.Measure_response_msg)
  1407. return target;
  1408. }
  1409. size_t Measure_response_msg::RequiredFieldsByteSizeFallback() const {
  1410. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Measure_response_msg)
  1411. size_t total_size = 0;
  1412. if (has_command_key()) {
  1413. // required string command_key = 2;
  1414. total_size += 1 +
  1415. ::google::protobuf::internal::WireFormatLite::StringSize(
  1416. this->command_key());
  1417. }
  1418. if (has_base_info()) {
  1419. // required .message.Base_info base_info = 1;
  1420. total_size += 1 +
  1421. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1422. *base_info_);
  1423. }
  1424. if (has_error_manager()) {
  1425. // required .message.Error_manager error_manager = 5;
  1426. total_size += 1 +
  1427. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1428. *error_manager_);
  1429. }
  1430. if (has_terminal_id()) {
  1431. // required int32 terminal_id = 3;
  1432. total_size += 1 +
  1433. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1434. this->terminal_id());
  1435. }
  1436. return total_size;
  1437. }
  1438. size_t Measure_response_msg::ByteSizeLong() const {
  1439. // @@protoc_insertion_point(message_byte_size_start:message.Measure_response_msg)
  1440. size_t total_size = 0;
  1441. if (_internal_metadata_.have_unknown_fields()) {
  1442. total_size +=
  1443. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1444. _internal_metadata_.unknown_fields());
  1445. }
  1446. if (((_has_bits_[0] & 0x0000001b) ^ 0x0000001b) == 0) { // All required fields are present.
  1447. // required string command_key = 2;
  1448. total_size += 1 +
  1449. ::google::protobuf::internal::WireFormatLite::StringSize(
  1450. this->command_key());
  1451. // required .message.Base_info base_info = 1;
  1452. total_size += 1 +
  1453. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1454. *base_info_);
  1455. // required .message.Error_manager error_manager = 5;
  1456. total_size += 1 +
  1457. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1458. *error_manager_);
  1459. // required int32 terminal_id = 3;
  1460. total_size += 1 +
  1461. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1462. this->terminal_id());
  1463. } else {
  1464. total_size += RequiredFieldsByteSizeFallback();
  1465. }
  1466. // optional .message.Locate_information locate_information = 4;
  1467. if (has_locate_information()) {
  1468. total_size += 1 +
  1469. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1470. *locate_information_);
  1471. }
  1472. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1473. SetCachedSize(cached_size);
  1474. return total_size;
  1475. }
  1476. void Measure_response_msg::MergeFrom(const ::google::protobuf::Message& from) {
  1477. // @@protoc_insertion_point(generalized_merge_from_start:message.Measure_response_msg)
  1478. GOOGLE_DCHECK_NE(&from, this);
  1479. const Measure_response_msg* source =
  1480. ::google::protobuf::internal::DynamicCastToGenerated<const Measure_response_msg>(
  1481. &from);
  1482. if (source == NULL) {
  1483. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Measure_response_msg)
  1484. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1485. } else {
  1486. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Measure_response_msg)
  1487. MergeFrom(*source);
  1488. }
  1489. }
  1490. void Measure_response_msg::MergeFrom(const Measure_response_msg& from) {
  1491. // @@protoc_insertion_point(class_specific_merge_from_start:message.Measure_response_msg)
  1492. GOOGLE_DCHECK_NE(&from, this);
  1493. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1494. ::google::protobuf::uint32 cached_has_bits = 0;
  1495. (void) cached_has_bits;
  1496. cached_has_bits = from._has_bits_[0];
  1497. if (cached_has_bits & 31u) {
  1498. if (cached_has_bits & 0x00000001u) {
  1499. set_has_command_key();
  1500. command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
  1501. }
  1502. if (cached_has_bits & 0x00000002u) {
  1503. mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
  1504. }
  1505. if (cached_has_bits & 0x00000004u) {
  1506. mutable_locate_information()->::message::Locate_information::MergeFrom(from.locate_information());
  1507. }
  1508. if (cached_has_bits & 0x00000008u) {
  1509. mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
  1510. }
  1511. if (cached_has_bits & 0x00000010u) {
  1512. terminal_id_ = from.terminal_id_;
  1513. }
  1514. _has_bits_[0] |= cached_has_bits;
  1515. }
  1516. }
  1517. void Measure_response_msg::CopyFrom(const ::google::protobuf::Message& from) {
  1518. // @@protoc_insertion_point(generalized_copy_from_start:message.Measure_response_msg)
  1519. if (&from == this) return;
  1520. Clear();
  1521. MergeFrom(from);
  1522. }
  1523. void Measure_response_msg::CopyFrom(const Measure_response_msg& from) {
  1524. // @@protoc_insertion_point(class_specific_copy_from_start:message.Measure_response_msg)
  1525. if (&from == this) return;
  1526. Clear();
  1527. MergeFrom(from);
  1528. }
  1529. bool Measure_response_msg::IsInitialized() const {
  1530. if ((_has_bits_[0] & 0x0000001b) != 0x0000001b) return false;
  1531. if (has_base_info()) {
  1532. if (!this->base_info_->IsInitialized()) return false;
  1533. }
  1534. if (has_error_manager()) {
  1535. if (!this->error_manager_->IsInitialized()) return false;
  1536. }
  1537. return true;
  1538. }
  1539. void Measure_response_msg::Swap(Measure_response_msg* other) {
  1540. if (other == this) return;
  1541. InternalSwap(other);
  1542. }
  1543. void Measure_response_msg::InternalSwap(Measure_response_msg* other) {
  1544. using std::swap;
  1545. command_key_.Swap(&other->command_key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1546. GetArenaNoVirtual());
  1547. swap(base_info_, other->base_info_);
  1548. swap(locate_information_, other->locate_information_);
  1549. swap(error_manager_, other->error_manager_);
  1550. swap(terminal_id_, other->terminal_id_);
  1551. swap(_has_bits_[0], other->_has_bits_[0]);
  1552. _internal_metadata_.Swap(&other->_internal_metadata_);
  1553. }
  1554. ::google::protobuf::Metadata Measure_response_msg::GetMetadata() const {
  1555. protobuf_measure_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1556. return ::protobuf_measure_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  1557. }
  1558. // @@protoc_insertion_point(namespace_scope)
  1559. } // namespace message
  1560. namespace google {
  1561. namespace protobuf {
  1562. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Measure_status_msg* Arena::CreateMaybeMessage< ::message::Measure_status_msg >(Arena* arena) {
  1563. return Arena::CreateInternal< ::message::Measure_status_msg >(arena);
  1564. }
  1565. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Measure_request_msg* Arena::CreateMaybeMessage< ::message::Measure_request_msg >(Arena* arena) {
  1566. return Arena::CreateInternal< ::message::Measure_request_msg >(arena);
  1567. }
  1568. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Measure_response_msg* Arena::CreateMaybeMessage< ::message::Measure_response_msg >(Arena* arena) {
  1569. return Arena::CreateInternal< ::message::Measure_response_msg >(arena);
  1570. }
  1571. } // namespace protobuf
  1572. } // namespace google
  1573. // @@protoc_insertion_point(global_scope)