locate_message.pb.cc 68 KB

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