locate_message.pb.cc 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: locate_message.proto
  3. #include "locate_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 Locate_status_msgDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<Locate_status_msg>
  23. _instance;
  24. } _Locate_status_msg_default_instance_;
  25. class Locate_request_msgDefaultTypeInternal {
  26. public:
  27. ::google::protobuf::internal::ExplicitlyConstructed<Locate_request_msg>
  28. _instance;
  29. } _Locate_request_msg_default_instance_;
  30. class Locate_response_msgDefaultTypeInternal {
  31. public:
  32. ::google::protobuf::internal::ExplicitlyConstructed<Locate_response_msg>
  33. _instance;
  34. } _Locate_response_msg_default_instance_;
  35. } // namespace message
  36. namespace protobuf_locate_5fmessage_2eproto {
  37. void InitDefaultsLocate_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::InitDefaultsCommand_message();
  45. {
  46. void* ptr = &::message::_Locate_status_msg_default_instance_;
  47. new (ptr) ::message::Locate_status_msg();
  48. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  49. }
  50. ::message::Locate_status_msg::InitAsDefaultInstance();
  51. }
  52. void InitDefaultsLocate_status_msg() {
  53. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  54. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLocate_status_msgImpl);
  55. }
  56. void InitDefaultsLocate_request_msgImpl() {
  57. GOOGLE_PROTOBUF_VERIFY_VERSION;
  58. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  59. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  60. #else
  61. ::google::protobuf::internal::InitProtobufDefaults();
  62. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  63. protobuf_message_5fbase_2eproto::InitDefaultsCommand_message();
  64. {
  65. void* ptr = &::message::_Locate_request_msg_default_instance_;
  66. new (ptr) ::message::Locate_request_msg();
  67. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  68. }
  69. ::message::Locate_request_msg::InitAsDefaultInstance();
  70. }
  71. void InitDefaultsLocate_request_msg() {
  72. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  73. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLocate_request_msgImpl);
  74. }
  75. void InitDefaultsLocate_response_msgImpl() {
  76. GOOGLE_PROTOBUF_VERIFY_VERSION;
  77. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  78. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  79. #else
  80. ::google::protobuf::internal::InitProtobufDefaults();
  81. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  82. protobuf_message_5fbase_2eproto::InitDefaultsCommand_message();
  83. {
  84. void* ptr = &::message::_Locate_response_msg_default_instance_;
  85. new (ptr) ::message::Locate_response_msg();
  86. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  87. }
  88. ::message::Locate_response_msg::InitAsDefaultInstance();
  89. }
  90. void InitDefaultsLocate_response_msg() {
  91. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  92. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLocate_response_msgImpl);
  93. }
  94. ::google::protobuf::Metadata file_level_metadata[3];
  95. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2];
  96. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  97. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_status_msg, _has_bits_),
  98. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_status_msg, _internal_metadata_),
  99. ~0u, // no _extensions_
  100. ~0u, // no _oneof_case_
  101. ~0u, // no _weak_field_map_
  102. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_status_msg, msg_type_),
  103. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_status_msg, cmd_msg_),
  104. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_status_msg, dj_statu1_),
  105. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_status_msg, dj_statu2_),
  106. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_status_msg, dj_statu3_),
  107. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_status_msg, dj_statu4_),
  108. 1,
  109. 0,
  110. 2,
  111. 3,
  112. 4,
  113. 5,
  114. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_request_msg, _has_bits_),
  115. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_request_msg, _internal_metadata_),
  116. ~0u, // no _extensions_
  117. ~0u, // no _oneof_case_
  118. ~0u, // no _weak_field_map_
  119. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_request_msg, msg_type_),
  120. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_request_msg, cmd_msg_),
  121. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_request_msg, locate_type_),
  122. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_request_msg, time_out_),
  123. 1,
  124. 0,
  125. 2,
  126. 3,
  127. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, _has_bits_),
  128. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, _internal_metadata_),
  129. ~0u, // no _extensions_
  130. ~0u, // no _oneof_case_
  131. ~0u, // no _weak_field_map_
  132. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, msg_type_),
  133. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, cmd_msg_),
  134. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, error_code_),
  135. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, error_description_),
  136. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, length_),
  137. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, width_),
  138. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, height_),
  139. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, wheel_base_),
  140. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, x_),
  141. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, y_),
  142. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_response_msg, theta_),
  143. 2,
  144. 1,
  145. 3,
  146. 0,
  147. 4,
  148. 5,
  149. 6,
  150. 7,
  151. 8,
  152. 9,
  153. 10,
  154. };
  155. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  156. { 0, 11, sizeof(::message::Locate_status_msg)},
  157. { 17, 26, sizeof(::message::Locate_request_msg)},
  158. { 30, 46, sizeof(::message::Locate_response_msg)},
  159. };
  160. static ::google::protobuf::Message const * const file_default_instances[] = {
  161. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Locate_status_msg_default_instance_),
  162. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Locate_request_msg_default_instance_),
  163. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Locate_response_msg_default_instance_),
  164. };
  165. void protobuf_AssignDescriptors() {
  166. AddDescriptors();
  167. ::google::protobuf::MessageFactory* factory = NULL;
  168. AssignDescriptors(
  169. "locate_message.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  170. file_level_metadata, file_level_enum_descriptors, NULL);
  171. }
  172. void protobuf_AssignDescriptorsOnce() {
  173. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  174. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  175. }
  176. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  177. void protobuf_RegisterTypes(const ::std::string&) {
  178. protobuf_AssignDescriptorsOnce();
  179. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
  180. }
  181. void AddDescriptorsImpl() {
  182. InitDefaults();
  183. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  184. "\n\024locate_message.proto\022\007message\032\022message"
  185. "_base.proto\"\213\002\n\021Locate_status_msg\022\'\n\010msg"
  186. "_type\030\001 \002(\0162\025.message.Message_type\022)\n\007cm"
  187. "d_msg\030\002 \001(\0132\030.message.Command_message\022\'\n"
  188. "\tdj_statu1\030\003 \002(\0162\024.message.Lidar_statu\022\'"
  189. "\n\tdj_statu2\030\004 \002(\0162\024.message.Lidar_statu\022"
  190. "\'\n\tdj_statu3\030\005 \002(\0162\024.message.Lidar_statu"
  191. "\022\'\n\tdj_statu4\030\006 \002(\0162\024.message.Lidar_stat"
  192. "u\"\253\001\n\022Locate_request_msg\022\'\n\010msg_type\030\001 \002"
  193. "(\0162\025.message.Message_type\022)\n\007cmd_msg\030\002 \002"
  194. "(\0132\030.message.Command_message\022)\n\013locate_t"
  195. "ype\030\003 \002(\0162\024.message.Locate_type\022\026\n\010time_"
  196. "out\030\004 \001(\005:\0045000\"\200\002\n\023Locate_response_msg\022"
  197. "\'\n\010msg_type\030\001 \002(\0162\025.message.Message_type"
  198. "\022)\n\007cmd_msg\030\002 \002(\0132\030.message.Command_mess"
  199. "age\022\022\n\nerror_code\030\003 \002(\005\022\031\n\021error_descrip"
  200. "tion\030\004 \001(\t\022\016\n\006length\030\005 \001(\002\022\r\n\005width\030\006 \001("
  201. "\002\022\016\n\006height\030\007 \001(\002\022\022\n\nwheel_base\030\010 \001(\002\022\t\n"
  202. "\001x\030\t \001(\002\022\t\n\001y\030\n \001(\002\022\r\n\005theta\030\013 \001(\002*5\n\013Li"
  203. "dar_statu\022\013\n\007eNormal\020\000\022\t\n\005eBusy\020\001\022\016\n\neLi"
  204. "darMiss\020\002*+\n\013Locate_type\022\016\n\neReal_time\020\000"
  205. "\022\014\n\010eTrigger\020\001"
  206. };
  207. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  208. descriptor, 854);
  209. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  210. "locate_message.proto", &protobuf_RegisterTypes);
  211. ::protobuf_message_5fbase_2eproto::AddDescriptors();
  212. }
  213. void AddDescriptors() {
  214. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  215. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  216. }
  217. // Force AddDescriptors() to be called at dynamic initialization time.
  218. struct StaticDescriptorInitializer {
  219. StaticDescriptorInitializer() {
  220. AddDescriptors();
  221. }
  222. } static_descriptor_initializer;
  223. } // namespace protobuf_locate_5fmessage_2eproto
  224. namespace message {
  225. const ::google::protobuf::EnumDescriptor* Lidar_statu_descriptor() {
  226. protobuf_locate_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  227. return protobuf_locate_5fmessage_2eproto::file_level_enum_descriptors[0];
  228. }
  229. bool Lidar_statu_IsValid(int value) {
  230. switch (value) {
  231. case 0:
  232. case 1:
  233. case 2:
  234. return true;
  235. default:
  236. return false;
  237. }
  238. }
  239. const ::google::protobuf::EnumDescriptor* Locate_type_descriptor() {
  240. protobuf_locate_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  241. return protobuf_locate_5fmessage_2eproto::file_level_enum_descriptors[1];
  242. }
  243. bool Locate_type_IsValid(int value) {
  244. switch (value) {
  245. case 0:
  246. case 1:
  247. return true;
  248. default:
  249. return false;
  250. }
  251. }
  252. // ===================================================================
  253. void Locate_status_msg::InitAsDefaultInstance() {
  254. ::message::_Locate_status_msg_default_instance_._instance.get_mutable()->cmd_msg_ = const_cast< ::message::Command_message*>(
  255. ::message::Command_message::internal_default_instance());
  256. }
  257. void Locate_status_msg::clear_cmd_msg() {
  258. if (cmd_msg_ != NULL) cmd_msg_->Clear();
  259. clear_has_cmd_msg();
  260. }
  261. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  262. const int Locate_status_msg::kMsgTypeFieldNumber;
  263. const int Locate_status_msg::kCmdMsgFieldNumber;
  264. const int Locate_status_msg::kDjStatu1FieldNumber;
  265. const int Locate_status_msg::kDjStatu2FieldNumber;
  266. const int Locate_status_msg::kDjStatu3FieldNumber;
  267. const int Locate_status_msg::kDjStatu4FieldNumber;
  268. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  269. Locate_status_msg::Locate_status_msg()
  270. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  271. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  272. ::protobuf_locate_5fmessage_2eproto::InitDefaultsLocate_status_msg();
  273. }
  274. SharedCtor();
  275. // @@protoc_insertion_point(constructor:message.Locate_status_msg)
  276. }
  277. Locate_status_msg::Locate_status_msg(const Locate_status_msg& from)
  278. : ::google::protobuf::Message(),
  279. _internal_metadata_(NULL),
  280. _has_bits_(from._has_bits_),
  281. _cached_size_(0) {
  282. _internal_metadata_.MergeFrom(from._internal_metadata_);
  283. if (from.has_cmd_msg()) {
  284. cmd_msg_ = new ::message::Command_message(*from.cmd_msg_);
  285. } else {
  286. cmd_msg_ = NULL;
  287. }
  288. ::memcpy(&msg_type_, &from.msg_type_,
  289. static_cast<size_t>(reinterpret_cast<char*>(&dj_statu4_) -
  290. reinterpret_cast<char*>(&msg_type_)) + sizeof(dj_statu4_));
  291. // @@protoc_insertion_point(copy_constructor:message.Locate_status_msg)
  292. }
  293. void Locate_status_msg::SharedCtor() {
  294. _cached_size_ = 0;
  295. ::memset(&cmd_msg_, 0, static_cast<size_t>(
  296. reinterpret_cast<char*>(&dj_statu4_) -
  297. reinterpret_cast<char*>(&cmd_msg_)) + sizeof(dj_statu4_));
  298. }
  299. Locate_status_msg::~Locate_status_msg() {
  300. // @@protoc_insertion_point(destructor:message.Locate_status_msg)
  301. SharedDtor();
  302. }
  303. void Locate_status_msg::SharedDtor() {
  304. if (this != internal_default_instance()) delete cmd_msg_;
  305. }
  306. void Locate_status_msg::SetCachedSize(int size) const {
  307. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  308. _cached_size_ = size;
  309. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  310. }
  311. const ::google::protobuf::Descriptor* Locate_status_msg::descriptor() {
  312. ::protobuf_locate_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  313. return ::protobuf_locate_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  314. }
  315. const Locate_status_msg& Locate_status_msg::default_instance() {
  316. ::protobuf_locate_5fmessage_2eproto::InitDefaultsLocate_status_msg();
  317. return *internal_default_instance();
  318. }
  319. Locate_status_msg* Locate_status_msg::New(::google::protobuf::Arena* arena) const {
  320. Locate_status_msg* n = new Locate_status_msg;
  321. if (arena != NULL) {
  322. arena->Own(n);
  323. }
  324. return n;
  325. }
  326. void Locate_status_msg::Clear() {
  327. // @@protoc_insertion_point(message_clear_start:message.Locate_status_msg)
  328. ::google::protobuf::uint32 cached_has_bits = 0;
  329. // Prevent compiler warnings about cached_has_bits being unused
  330. (void) cached_has_bits;
  331. cached_has_bits = _has_bits_[0];
  332. if (cached_has_bits & 0x00000001u) {
  333. GOOGLE_DCHECK(cmd_msg_ != NULL);
  334. cmd_msg_->Clear();
  335. }
  336. if (cached_has_bits & 62u) {
  337. ::memset(&msg_type_, 0, static_cast<size_t>(
  338. reinterpret_cast<char*>(&dj_statu4_) -
  339. reinterpret_cast<char*>(&msg_type_)) + sizeof(dj_statu4_));
  340. }
  341. _has_bits_.Clear();
  342. _internal_metadata_.Clear();
  343. }
  344. bool Locate_status_msg::MergePartialFromCodedStream(
  345. ::google::protobuf::io::CodedInputStream* input) {
  346. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  347. ::google::protobuf::uint32 tag;
  348. // @@protoc_insertion_point(parse_start:message.Locate_status_msg)
  349. for (;;) {
  350. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  351. tag = p.first;
  352. if (!p.second) goto handle_unusual;
  353. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  354. // required .message.Message_type msg_type = 1;
  355. case 1: {
  356. if (static_cast< ::google::protobuf::uint8>(tag) ==
  357. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  358. int value;
  359. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  360. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  361. input, &value)));
  362. if (::message::Message_type_IsValid(value)) {
  363. set_msg_type(static_cast< ::message::Message_type >(value));
  364. } else {
  365. mutable_unknown_fields()->AddVarint(
  366. 1, static_cast< ::google::protobuf::uint64>(value));
  367. }
  368. } else {
  369. goto handle_unusual;
  370. }
  371. break;
  372. }
  373. // optional .message.Command_message cmd_msg = 2;
  374. case 2: {
  375. if (static_cast< ::google::protobuf::uint8>(tag) ==
  376. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  377. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  378. input, mutable_cmd_msg()));
  379. } else {
  380. goto handle_unusual;
  381. }
  382. break;
  383. }
  384. // required .message.Lidar_statu dj_statu1 = 3;
  385. case 3: {
  386. if (static_cast< ::google::protobuf::uint8>(tag) ==
  387. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  388. int value;
  389. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  390. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  391. input, &value)));
  392. if (::message::Lidar_statu_IsValid(value)) {
  393. set_dj_statu1(static_cast< ::message::Lidar_statu >(value));
  394. } else {
  395. mutable_unknown_fields()->AddVarint(
  396. 3, static_cast< ::google::protobuf::uint64>(value));
  397. }
  398. } else {
  399. goto handle_unusual;
  400. }
  401. break;
  402. }
  403. // required .message.Lidar_statu dj_statu2 = 4;
  404. case 4: {
  405. if (static_cast< ::google::protobuf::uint8>(tag) ==
  406. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  407. int value;
  408. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  409. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  410. input, &value)));
  411. if (::message::Lidar_statu_IsValid(value)) {
  412. set_dj_statu2(static_cast< ::message::Lidar_statu >(value));
  413. } else {
  414. mutable_unknown_fields()->AddVarint(
  415. 4, static_cast< ::google::protobuf::uint64>(value));
  416. }
  417. } else {
  418. goto handle_unusual;
  419. }
  420. break;
  421. }
  422. // required .message.Lidar_statu dj_statu3 = 5;
  423. case 5: {
  424. if (static_cast< ::google::protobuf::uint8>(tag) ==
  425. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  426. int value;
  427. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  428. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  429. input, &value)));
  430. if (::message::Lidar_statu_IsValid(value)) {
  431. set_dj_statu3(static_cast< ::message::Lidar_statu >(value));
  432. } else {
  433. mutable_unknown_fields()->AddVarint(
  434. 5, static_cast< ::google::protobuf::uint64>(value));
  435. }
  436. } else {
  437. goto handle_unusual;
  438. }
  439. break;
  440. }
  441. // required .message.Lidar_statu dj_statu4 = 6;
  442. case 6: {
  443. if (static_cast< ::google::protobuf::uint8>(tag) ==
  444. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  445. int value;
  446. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  447. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  448. input, &value)));
  449. if (::message::Lidar_statu_IsValid(value)) {
  450. set_dj_statu4(static_cast< ::message::Lidar_statu >(value));
  451. } else {
  452. mutable_unknown_fields()->AddVarint(
  453. 6, static_cast< ::google::protobuf::uint64>(value));
  454. }
  455. } else {
  456. goto handle_unusual;
  457. }
  458. break;
  459. }
  460. default: {
  461. handle_unusual:
  462. if (tag == 0) {
  463. goto success;
  464. }
  465. DO_(::google::protobuf::internal::WireFormat::SkipField(
  466. input, tag, _internal_metadata_.mutable_unknown_fields()));
  467. break;
  468. }
  469. }
  470. }
  471. success:
  472. // @@protoc_insertion_point(parse_success:message.Locate_status_msg)
  473. return true;
  474. failure:
  475. // @@protoc_insertion_point(parse_failure:message.Locate_status_msg)
  476. return false;
  477. #undef DO_
  478. }
  479. void Locate_status_msg::SerializeWithCachedSizes(
  480. ::google::protobuf::io::CodedOutputStream* output) const {
  481. // @@protoc_insertion_point(serialize_start:message.Locate_status_msg)
  482. ::google::protobuf::uint32 cached_has_bits = 0;
  483. (void) cached_has_bits;
  484. cached_has_bits = _has_bits_[0];
  485. // required .message.Message_type msg_type = 1;
  486. if (cached_has_bits & 0x00000002u) {
  487. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  488. 1, this->msg_type(), output);
  489. }
  490. // optional .message.Command_message cmd_msg = 2;
  491. if (cached_has_bits & 0x00000001u) {
  492. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  493. 2, *this->cmd_msg_, output);
  494. }
  495. // required .message.Lidar_statu dj_statu1 = 3;
  496. if (cached_has_bits & 0x00000004u) {
  497. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  498. 3, this->dj_statu1(), output);
  499. }
  500. // required .message.Lidar_statu dj_statu2 = 4;
  501. if (cached_has_bits & 0x00000008u) {
  502. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  503. 4, this->dj_statu2(), output);
  504. }
  505. // required .message.Lidar_statu dj_statu3 = 5;
  506. if (cached_has_bits & 0x00000010u) {
  507. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  508. 5, this->dj_statu3(), output);
  509. }
  510. // required .message.Lidar_statu dj_statu4 = 6;
  511. if (cached_has_bits & 0x00000020u) {
  512. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  513. 6, this->dj_statu4(), output);
  514. }
  515. if (_internal_metadata_.have_unknown_fields()) {
  516. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  517. _internal_metadata_.unknown_fields(), output);
  518. }
  519. // @@protoc_insertion_point(serialize_end:message.Locate_status_msg)
  520. }
  521. ::google::protobuf::uint8* Locate_status_msg::InternalSerializeWithCachedSizesToArray(
  522. bool deterministic, ::google::protobuf::uint8* target) const {
  523. (void)deterministic; // Unused
  524. // @@protoc_insertion_point(serialize_to_array_start:message.Locate_status_msg)
  525. ::google::protobuf::uint32 cached_has_bits = 0;
  526. (void) cached_has_bits;
  527. cached_has_bits = _has_bits_[0];
  528. // required .message.Message_type msg_type = 1;
  529. if (cached_has_bits & 0x00000002u) {
  530. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  531. 1, this->msg_type(), target);
  532. }
  533. // optional .message.Command_message cmd_msg = 2;
  534. if (cached_has_bits & 0x00000001u) {
  535. target = ::google::protobuf::internal::WireFormatLite::
  536. InternalWriteMessageToArray(
  537. 2, *this->cmd_msg_, deterministic, target);
  538. }
  539. // required .message.Lidar_statu dj_statu1 = 3;
  540. if (cached_has_bits & 0x00000004u) {
  541. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  542. 3, this->dj_statu1(), target);
  543. }
  544. // required .message.Lidar_statu dj_statu2 = 4;
  545. if (cached_has_bits & 0x00000008u) {
  546. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  547. 4, this->dj_statu2(), target);
  548. }
  549. // required .message.Lidar_statu dj_statu3 = 5;
  550. if (cached_has_bits & 0x00000010u) {
  551. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  552. 5, this->dj_statu3(), target);
  553. }
  554. // required .message.Lidar_statu dj_statu4 = 6;
  555. if (cached_has_bits & 0x00000020u) {
  556. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  557. 6, this->dj_statu4(), target);
  558. }
  559. if (_internal_metadata_.have_unknown_fields()) {
  560. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  561. _internal_metadata_.unknown_fields(), target);
  562. }
  563. // @@protoc_insertion_point(serialize_to_array_end:message.Locate_status_msg)
  564. return target;
  565. }
  566. size_t Locate_status_msg::RequiredFieldsByteSizeFallback() const {
  567. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Locate_status_msg)
  568. size_t total_size = 0;
  569. if (has_msg_type()) {
  570. // required .message.Message_type msg_type = 1;
  571. total_size += 1 +
  572. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  573. }
  574. if (has_dj_statu1()) {
  575. // required .message.Lidar_statu dj_statu1 = 3;
  576. total_size += 1 +
  577. ::google::protobuf::internal::WireFormatLite::EnumSize(this->dj_statu1());
  578. }
  579. if (has_dj_statu2()) {
  580. // required .message.Lidar_statu dj_statu2 = 4;
  581. total_size += 1 +
  582. ::google::protobuf::internal::WireFormatLite::EnumSize(this->dj_statu2());
  583. }
  584. if (has_dj_statu3()) {
  585. // required .message.Lidar_statu dj_statu3 = 5;
  586. total_size += 1 +
  587. ::google::protobuf::internal::WireFormatLite::EnumSize(this->dj_statu3());
  588. }
  589. if (has_dj_statu4()) {
  590. // required .message.Lidar_statu dj_statu4 = 6;
  591. total_size += 1 +
  592. ::google::protobuf::internal::WireFormatLite::EnumSize(this->dj_statu4());
  593. }
  594. return total_size;
  595. }
  596. size_t Locate_status_msg::ByteSizeLong() const {
  597. // @@protoc_insertion_point(message_byte_size_start:message.Locate_status_msg)
  598. size_t total_size = 0;
  599. if (_internal_metadata_.have_unknown_fields()) {
  600. total_size +=
  601. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  602. _internal_metadata_.unknown_fields());
  603. }
  604. if (((_has_bits_[0] & 0x0000003e) ^ 0x0000003e) == 0) { // All required fields are present.
  605. // required .message.Message_type msg_type = 1;
  606. total_size += 1 +
  607. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  608. // required .message.Lidar_statu dj_statu1 = 3;
  609. total_size += 1 +
  610. ::google::protobuf::internal::WireFormatLite::EnumSize(this->dj_statu1());
  611. // required .message.Lidar_statu dj_statu2 = 4;
  612. total_size += 1 +
  613. ::google::protobuf::internal::WireFormatLite::EnumSize(this->dj_statu2());
  614. // required .message.Lidar_statu dj_statu3 = 5;
  615. total_size += 1 +
  616. ::google::protobuf::internal::WireFormatLite::EnumSize(this->dj_statu3());
  617. // required .message.Lidar_statu dj_statu4 = 6;
  618. total_size += 1 +
  619. ::google::protobuf::internal::WireFormatLite::EnumSize(this->dj_statu4());
  620. } else {
  621. total_size += RequiredFieldsByteSizeFallback();
  622. }
  623. // optional .message.Command_message cmd_msg = 2;
  624. if (has_cmd_msg()) {
  625. total_size += 1 +
  626. ::google::protobuf::internal::WireFormatLite::MessageSize(
  627. *this->cmd_msg_);
  628. }
  629. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  630. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  631. _cached_size_ = cached_size;
  632. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  633. return total_size;
  634. }
  635. void Locate_status_msg::MergeFrom(const ::google::protobuf::Message& from) {
  636. // @@protoc_insertion_point(generalized_merge_from_start:message.Locate_status_msg)
  637. GOOGLE_DCHECK_NE(&from, this);
  638. const Locate_status_msg* source =
  639. ::google::protobuf::internal::DynamicCastToGenerated<const Locate_status_msg>(
  640. &from);
  641. if (source == NULL) {
  642. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Locate_status_msg)
  643. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  644. } else {
  645. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Locate_status_msg)
  646. MergeFrom(*source);
  647. }
  648. }
  649. void Locate_status_msg::MergeFrom(const Locate_status_msg& from) {
  650. // @@protoc_insertion_point(class_specific_merge_from_start:message.Locate_status_msg)
  651. GOOGLE_DCHECK_NE(&from, this);
  652. _internal_metadata_.MergeFrom(from._internal_metadata_);
  653. ::google::protobuf::uint32 cached_has_bits = 0;
  654. (void) cached_has_bits;
  655. cached_has_bits = from._has_bits_[0];
  656. if (cached_has_bits & 63u) {
  657. if (cached_has_bits & 0x00000001u) {
  658. mutable_cmd_msg()->::message::Command_message::MergeFrom(from.cmd_msg());
  659. }
  660. if (cached_has_bits & 0x00000002u) {
  661. msg_type_ = from.msg_type_;
  662. }
  663. if (cached_has_bits & 0x00000004u) {
  664. dj_statu1_ = from.dj_statu1_;
  665. }
  666. if (cached_has_bits & 0x00000008u) {
  667. dj_statu2_ = from.dj_statu2_;
  668. }
  669. if (cached_has_bits & 0x00000010u) {
  670. dj_statu3_ = from.dj_statu3_;
  671. }
  672. if (cached_has_bits & 0x00000020u) {
  673. dj_statu4_ = from.dj_statu4_;
  674. }
  675. _has_bits_[0] |= cached_has_bits;
  676. }
  677. }
  678. void Locate_status_msg::CopyFrom(const ::google::protobuf::Message& from) {
  679. // @@protoc_insertion_point(generalized_copy_from_start:message.Locate_status_msg)
  680. if (&from == this) return;
  681. Clear();
  682. MergeFrom(from);
  683. }
  684. void Locate_status_msg::CopyFrom(const Locate_status_msg& from) {
  685. // @@protoc_insertion_point(class_specific_copy_from_start:message.Locate_status_msg)
  686. if (&from == this) return;
  687. Clear();
  688. MergeFrom(from);
  689. }
  690. bool Locate_status_msg::IsInitialized() const {
  691. if ((_has_bits_[0] & 0x0000003e) != 0x0000003e) return false;
  692. if (has_cmd_msg()) {
  693. if (!this->cmd_msg_->IsInitialized()) return false;
  694. }
  695. return true;
  696. }
  697. void Locate_status_msg::Swap(Locate_status_msg* other) {
  698. if (other == this) return;
  699. InternalSwap(other);
  700. }
  701. void Locate_status_msg::InternalSwap(Locate_status_msg* other) {
  702. using std::swap;
  703. swap(cmd_msg_, other->cmd_msg_);
  704. swap(msg_type_, other->msg_type_);
  705. swap(dj_statu1_, other->dj_statu1_);
  706. swap(dj_statu2_, other->dj_statu2_);
  707. swap(dj_statu3_, other->dj_statu3_);
  708. swap(dj_statu4_, other->dj_statu4_);
  709. swap(_has_bits_[0], other->_has_bits_[0]);
  710. _internal_metadata_.Swap(&other->_internal_metadata_);
  711. swap(_cached_size_, other->_cached_size_);
  712. }
  713. ::google::protobuf::Metadata Locate_status_msg::GetMetadata() const {
  714. protobuf_locate_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  715. return ::protobuf_locate_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  716. }
  717. // ===================================================================
  718. void Locate_request_msg::InitAsDefaultInstance() {
  719. ::message::_Locate_request_msg_default_instance_._instance.get_mutable()->cmd_msg_ = const_cast< ::message::Command_message*>(
  720. ::message::Command_message::internal_default_instance());
  721. }
  722. void Locate_request_msg::clear_cmd_msg() {
  723. if (cmd_msg_ != NULL) cmd_msg_->Clear();
  724. clear_has_cmd_msg();
  725. }
  726. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  727. const int Locate_request_msg::kMsgTypeFieldNumber;
  728. const int Locate_request_msg::kCmdMsgFieldNumber;
  729. const int Locate_request_msg::kLocateTypeFieldNumber;
  730. const int Locate_request_msg::kTimeOutFieldNumber;
  731. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  732. Locate_request_msg::Locate_request_msg()
  733. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  734. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  735. ::protobuf_locate_5fmessage_2eproto::InitDefaultsLocate_request_msg();
  736. }
  737. SharedCtor();
  738. // @@protoc_insertion_point(constructor:message.Locate_request_msg)
  739. }
  740. Locate_request_msg::Locate_request_msg(const Locate_request_msg& from)
  741. : ::google::protobuf::Message(),
  742. _internal_metadata_(NULL),
  743. _has_bits_(from._has_bits_),
  744. _cached_size_(0) {
  745. _internal_metadata_.MergeFrom(from._internal_metadata_);
  746. if (from.has_cmd_msg()) {
  747. cmd_msg_ = new ::message::Command_message(*from.cmd_msg_);
  748. } else {
  749. cmd_msg_ = NULL;
  750. }
  751. ::memcpy(&msg_type_, &from.msg_type_,
  752. static_cast<size_t>(reinterpret_cast<char*>(&time_out_) -
  753. reinterpret_cast<char*>(&msg_type_)) + sizeof(time_out_));
  754. // @@protoc_insertion_point(copy_constructor:message.Locate_request_msg)
  755. }
  756. void Locate_request_msg::SharedCtor() {
  757. _cached_size_ = 0;
  758. ::memset(&cmd_msg_, 0, static_cast<size_t>(
  759. reinterpret_cast<char*>(&locate_type_) -
  760. reinterpret_cast<char*>(&cmd_msg_)) + sizeof(locate_type_));
  761. time_out_ = 5000;
  762. }
  763. Locate_request_msg::~Locate_request_msg() {
  764. // @@protoc_insertion_point(destructor:message.Locate_request_msg)
  765. SharedDtor();
  766. }
  767. void Locate_request_msg::SharedDtor() {
  768. if (this != internal_default_instance()) delete cmd_msg_;
  769. }
  770. void Locate_request_msg::SetCachedSize(int size) const {
  771. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  772. _cached_size_ = size;
  773. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  774. }
  775. const ::google::protobuf::Descriptor* Locate_request_msg::descriptor() {
  776. ::protobuf_locate_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  777. return ::protobuf_locate_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  778. }
  779. const Locate_request_msg& Locate_request_msg::default_instance() {
  780. ::protobuf_locate_5fmessage_2eproto::InitDefaultsLocate_request_msg();
  781. return *internal_default_instance();
  782. }
  783. Locate_request_msg* Locate_request_msg::New(::google::protobuf::Arena* arena) const {
  784. Locate_request_msg* n = new Locate_request_msg;
  785. if (arena != NULL) {
  786. arena->Own(n);
  787. }
  788. return n;
  789. }
  790. void Locate_request_msg::Clear() {
  791. // @@protoc_insertion_point(message_clear_start:message.Locate_request_msg)
  792. ::google::protobuf::uint32 cached_has_bits = 0;
  793. // Prevent compiler warnings about cached_has_bits being unused
  794. (void) cached_has_bits;
  795. cached_has_bits = _has_bits_[0];
  796. if (cached_has_bits & 0x00000001u) {
  797. GOOGLE_DCHECK(cmd_msg_ != NULL);
  798. cmd_msg_->Clear();
  799. }
  800. if (cached_has_bits & 14u) {
  801. ::memset(&msg_type_, 0, static_cast<size_t>(
  802. reinterpret_cast<char*>(&locate_type_) -
  803. reinterpret_cast<char*>(&msg_type_)) + sizeof(locate_type_));
  804. time_out_ = 5000;
  805. }
  806. _has_bits_.Clear();
  807. _internal_metadata_.Clear();
  808. }
  809. bool Locate_request_msg::MergePartialFromCodedStream(
  810. ::google::protobuf::io::CodedInputStream* input) {
  811. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  812. ::google::protobuf::uint32 tag;
  813. // @@protoc_insertion_point(parse_start:message.Locate_request_msg)
  814. for (;;) {
  815. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  816. tag = p.first;
  817. if (!p.second) goto handle_unusual;
  818. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  819. // required .message.Message_type msg_type = 1;
  820. case 1: {
  821. if (static_cast< ::google::protobuf::uint8>(tag) ==
  822. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  823. int value;
  824. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  825. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  826. input, &value)));
  827. if (::message::Message_type_IsValid(value)) {
  828. set_msg_type(static_cast< ::message::Message_type >(value));
  829. } else {
  830. mutable_unknown_fields()->AddVarint(
  831. 1, static_cast< ::google::protobuf::uint64>(value));
  832. }
  833. } else {
  834. goto handle_unusual;
  835. }
  836. break;
  837. }
  838. // required .message.Command_message cmd_msg = 2;
  839. case 2: {
  840. if (static_cast< ::google::protobuf::uint8>(tag) ==
  841. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  842. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  843. input, mutable_cmd_msg()));
  844. } else {
  845. goto handle_unusual;
  846. }
  847. break;
  848. }
  849. // required .message.Locate_type locate_type = 3;
  850. case 3: {
  851. if (static_cast< ::google::protobuf::uint8>(tag) ==
  852. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  853. int value;
  854. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  855. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  856. input, &value)));
  857. if (::message::Locate_type_IsValid(value)) {
  858. set_locate_type(static_cast< ::message::Locate_type >(value));
  859. } else {
  860. mutable_unknown_fields()->AddVarint(
  861. 3, static_cast< ::google::protobuf::uint64>(value));
  862. }
  863. } else {
  864. goto handle_unusual;
  865. }
  866. break;
  867. }
  868. // optional int32 time_out = 4 [default = 5000];
  869. case 4: {
  870. if (static_cast< ::google::protobuf::uint8>(tag) ==
  871. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  872. set_has_time_out();
  873. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  874. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  875. input, &time_out_)));
  876. } else {
  877. goto handle_unusual;
  878. }
  879. break;
  880. }
  881. default: {
  882. handle_unusual:
  883. if (tag == 0) {
  884. goto success;
  885. }
  886. DO_(::google::protobuf::internal::WireFormat::SkipField(
  887. input, tag, _internal_metadata_.mutable_unknown_fields()));
  888. break;
  889. }
  890. }
  891. }
  892. success:
  893. // @@protoc_insertion_point(parse_success:message.Locate_request_msg)
  894. return true;
  895. failure:
  896. // @@protoc_insertion_point(parse_failure:message.Locate_request_msg)
  897. return false;
  898. #undef DO_
  899. }
  900. void Locate_request_msg::SerializeWithCachedSizes(
  901. ::google::protobuf::io::CodedOutputStream* output) const {
  902. // @@protoc_insertion_point(serialize_start:message.Locate_request_msg)
  903. ::google::protobuf::uint32 cached_has_bits = 0;
  904. (void) cached_has_bits;
  905. cached_has_bits = _has_bits_[0];
  906. // required .message.Message_type msg_type = 1;
  907. if (cached_has_bits & 0x00000002u) {
  908. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  909. 1, this->msg_type(), output);
  910. }
  911. // required .message.Command_message cmd_msg = 2;
  912. if (cached_has_bits & 0x00000001u) {
  913. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  914. 2, *this->cmd_msg_, output);
  915. }
  916. // required .message.Locate_type locate_type = 3;
  917. if (cached_has_bits & 0x00000004u) {
  918. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  919. 3, this->locate_type(), output);
  920. }
  921. // optional int32 time_out = 4 [default = 5000];
  922. if (cached_has_bits & 0x00000008u) {
  923. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->time_out(), output);
  924. }
  925. if (_internal_metadata_.have_unknown_fields()) {
  926. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  927. _internal_metadata_.unknown_fields(), output);
  928. }
  929. // @@protoc_insertion_point(serialize_end:message.Locate_request_msg)
  930. }
  931. ::google::protobuf::uint8* Locate_request_msg::InternalSerializeWithCachedSizesToArray(
  932. bool deterministic, ::google::protobuf::uint8* target) const {
  933. (void)deterministic; // Unused
  934. // @@protoc_insertion_point(serialize_to_array_start:message.Locate_request_msg)
  935. ::google::protobuf::uint32 cached_has_bits = 0;
  936. (void) cached_has_bits;
  937. cached_has_bits = _has_bits_[0];
  938. // required .message.Message_type msg_type = 1;
  939. if (cached_has_bits & 0x00000002u) {
  940. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  941. 1, this->msg_type(), target);
  942. }
  943. // required .message.Command_message cmd_msg = 2;
  944. if (cached_has_bits & 0x00000001u) {
  945. target = ::google::protobuf::internal::WireFormatLite::
  946. InternalWriteMessageToArray(
  947. 2, *this->cmd_msg_, deterministic, target);
  948. }
  949. // required .message.Locate_type locate_type = 3;
  950. if (cached_has_bits & 0x00000004u) {
  951. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  952. 3, this->locate_type(), target);
  953. }
  954. // optional int32 time_out = 4 [default = 5000];
  955. if (cached_has_bits & 0x00000008u) {
  956. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->time_out(), target);
  957. }
  958. if (_internal_metadata_.have_unknown_fields()) {
  959. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  960. _internal_metadata_.unknown_fields(), target);
  961. }
  962. // @@protoc_insertion_point(serialize_to_array_end:message.Locate_request_msg)
  963. return target;
  964. }
  965. size_t Locate_request_msg::RequiredFieldsByteSizeFallback() const {
  966. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Locate_request_msg)
  967. size_t total_size = 0;
  968. if (has_cmd_msg()) {
  969. // required .message.Command_message cmd_msg = 2;
  970. total_size += 1 +
  971. ::google::protobuf::internal::WireFormatLite::MessageSize(
  972. *this->cmd_msg_);
  973. }
  974. if (has_msg_type()) {
  975. // required .message.Message_type msg_type = 1;
  976. total_size += 1 +
  977. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  978. }
  979. if (has_locate_type()) {
  980. // required .message.Locate_type locate_type = 3;
  981. total_size += 1 +
  982. ::google::protobuf::internal::WireFormatLite::EnumSize(this->locate_type());
  983. }
  984. return total_size;
  985. }
  986. size_t Locate_request_msg::ByteSizeLong() const {
  987. // @@protoc_insertion_point(message_byte_size_start:message.Locate_request_msg)
  988. size_t total_size = 0;
  989. if (_internal_metadata_.have_unknown_fields()) {
  990. total_size +=
  991. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  992. _internal_metadata_.unknown_fields());
  993. }
  994. if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
  995. // required .message.Command_message cmd_msg = 2;
  996. total_size += 1 +
  997. ::google::protobuf::internal::WireFormatLite::MessageSize(
  998. *this->cmd_msg_);
  999. // required .message.Message_type msg_type = 1;
  1000. total_size += 1 +
  1001. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  1002. // required .message.Locate_type locate_type = 3;
  1003. total_size += 1 +
  1004. ::google::protobuf::internal::WireFormatLite::EnumSize(this->locate_type());
  1005. } else {
  1006. total_size += RequiredFieldsByteSizeFallback();
  1007. }
  1008. // optional int32 time_out = 4 [default = 5000];
  1009. if (has_time_out()) {
  1010. total_size += 1 +
  1011. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1012. this->time_out());
  1013. }
  1014. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1015. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1016. _cached_size_ = cached_size;
  1017. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1018. return total_size;
  1019. }
  1020. void Locate_request_msg::MergeFrom(const ::google::protobuf::Message& from) {
  1021. // @@protoc_insertion_point(generalized_merge_from_start:message.Locate_request_msg)
  1022. GOOGLE_DCHECK_NE(&from, this);
  1023. const Locate_request_msg* source =
  1024. ::google::protobuf::internal::DynamicCastToGenerated<const Locate_request_msg>(
  1025. &from);
  1026. if (source == NULL) {
  1027. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Locate_request_msg)
  1028. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1029. } else {
  1030. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Locate_request_msg)
  1031. MergeFrom(*source);
  1032. }
  1033. }
  1034. void Locate_request_msg::MergeFrom(const Locate_request_msg& from) {
  1035. // @@protoc_insertion_point(class_specific_merge_from_start:message.Locate_request_msg)
  1036. GOOGLE_DCHECK_NE(&from, this);
  1037. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1038. ::google::protobuf::uint32 cached_has_bits = 0;
  1039. (void) cached_has_bits;
  1040. cached_has_bits = from._has_bits_[0];
  1041. if (cached_has_bits & 15u) {
  1042. if (cached_has_bits & 0x00000001u) {
  1043. mutable_cmd_msg()->::message::Command_message::MergeFrom(from.cmd_msg());
  1044. }
  1045. if (cached_has_bits & 0x00000002u) {
  1046. msg_type_ = from.msg_type_;
  1047. }
  1048. if (cached_has_bits & 0x00000004u) {
  1049. locate_type_ = from.locate_type_;
  1050. }
  1051. if (cached_has_bits & 0x00000008u) {
  1052. time_out_ = from.time_out_;
  1053. }
  1054. _has_bits_[0] |= cached_has_bits;
  1055. }
  1056. }
  1057. void Locate_request_msg::CopyFrom(const ::google::protobuf::Message& from) {
  1058. // @@protoc_insertion_point(generalized_copy_from_start:message.Locate_request_msg)
  1059. if (&from == this) return;
  1060. Clear();
  1061. MergeFrom(from);
  1062. }
  1063. void Locate_request_msg::CopyFrom(const Locate_request_msg& from) {
  1064. // @@protoc_insertion_point(class_specific_copy_from_start:message.Locate_request_msg)
  1065. if (&from == this) return;
  1066. Clear();
  1067. MergeFrom(from);
  1068. }
  1069. bool Locate_request_msg::IsInitialized() const {
  1070. if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  1071. if (has_cmd_msg()) {
  1072. if (!this->cmd_msg_->IsInitialized()) return false;
  1073. }
  1074. return true;
  1075. }
  1076. void Locate_request_msg::Swap(Locate_request_msg* other) {
  1077. if (other == this) return;
  1078. InternalSwap(other);
  1079. }
  1080. void Locate_request_msg::InternalSwap(Locate_request_msg* other) {
  1081. using std::swap;
  1082. swap(cmd_msg_, other->cmd_msg_);
  1083. swap(msg_type_, other->msg_type_);
  1084. swap(locate_type_, other->locate_type_);
  1085. swap(time_out_, other->time_out_);
  1086. swap(_has_bits_[0], other->_has_bits_[0]);
  1087. _internal_metadata_.Swap(&other->_internal_metadata_);
  1088. swap(_cached_size_, other->_cached_size_);
  1089. }
  1090. ::google::protobuf::Metadata Locate_request_msg::GetMetadata() const {
  1091. protobuf_locate_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1092. return ::protobuf_locate_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  1093. }
  1094. // ===================================================================
  1095. void Locate_response_msg::InitAsDefaultInstance() {
  1096. ::message::_Locate_response_msg_default_instance_._instance.get_mutable()->cmd_msg_ = const_cast< ::message::Command_message*>(
  1097. ::message::Command_message::internal_default_instance());
  1098. }
  1099. void Locate_response_msg::clear_cmd_msg() {
  1100. if (cmd_msg_ != NULL) cmd_msg_->Clear();
  1101. clear_has_cmd_msg();
  1102. }
  1103. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1104. const int Locate_response_msg::kMsgTypeFieldNumber;
  1105. const int Locate_response_msg::kCmdMsgFieldNumber;
  1106. const int Locate_response_msg::kErrorCodeFieldNumber;
  1107. const int Locate_response_msg::kErrorDescriptionFieldNumber;
  1108. const int Locate_response_msg::kLengthFieldNumber;
  1109. const int Locate_response_msg::kWidthFieldNumber;
  1110. const int Locate_response_msg::kHeightFieldNumber;
  1111. const int Locate_response_msg::kWheelBaseFieldNumber;
  1112. const int Locate_response_msg::kXFieldNumber;
  1113. const int Locate_response_msg::kYFieldNumber;
  1114. const int Locate_response_msg::kThetaFieldNumber;
  1115. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1116. Locate_response_msg::Locate_response_msg()
  1117. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1118. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1119. ::protobuf_locate_5fmessage_2eproto::InitDefaultsLocate_response_msg();
  1120. }
  1121. SharedCtor();
  1122. // @@protoc_insertion_point(constructor:message.Locate_response_msg)
  1123. }
  1124. Locate_response_msg::Locate_response_msg(const Locate_response_msg& from)
  1125. : ::google::protobuf::Message(),
  1126. _internal_metadata_(NULL),
  1127. _has_bits_(from._has_bits_),
  1128. _cached_size_(0) {
  1129. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1130. error_description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1131. if (from.has_error_description()) {
  1132. error_description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_description_);
  1133. }
  1134. if (from.has_cmd_msg()) {
  1135. cmd_msg_ = new ::message::Command_message(*from.cmd_msg_);
  1136. } else {
  1137. cmd_msg_ = NULL;
  1138. }
  1139. ::memcpy(&msg_type_, &from.msg_type_,
  1140. static_cast<size_t>(reinterpret_cast<char*>(&theta_) -
  1141. reinterpret_cast<char*>(&msg_type_)) + sizeof(theta_));
  1142. // @@protoc_insertion_point(copy_constructor:message.Locate_response_msg)
  1143. }
  1144. void Locate_response_msg::SharedCtor() {
  1145. _cached_size_ = 0;
  1146. error_description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1147. ::memset(&cmd_msg_, 0, static_cast<size_t>(
  1148. reinterpret_cast<char*>(&theta_) -
  1149. reinterpret_cast<char*>(&cmd_msg_)) + sizeof(theta_));
  1150. }
  1151. Locate_response_msg::~Locate_response_msg() {
  1152. // @@protoc_insertion_point(destructor:message.Locate_response_msg)
  1153. SharedDtor();
  1154. }
  1155. void Locate_response_msg::SharedDtor() {
  1156. error_description_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1157. if (this != internal_default_instance()) delete cmd_msg_;
  1158. }
  1159. void Locate_response_msg::SetCachedSize(int size) const {
  1160. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1161. _cached_size_ = size;
  1162. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1163. }
  1164. const ::google::protobuf::Descriptor* Locate_response_msg::descriptor() {
  1165. ::protobuf_locate_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1166. return ::protobuf_locate_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1167. }
  1168. const Locate_response_msg& Locate_response_msg::default_instance() {
  1169. ::protobuf_locate_5fmessage_2eproto::InitDefaultsLocate_response_msg();
  1170. return *internal_default_instance();
  1171. }
  1172. Locate_response_msg* Locate_response_msg::New(::google::protobuf::Arena* arena) const {
  1173. Locate_response_msg* n = new Locate_response_msg;
  1174. if (arena != NULL) {
  1175. arena->Own(n);
  1176. }
  1177. return n;
  1178. }
  1179. void Locate_response_msg::Clear() {
  1180. // @@protoc_insertion_point(message_clear_start:message.Locate_response_msg)
  1181. ::google::protobuf::uint32 cached_has_bits = 0;
  1182. // Prevent compiler warnings about cached_has_bits being unused
  1183. (void) cached_has_bits;
  1184. cached_has_bits = _has_bits_[0];
  1185. if (cached_has_bits & 3u) {
  1186. if (cached_has_bits & 0x00000001u) {
  1187. GOOGLE_DCHECK(!error_description_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  1188. (*error_description_.UnsafeRawStringPointer())->clear();
  1189. }
  1190. if (cached_has_bits & 0x00000002u) {
  1191. GOOGLE_DCHECK(cmd_msg_ != NULL);
  1192. cmd_msg_->Clear();
  1193. }
  1194. }
  1195. if (cached_has_bits & 252u) {
  1196. ::memset(&msg_type_, 0, static_cast<size_t>(
  1197. reinterpret_cast<char*>(&wheel_base_) -
  1198. reinterpret_cast<char*>(&msg_type_)) + sizeof(wheel_base_));
  1199. }
  1200. if (cached_has_bits & 1792u) {
  1201. ::memset(&x_, 0, static_cast<size_t>(
  1202. reinterpret_cast<char*>(&theta_) -
  1203. reinterpret_cast<char*>(&x_)) + sizeof(theta_));
  1204. }
  1205. _has_bits_.Clear();
  1206. _internal_metadata_.Clear();
  1207. }
  1208. bool Locate_response_msg::MergePartialFromCodedStream(
  1209. ::google::protobuf::io::CodedInputStream* input) {
  1210. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1211. ::google::protobuf::uint32 tag;
  1212. // @@protoc_insertion_point(parse_start:message.Locate_response_msg)
  1213. for (;;) {
  1214. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1215. tag = p.first;
  1216. if (!p.second) goto handle_unusual;
  1217. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1218. // required .message.Message_type msg_type = 1;
  1219. case 1: {
  1220. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1221. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1222. int value;
  1223. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1224. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1225. input, &value)));
  1226. if (::message::Message_type_IsValid(value)) {
  1227. set_msg_type(static_cast< ::message::Message_type >(value));
  1228. } else {
  1229. mutable_unknown_fields()->AddVarint(
  1230. 1, static_cast< ::google::protobuf::uint64>(value));
  1231. }
  1232. } else {
  1233. goto handle_unusual;
  1234. }
  1235. break;
  1236. }
  1237. // required .message.Command_message cmd_msg = 2;
  1238. case 2: {
  1239. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1240. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1241. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1242. input, mutable_cmd_msg()));
  1243. } else {
  1244. goto handle_unusual;
  1245. }
  1246. break;
  1247. }
  1248. // required int32 error_code = 3;
  1249. case 3: {
  1250. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1251. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  1252. set_has_error_code();
  1253. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1254. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1255. input, &error_code_)));
  1256. } else {
  1257. goto handle_unusual;
  1258. }
  1259. break;
  1260. }
  1261. // optional string error_description = 4;
  1262. case 4: {
  1263. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1264. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1265. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1266. input, this->mutable_error_description()));
  1267. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1268. this->error_description().data(), static_cast<int>(this->error_description().length()),
  1269. ::google::protobuf::internal::WireFormat::PARSE,
  1270. "message.Locate_response_msg.error_description");
  1271. } else {
  1272. goto handle_unusual;
  1273. }
  1274. break;
  1275. }
  1276. // optional float length = 5;
  1277. case 5: {
  1278. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1279. static_cast< ::google::protobuf::uint8>(45u /* 45 & 0xFF */)) {
  1280. set_has_length();
  1281. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1282. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  1283. input, &length_)));
  1284. } else {
  1285. goto handle_unusual;
  1286. }
  1287. break;
  1288. }
  1289. // optional float width = 6;
  1290. case 6: {
  1291. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1292. static_cast< ::google::protobuf::uint8>(53u /* 53 & 0xFF */)) {
  1293. set_has_width();
  1294. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1295. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  1296. input, &width_)));
  1297. } else {
  1298. goto handle_unusual;
  1299. }
  1300. break;
  1301. }
  1302. // optional float height = 7;
  1303. case 7: {
  1304. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1305. static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
  1306. set_has_height();
  1307. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1308. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  1309. input, &height_)));
  1310. } else {
  1311. goto handle_unusual;
  1312. }
  1313. break;
  1314. }
  1315. // optional float wheel_base = 8;
  1316. case 8: {
  1317. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1318. static_cast< ::google::protobuf::uint8>(69u /* 69 & 0xFF */)) {
  1319. set_has_wheel_base();
  1320. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1321. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  1322. input, &wheel_base_)));
  1323. } else {
  1324. goto handle_unusual;
  1325. }
  1326. break;
  1327. }
  1328. // optional float x = 9;
  1329. case 9: {
  1330. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1331. static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
  1332. set_has_x();
  1333. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1334. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  1335. input, &x_)));
  1336. } else {
  1337. goto handle_unusual;
  1338. }
  1339. break;
  1340. }
  1341. // optional float y = 10;
  1342. case 10: {
  1343. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1344. static_cast< ::google::protobuf::uint8>(85u /* 85 & 0xFF */)) {
  1345. set_has_y();
  1346. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1347. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  1348. input, &y_)));
  1349. } else {
  1350. goto handle_unusual;
  1351. }
  1352. break;
  1353. }
  1354. // optional float theta = 11;
  1355. case 11: {
  1356. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1357. static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
  1358. set_has_theta();
  1359. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1360. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  1361. input, &theta_)));
  1362. } else {
  1363. goto handle_unusual;
  1364. }
  1365. break;
  1366. }
  1367. default: {
  1368. handle_unusual:
  1369. if (tag == 0) {
  1370. goto success;
  1371. }
  1372. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1373. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1374. break;
  1375. }
  1376. }
  1377. }
  1378. success:
  1379. // @@protoc_insertion_point(parse_success:message.Locate_response_msg)
  1380. return true;
  1381. failure:
  1382. // @@protoc_insertion_point(parse_failure:message.Locate_response_msg)
  1383. return false;
  1384. #undef DO_
  1385. }
  1386. void Locate_response_msg::SerializeWithCachedSizes(
  1387. ::google::protobuf::io::CodedOutputStream* output) const {
  1388. // @@protoc_insertion_point(serialize_start:message.Locate_response_msg)
  1389. ::google::protobuf::uint32 cached_has_bits = 0;
  1390. (void) cached_has_bits;
  1391. cached_has_bits = _has_bits_[0];
  1392. // required .message.Message_type msg_type = 1;
  1393. if (cached_has_bits & 0x00000004u) {
  1394. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1395. 1, this->msg_type(), output);
  1396. }
  1397. // required .message.Command_message cmd_msg = 2;
  1398. if (cached_has_bits & 0x00000002u) {
  1399. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1400. 2, *this->cmd_msg_, output);
  1401. }
  1402. // required int32 error_code = 3;
  1403. if (cached_has_bits & 0x00000008u) {
  1404. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->error_code(), output);
  1405. }
  1406. // optional string error_description = 4;
  1407. if (cached_has_bits & 0x00000001u) {
  1408. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1409. this->error_description().data(), static_cast<int>(this->error_description().length()),
  1410. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1411. "message.Locate_response_msg.error_description");
  1412. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1413. 4, this->error_description(), output);
  1414. }
  1415. // optional float length = 5;
  1416. if (cached_has_bits & 0x00000010u) {
  1417. ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->length(), output);
  1418. }
  1419. // optional float width = 6;
  1420. if (cached_has_bits & 0x00000020u) {
  1421. ::google::protobuf::internal::WireFormatLite::WriteFloat(6, this->width(), output);
  1422. }
  1423. // optional float height = 7;
  1424. if (cached_has_bits & 0x00000040u) {
  1425. ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->height(), output);
  1426. }
  1427. // optional float wheel_base = 8;
  1428. if (cached_has_bits & 0x00000080u) {
  1429. ::google::protobuf::internal::WireFormatLite::WriteFloat(8, this->wheel_base(), output);
  1430. }
  1431. // optional float x = 9;
  1432. if (cached_has_bits & 0x00000100u) {
  1433. ::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->x(), output);
  1434. }
  1435. // optional float y = 10;
  1436. if (cached_has_bits & 0x00000200u) {
  1437. ::google::protobuf::internal::WireFormatLite::WriteFloat(10, this->y(), output);
  1438. }
  1439. // optional float theta = 11;
  1440. if (cached_has_bits & 0x00000400u) {
  1441. ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->theta(), output);
  1442. }
  1443. if (_internal_metadata_.have_unknown_fields()) {
  1444. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1445. _internal_metadata_.unknown_fields(), output);
  1446. }
  1447. // @@protoc_insertion_point(serialize_end:message.Locate_response_msg)
  1448. }
  1449. ::google::protobuf::uint8* Locate_response_msg::InternalSerializeWithCachedSizesToArray(
  1450. bool deterministic, ::google::protobuf::uint8* target) const {
  1451. (void)deterministic; // Unused
  1452. // @@protoc_insertion_point(serialize_to_array_start:message.Locate_response_msg)
  1453. ::google::protobuf::uint32 cached_has_bits = 0;
  1454. (void) cached_has_bits;
  1455. cached_has_bits = _has_bits_[0];
  1456. // required .message.Message_type msg_type = 1;
  1457. if (cached_has_bits & 0x00000004u) {
  1458. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1459. 1, this->msg_type(), target);
  1460. }
  1461. // required .message.Command_message cmd_msg = 2;
  1462. if (cached_has_bits & 0x00000002u) {
  1463. target = ::google::protobuf::internal::WireFormatLite::
  1464. InternalWriteMessageToArray(
  1465. 2, *this->cmd_msg_, deterministic, target);
  1466. }
  1467. // required int32 error_code = 3;
  1468. if (cached_has_bits & 0x00000008u) {
  1469. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->error_code(), target);
  1470. }
  1471. // optional string error_description = 4;
  1472. if (cached_has_bits & 0x00000001u) {
  1473. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1474. this->error_description().data(), static_cast<int>(this->error_description().length()),
  1475. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1476. "message.Locate_response_msg.error_description");
  1477. target =
  1478. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1479. 4, this->error_description(), target);
  1480. }
  1481. // optional float length = 5;
  1482. if (cached_has_bits & 0x00000010u) {
  1483. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->length(), target);
  1484. }
  1485. // optional float width = 6;
  1486. if (cached_has_bits & 0x00000020u) {
  1487. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(6, this->width(), target);
  1488. }
  1489. // optional float height = 7;
  1490. if (cached_has_bits & 0x00000040u) {
  1491. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->height(), target);
  1492. }
  1493. // optional float wheel_base = 8;
  1494. if (cached_has_bits & 0x00000080u) {
  1495. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(8, this->wheel_base(), target);
  1496. }
  1497. // optional float x = 9;
  1498. if (cached_has_bits & 0x00000100u) {
  1499. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->x(), target);
  1500. }
  1501. // optional float y = 10;
  1502. if (cached_has_bits & 0x00000200u) {
  1503. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(10, this->y(), target);
  1504. }
  1505. // optional float theta = 11;
  1506. if (cached_has_bits & 0x00000400u) {
  1507. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->theta(), target);
  1508. }
  1509. if (_internal_metadata_.have_unknown_fields()) {
  1510. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1511. _internal_metadata_.unknown_fields(), target);
  1512. }
  1513. // @@protoc_insertion_point(serialize_to_array_end:message.Locate_response_msg)
  1514. return target;
  1515. }
  1516. size_t Locate_response_msg::RequiredFieldsByteSizeFallback() const {
  1517. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Locate_response_msg)
  1518. size_t total_size = 0;
  1519. if (has_cmd_msg()) {
  1520. // required .message.Command_message cmd_msg = 2;
  1521. total_size += 1 +
  1522. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1523. *this->cmd_msg_);
  1524. }
  1525. if (has_msg_type()) {
  1526. // required .message.Message_type msg_type = 1;
  1527. total_size += 1 +
  1528. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  1529. }
  1530. if (has_error_code()) {
  1531. // required int32 error_code = 3;
  1532. total_size += 1 +
  1533. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1534. this->error_code());
  1535. }
  1536. return total_size;
  1537. }
  1538. size_t Locate_response_msg::ByteSizeLong() const {
  1539. // @@protoc_insertion_point(message_byte_size_start:message.Locate_response_msg)
  1540. size_t total_size = 0;
  1541. if (_internal_metadata_.have_unknown_fields()) {
  1542. total_size +=
  1543. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1544. _internal_metadata_.unknown_fields());
  1545. }
  1546. if (((_has_bits_[0] & 0x0000000e) ^ 0x0000000e) == 0) { // All required fields are present.
  1547. // required .message.Command_message cmd_msg = 2;
  1548. total_size += 1 +
  1549. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1550. *this->cmd_msg_);
  1551. // required .message.Message_type msg_type = 1;
  1552. total_size += 1 +
  1553. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  1554. // required int32 error_code = 3;
  1555. total_size += 1 +
  1556. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1557. this->error_code());
  1558. } else {
  1559. total_size += RequiredFieldsByteSizeFallback();
  1560. }
  1561. // optional string error_description = 4;
  1562. if (has_error_description()) {
  1563. total_size += 1 +
  1564. ::google::protobuf::internal::WireFormatLite::StringSize(
  1565. this->error_description());
  1566. }
  1567. if (_has_bits_[0 / 32] & 240u) {
  1568. // optional float length = 5;
  1569. if (has_length()) {
  1570. total_size += 1 + 4;
  1571. }
  1572. // optional float width = 6;
  1573. if (has_width()) {
  1574. total_size += 1 + 4;
  1575. }
  1576. // optional float height = 7;
  1577. if (has_height()) {
  1578. total_size += 1 + 4;
  1579. }
  1580. // optional float wheel_base = 8;
  1581. if (has_wheel_base()) {
  1582. total_size += 1 + 4;
  1583. }
  1584. }
  1585. if (_has_bits_[8 / 32] & 1792u) {
  1586. // optional float x = 9;
  1587. if (has_x()) {
  1588. total_size += 1 + 4;
  1589. }
  1590. // optional float y = 10;
  1591. if (has_y()) {
  1592. total_size += 1 + 4;
  1593. }
  1594. // optional float theta = 11;
  1595. if (has_theta()) {
  1596. total_size += 1 + 4;
  1597. }
  1598. }
  1599. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1600. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1601. _cached_size_ = cached_size;
  1602. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1603. return total_size;
  1604. }
  1605. void Locate_response_msg::MergeFrom(const ::google::protobuf::Message& from) {
  1606. // @@protoc_insertion_point(generalized_merge_from_start:message.Locate_response_msg)
  1607. GOOGLE_DCHECK_NE(&from, this);
  1608. const Locate_response_msg* source =
  1609. ::google::protobuf::internal::DynamicCastToGenerated<const Locate_response_msg>(
  1610. &from);
  1611. if (source == NULL) {
  1612. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Locate_response_msg)
  1613. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1614. } else {
  1615. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Locate_response_msg)
  1616. MergeFrom(*source);
  1617. }
  1618. }
  1619. void Locate_response_msg::MergeFrom(const Locate_response_msg& from) {
  1620. // @@protoc_insertion_point(class_specific_merge_from_start:message.Locate_response_msg)
  1621. GOOGLE_DCHECK_NE(&from, this);
  1622. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1623. ::google::protobuf::uint32 cached_has_bits = 0;
  1624. (void) cached_has_bits;
  1625. cached_has_bits = from._has_bits_[0];
  1626. if (cached_has_bits & 255u) {
  1627. if (cached_has_bits & 0x00000001u) {
  1628. set_has_error_description();
  1629. error_description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_description_);
  1630. }
  1631. if (cached_has_bits & 0x00000002u) {
  1632. mutable_cmd_msg()->::message::Command_message::MergeFrom(from.cmd_msg());
  1633. }
  1634. if (cached_has_bits & 0x00000004u) {
  1635. msg_type_ = from.msg_type_;
  1636. }
  1637. if (cached_has_bits & 0x00000008u) {
  1638. error_code_ = from.error_code_;
  1639. }
  1640. if (cached_has_bits & 0x00000010u) {
  1641. length_ = from.length_;
  1642. }
  1643. if (cached_has_bits & 0x00000020u) {
  1644. width_ = from.width_;
  1645. }
  1646. if (cached_has_bits & 0x00000040u) {
  1647. height_ = from.height_;
  1648. }
  1649. if (cached_has_bits & 0x00000080u) {
  1650. wheel_base_ = from.wheel_base_;
  1651. }
  1652. _has_bits_[0] |= cached_has_bits;
  1653. }
  1654. if (cached_has_bits & 1792u) {
  1655. if (cached_has_bits & 0x00000100u) {
  1656. x_ = from.x_;
  1657. }
  1658. if (cached_has_bits & 0x00000200u) {
  1659. y_ = from.y_;
  1660. }
  1661. if (cached_has_bits & 0x00000400u) {
  1662. theta_ = from.theta_;
  1663. }
  1664. _has_bits_[0] |= cached_has_bits;
  1665. }
  1666. }
  1667. void Locate_response_msg::CopyFrom(const ::google::protobuf::Message& from) {
  1668. // @@protoc_insertion_point(generalized_copy_from_start:message.Locate_response_msg)
  1669. if (&from == this) return;
  1670. Clear();
  1671. MergeFrom(from);
  1672. }
  1673. void Locate_response_msg::CopyFrom(const Locate_response_msg& from) {
  1674. // @@protoc_insertion_point(class_specific_copy_from_start:message.Locate_response_msg)
  1675. if (&from == this) return;
  1676. Clear();
  1677. MergeFrom(from);
  1678. }
  1679. bool Locate_response_msg::IsInitialized() const {
  1680. if ((_has_bits_[0] & 0x0000000e) != 0x0000000e) return false;
  1681. if (has_cmd_msg()) {
  1682. if (!this->cmd_msg_->IsInitialized()) return false;
  1683. }
  1684. return true;
  1685. }
  1686. void Locate_response_msg::Swap(Locate_response_msg* other) {
  1687. if (other == this) return;
  1688. InternalSwap(other);
  1689. }
  1690. void Locate_response_msg::InternalSwap(Locate_response_msg* other) {
  1691. using std::swap;
  1692. error_description_.Swap(&other->error_description_);
  1693. swap(cmd_msg_, other->cmd_msg_);
  1694. swap(msg_type_, other->msg_type_);
  1695. swap(error_code_, other->error_code_);
  1696. swap(length_, other->length_);
  1697. swap(width_, other->width_);
  1698. swap(height_, other->height_);
  1699. swap(wheel_base_, other->wheel_base_);
  1700. swap(x_, other->x_);
  1701. swap(y_, other->y_);
  1702. swap(theta_, other->theta_);
  1703. swap(_has_bits_[0], other->_has_bits_[0]);
  1704. _internal_metadata_.Swap(&other->_internal_metadata_);
  1705. swap(_cached_size_, other->_cached_size_);
  1706. }
  1707. ::google::protobuf::Metadata Locate_response_msg::GetMetadata() const {
  1708. protobuf_locate_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1709. return ::protobuf_locate_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  1710. }
  1711. // @@protoc_insertion_point(namespace_scope)
  1712. } // namespace message
  1713. // @@protoc_insertion_point(global_scope)