measure_message.pb.cc 66 KB

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