measure_message.pb.cc 63 KB

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