measure_message.pb.cc 64 KB

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