measure_message.pb.cc 67 KB

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