ground_measure_msg.pb.cc 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: ground_measure_msg.proto
  3. #include "ground_measure_msg.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 Ground_measure_statu_msgDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<Ground_measure_statu_msg>
  23. _instance;
  24. } _Ground_measure_statu_msg_default_instance_;
  25. } // namespace message
  26. namespace protobuf_ground_5fmeasure_5fmsg_2eproto {
  27. void InitDefaultsGround_measure_statu_msgImpl() {
  28. GOOGLE_PROTOBUF_VERIFY_VERSION;
  29. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  30. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  31. #else
  32. ::google::protobuf::internal::InitProtobufDefaults();
  33. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  34. protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
  35. protobuf_message_5fbase_2eproto::InitDefaultsLocate_information();
  36. {
  37. void* ptr = &::message::_Ground_measure_statu_msg_default_instance_;
  38. new (ptr) ::message::Ground_measure_statu_msg();
  39. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  40. }
  41. ::message::Ground_measure_statu_msg::InitAsDefaultInstance();
  42. }
  43. void InitDefaultsGround_measure_statu_msg() {
  44. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  45. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsGround_measure_statu_msgImpl);
  46. }
  47. ::google::protobuf::Metadata file_level_metadata[1];
  48. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2];
  49. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  50. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, _has_bits_),
  51. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, _internal_metadata_),
  52. ~0u, // no _extensions_
  53. ~0u, // no _oneof_case_
  54. ~0u, // no _weak_field_map_
  55. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, base_info_),
  56. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, id_),
  57. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, laser_statu_vector_),
  58. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, ground_statu_),
  59. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, locate_information_realtime_),
  60. 0,
  61. 2,
  62. ~0u,
  63. 3,
  64. 1,
  65. };
  66. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  67. { 0, 10, sizeof(::message::Ground_measure_statu_msg)},
  68. };
  69. static ::google::protobuf::Message const * const file_default_instances[] = {
  70. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Ground_measure_statu_msg_default_instance_),
  71. };
  72. void protobuf_AssignDescriptors() {
  73. AddDescriptors();
  74. ::google::protobuf::MessageFactory* factory = NULL;
  75. AssignDescriptors(
  76. "ground_measure_msg.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  77. file_level_metadata, file_level_enum_descriptors, NULL);
  78. }
  79. void protobuf_AssignDescriptorsOnce() {
  80. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  81. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  82. }
  83. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  84. void protobuf_RegisterTypes(const ::std::string&) {
  85. protobuf_AssignDescriptorsOnce();
  86. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
  87. }
  88. void AddDescriptorsImpl() {
  89. InitDefaults();
  90. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  91. "\n\030ground_measure_msg.proto\022\007message\032\022mes"
  92. "sage_base.proto\"\356\001\n\030Ground_measure_statu"
  93. "_msg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_i"
  94. "nfo\022\n\n\002id\030\002 \002(\005\0220\n\022laser_statu_vector\030\003 "
  95. "\003(\0162\024.message.Laser_statu\022+\n\014ground_stat"
  96. "u\030\004 \002(\0162\025.message.Ground_statu\022@\n\033locate"
  97. "_information_realtime\030\005 \001(\0132\033.message.Lo"
  98. "cate_information*U\n\013Laser_statu\022\024\n\020LASER"
  99. "_DISCONNECT\020\000\022\017\n\013LASER_READY\020\001\022\016\n\nLASER_"
  100. "BUSY\020\002\022\017\n\013LASER_FAULT\020\003*\201\001\n\014Ground_statu"
  101. "\022\013\n\007Nothing\020\000\022\t\n\005Noise\020\001\022\017\n\013Car_correct\020"
  102. "\002\022\020\n\014Car_left_out\020\003\022\021\n\rCar_right_out\020\004\022\017"
  103. "\n\013Car_top_out\020\005\022\022\n\016Car_bottom_out\020\006"
  104. };
  105. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  106. descriptor, 515);
  107. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  108. "ground_measure_msg.proto", &protobuf_RegisterTypes);
  109. ::protobuf_message_5fbase_2eproto::AddDescriptors();
  110. }
  111. void AddDescriptors() {
  112. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  113. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  114. }
  115. // Force AddDescriptors() to be called at dynamic initialization time.
  116. struct StaticDescriptorInitializer {
  117. StaticDescriptorInitializer() {
  118. AddDescriptors();
  119. }
  120. } static_descriptor_initializer;
  121. } // namespace protobuf_ground_5fmeasure_5fmsg_2eproto
  122. namespace message {
  123. const ::google::protobuf::EnumDescriptor* Laser_statu_descriptor() {
  124. protobuf_ground_5fmeasure_5fmsg_2eproto::protobuf_AssignDescriptorsOnce();
  125. return protobuf_ground_5fmeasure_5fmsg_2eproto::file_level_enum_descriptors[0];
  126. }
  127. bool Laser_statu_IsValid(int value) {
  128. switch (value) {
  129. case 0:
  130. case 1:
  131. case 2:
  132. case 3:
  133. return true;
  134. default:
  135. return false;
  136. }
  137. }
  138. const ::google::protobuf::EnumDescriptor* Ground_statu_descriptor() {
  139. protobuf_ground_5fmeasure_5fmsg_2eproto::protobuf_AssignDescriptorsOnce();
  140. return protobuf_ground_5fmeasure_5fmsg_2eproto::file_level_enum_descriptors[1];
  141. }
  142. bool Ground_statu_IsValid(int value) {
  143. switch (value) {
  144. case 0:
  145. case 1:
  146. case 2:
  147. case 3:
  148. case 4:
  149. case 5:
  150. case 6:
  151. return true;
  152. default:
  153. return false;
  154. }
  155. }
  156. // ===================================================================
  157. void Ground_measure_statu_msg::InitAsDefaultInstance() {
  158. ::message::_Ground_measure_statu_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
  159. ::message::Base_info::internal_default_instance());
  160. ::message::_Ground_measure_statu_msg_default_instance_._instance.get_mutable()->locate_information_realtime_ = const_cast< ::message::Locate_information*>(
  161. ::message::Locate_information::internal_default_instance());
  162. }
  163. void Ground_measure_statu_msg::clear_base_info() {
  164. if (base_info_ != NULL) base_info_->Clear();
  165. clear_has_base_info();
  166. }
  167. void Ground_measure_statu_msg::clear_locate_information_realtime() {
  168. if (locate_information_realtime_ != NULL) locate_information_realtime_->Clear();
  169. clear_has_locate_information_realtime();
  170. }
  171. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  172. const int Ground_measure_statu_msg::kBaseInfoFieldNumber;
  173. const int Ground_measure_statu_msg::kIdFieldNumber;
  174. const int Ground_measure_statu_msg::kLaserStatuVectorFieldNumber;
  175. const int Ground_measure_statu_msg::kGroundStatuFieldNumber;
  176. const int Ground_measure_statu_msg::kLocateInformationRealtimeFieldNumber;
  177. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  178. Ground_measure_statu_msg::Ground_measure_statu_msg()
  179. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  180. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  181. ::protobuf_ground_5fmeasure_5fmsg_2eproto::InitDefaultsGround_measure_statu_msg();
  182. }
  183. SharedCtor();
  184. // @@protoc_insertion_point(constructor:message.Ground_measure_statu_msg)
  185. }
  186. Ground_measure_statu_msg::Ground_measure_statu_msg(const Ground_measure_statu_msg& from)
  187. : ::google::protobuf::Message(),
  188. _internal_metadata_(NULL),
  189. _has_bits_(from._has_bits_),
  190. _cached_size_(0),
  191. laser_statu_vector_(from.laser_statu_vector_) {
  192. _internal_metadata_.MergeFrom(from._internal_metadata_);
  193. if (from.has_base_info()) {
  194. base_info_ = new ::message::Base_info(*from.base_info_);
  195. } else {
  196. base_info_ = NULL;
  197. }
  198. if (from.has_locate_information_realtime()) {
  199. locate_information_realtime_ = new ::message::Locate_information(*from.locate_information_realtime_);
  200. } else {
  201. locate_information_realtime_ = NULL;
  202. }
  203. ::memcpy(&id_, &from.id_,
  204. static_cast<size_t>(reinterpret_cast<char*>(&ground_statu_) -
  205. reinterpret_cast<char*>(&id_)) + sizeof(ground_statu_));
  206. // @@protoc_insertion_point(copy_constructor:message.Ground_measure_statu_msg)
  207. }
  208. void Ground_measure_statu_msg::SharedCtor() {
  209. _cached_size_ = 0;
  210. ::memset(&base_info_, 0, static_cast<size_t>(
  211. reinterpret_cast<char*>(&ground_statu_) -
  212. reinterpret_cast<char*>(&base_info_)) + sizeof(ground_statu_));
  213. }
  214. Ground_measure_statu_msg::~Ground_measure_statu_msg() {
  215. // @@protoc_insertion_point(destructor:message.Ground_measure_statu_msg)
  216. SharedDtor();
  217. }
  218. void Ground_measure_statu_msg::SharedDtor() {
  219. if (this != internal_default_instance()) delete base_info_;
  220. if (this != internal_default_instance()) delete locate_information_realtime_;
  221. }
  222. void Ground_measure_statu_msg::SetCachedSize(int size) const {
  223. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  224. _cached_size_ = size;
  225. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  226. }
  227. const ::google::protobuf::Descriptor* Ground_measure_statu_msg::descriptor() {
  228. ::protobuf_ground_5fmeasure_5fmsg_2eproto::protobuf_AssignDescriptorsOnce();
  229. return ::protobuf_ground_5fmeasure_5fmsg_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  230. }
  231. const Ground_measure_statu_msg& Ground_measure_statu_msg::default_instance() {
  232. ::protobuf_ground_5fmeasure_5fmsg_2eproto::InitDefaultsGround_measure_statu_msg();
  233. return *internal_default_instance();
  234. }
  235. Ground_measure_statu_msg* Ground_measure_statu_msg::New(::google::protobuf::Arena* arena) const {
  236. Ground_measure_statu_msg* n = new Ground_measure_statu_msg;
  237. if (arena != NULL) {
  238. arena->Own(n);
  239. }
  240. return n;
  241. }
  242. void Ground_measure_statu_msg::Clear() {
  243. // @@protoc_insertion_point(message_clear_start:message.Ground_measure_statu_msg)
  244. ::google::protobuf::uint32 cached_has_bits = 0;
  245. // Prevent compiler warnings about cached_has_bits being unused
  246. (void) cached_has_bits;
  247. laser_statu_vector_.Clear();
  248. cached_has_bits = _has_bits_[0];
  249. if (cached_has_bits & 3u) {
  250. if (cached_has_bits & 0x00000001u) {
  251. GOOGLE_DCHECK(base_info_ != NULL);
  252. base_info_->Clear();
  253. }
  254. if (cached_has_bits & 0x00000002u) {
  255. GOOGLE_DCHECK(locate_information_realtime_ != NULL);
  256. locate_information_realtime_->Clear();
  257. }
  258. }
  259. if (cached_has_bits & 12u) {
  260. ::memset(&id_, 0, static_cast<size_t>(
  261. reinterpret_cast<char*>(&ground_statu_) -
  262. reinterpret_cast<char*>(&id_)) + sizeof(ground_statu_));
  263. }
  264. _has_bits_.Clear();
  265. _internal_metadata_.Clear();
  266. }
  267. bool Ground_measure_statu_msg::MergePartialFromCodedStream(
  268. ::google::protobuf::io::CodedInputStream* input) {
  269. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  270. ::google::protobuf::uint32 tag;
  271. // @@protoc_insertion_point(parse_start:message.Ground_measure_statu_msg)
  272. for (;;) {
  273. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  274. tag = p.first;
  275. if (!p.second) goto handle_unusual;
  276. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  277. // required .message.Base_info base_info = 1;
  278. case 1: {
  279. if (static_cast< ::google::protobuf::uint8>(tag) ==
  280. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  281. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  282. input, mutable_base_info()));
  283. } else {
  284. goto handle_unusual;
  285. }
  286. break;
  287. }
  288. // required int32 id = 2;
  289. case 2: {
  290. if (static_cast< ::google::protobuf::uint8>(tag) ==
  291. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  292. set_has_id();
  293. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  294. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  295. input, &id_)));
  296. } else {
  297. goto handle_unusual;
  298. }
  299. break;
  300. }
  301. // repeated .message.Laser_statu laser_statu_vector = 3;
  302. case 3: {
  303. if (static_cast< ::google::protobuf::uint8>(tag) ==
  304. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  305. int value;
  306. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  307. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  308. input, &value)));
  309. if (::message::Laser_statu_IsValid(value)) {
  310. add_laser_statu_vector(static_cast< ::message::Laser_statu >(value));
  311. } else {
  312. mutable_unknown_fields()->AddVarint(
  313. 3, static_cast< ::google::protobuf::uint64>(value));
  314. }
  315. } else if (
  316. static_cast< ::google::protobuf::uint8>(tag) ==
  317. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  318. DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
  319. input,
  320. 3,
  321. ::message::Laser_statu_IsValid,
  322. mutable_unknown_fields(),
  323. this->mutable_laser_statu_vector())));
  324. } else {
  325. goto handle_unusual;
  326. }
  327. break;
  328. }
  329. // required .message.Ground_statu ground_statu = 4;
  330. case 4: {
  331. if (static_cast< ::google::protobuf::uint8>(tag) ==
  332. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  333. int value;
  334. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  335. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  336. input, &value)));
  337. if (::message::Ground_statu_IsValid(value)) {
  338. set_ground_statu(static_cast< ::message::Ground_statu >(value));
  339. } else {
  340. mutable_unknown_fields()->AddVarint(
  341. 4, static_cast< ::google::protobuf::uint64>(value));
  342. }
  343. } else {
  344. goto handle_unusual;
  345. }
  346. break;
  347. }
  348. // optional .message.Locate_information locate_information_realtime = 5;
  349. case 5: {
  350. if (static_cast< ::google::protobuf::uint8>(tag) ==
  351. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  352. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  353. input, mutable_locate_information_realtime()));
  354. } else {
  355. goto handle_unusual;
  356. }
  357. break;
  358. }
  359. default: {
  360. handle_unusual:
  361. if (tag == 0) {
  362. goto success;
  363. }
  364. DO_(::google::protobuf::internal::WireFormat::SkipField(
  365. input, tag, _internal_metadata_.mutable_unknown_fields()));
  366. break;
  367. }
  368. }
  369. }
  370. success:
  371. // @@protoc_insertion_point(parse_success:message.Ground_measure_statu_msg)
  372. return true;
  373. failure:
  374. // @@protoc_insertion_point(parse_failure:message.Ground_measure_statu_msg)
  375. return false;
  376. #undef DO_
  377. }
  378. void Ground_measure_statu_msg::SerializeWithCachedSizes(
  379. ::google::protobuf::io::CodedOutputStream* output) const {
  380. // @@protoc_insertion_point(serialize_start:message.Ground_measure_statu_msg)
  381. ::google::protobuf::uint32 cached_has_bits = 0;
  382. (void) cached_has_bits;
  383. cached_has_bits = _has_bits_[0];
  384. // required .message.Base_info base_info = 1;
  385. if (cached_has_bits & 0x00000001u) {
  386. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  387. 1, *this->base_info_, output);
  388. }
  389. // required int32 id = 2;
  390. if (cached_has_bits & 0x00000004u) {
  391. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->id(), output);
  392. }
  393. // repeated .message.Laser_statu laser_statu_vector = 3;
  394. for (int i = 0, n = this->laser_statu_vector_size(); i < n; i++) {
  395. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  396. 3, this->laser_statu_vector(i), output);
  397. }
  398. // required .message.Ground_statu ground_statu = 4;
  399. if (cached_has_bits & 0x00000008u) {
  400. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  401. 4, this->ground_statu(), output);
  402. }
  403. // optional .message.Locate_information locate_information_realtime = 5;
  404. if (cached_has_bits & 0x00000002u) {
  405. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  406. 5, *this->locate_information_realtime_, output);
  407. }
  408. if (_internal_metadata_.have_unknown_fields()) {
  409. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  410. _internal_metadata_.unknown_fields(), output);
  411. }
  412. // @@protoc_insertion_point(serialize_end:message.Ground_measure_statu_msg)
  413. }
  414. ::google::protobuf::uint8* Ground_measure_statu_msg::InternalSerializeWithCachedSizesToArray(
  415. bool deterministic, ::google::protobuf::uint8* target) const {
  416. (void)deterministic; // Unused
  417. // @@protoc_insertion_point(serialize_to_array_start:message.Ground_measure_statu_msg)
  418. ::google::protobuf::uint32 cached_has_bits = 0;
  419. (void) cached_has_bits;
  420. cached_has_bits = _has_bits_[0];
  421. // required .message.Base_info base_info = 1;
  422. if (cached_has_bits & 0x00000001u) {
  423. target = ::google::protobuf::internal::WireFormatLite::
  424. InternalWriteMessageToArray(
  425. 1, *this->base_info_, deterministic, target);
  426. }
  427. // required int32 id = 2;
  428. if (cached_has_bits & 0x00000004u) {
  429. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->id(), target);
  430. }
  431. // repeated .message.Laser_statu laser_statu_vector = 3;
  432. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  433. 3, this->laser_statu_vector_, target);
  434. // required .message.Ground_statu ground_statu = 4;
  435. if (cached_has_bits & 0x00000008u) {
  436. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  437. 4, this->ground_statu(), target);
  438. }
  439. // optional .message.Locate_information locate_information_realtime = 5;
  440. if (cached_has_bits & 0x00000002u) {
  441. target = ::google::protobuf::internal::WireFormatLite::
  442. InternalWriteMessageToArray(
  443. 5, *this->locate_information_realtime_, deterministic, target);
  444. }
  445. if (_internal_metadata_.have_unknown_fields()) {
  446. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  447. _internal_metadata_.unknown_fields(), target);
  448. }
  449. // @@protoc_insertion_point(serialize_to_array_end:message.Ground_measure_statu_msg)
  450. return target;
  451. }
  452. size_t Ground_measure_statu_msg::RequiredFieldsByteSizeFallback() const {
  453. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Ground_measure_statu_msg)
  454. size_t total_size = 0;
  455. if (has_base_info()) {
  456. // required .message.Base_info base_info = 1;
  457. total_size += 1 +
  458. ::google::protobuf::internal::WireFormatLite::MessageSize(
  459. *this->base_info_);
  460. }
  461. if (has_id()) {
  462. // required int32 id = 2;
  463. total_size += 1 +
  464. ::google::protobuf::internal::WireFormatLite::Int32Size(
  465. this->id());
  466. }
  467. if (has_ground_statu()) {
  468. // required .message.Ground_statu ground_statu = 4;
  469. total_size += 1 +
  470. ::google::protobuf::internal::WireFormatLite::EnumSize(this->ground_statu());
  471. }
  472. return total_size;
  473. }
  474. size_t Ground_measure_statu_msg::ByteSizeLong() const {
  475. // @@protoc_insertion_point(message_byte_size_start:message.Ground_measure_statu_msg)
  476. size_t total_size = 0;
  477. if (_internal_metadata_.have_unknown_fields()) {
  478. total_size +=
  479. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  480. _internal_metadata_.unknown_fields());
  481. }
  482. if (((_has_bits_[0] & 0x0000000d) ^ 0x0000000d) == 0) { // All required fields are present.
  483. // required .message.Base_info base_info = 1;
  484. total_size += 1 +
  485. ::google::protobuf::internal::WireFormatLite::MessageSize(
  486. *this->base_info_);
  487. // required int32 id = 2;
  488. total_size += 1 +
  489. ::google::protobuf::internal::WireFormatLite::Int32Size(
  490. this->id());
  491. // required .message.Ground_statu ground_statu = 4;
  492. total_size += 1 +
  493. ::google::protobuf::internal::WireFormatLite::EnumSize(this->ground_statu());
  494. } else {
  495. total_size += RequiredFieldsByteSizeFallback();
  496. }
  497. // repeated .message.Laser_statu laser_statu_vector = 3;
  498. {
  499. size_t data_size = 0;
  500. unsigned int count = static_cast<unsigned int>(this->laser_statu_vector_size());for (unsigned int i = 0; i < count; i++) {
  501. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  502. this->laser_statu_vector(static_cast<int>(i)));
  503. }
  504. total_size += (1UL * count) + data_size;
  505. }
  506. // optional .message.Locate_information locate_information_realtime = 5;
  507. if (has_locate_information_realtime()) {
  508. total_size += 1 +
  509. ::google::protobuf::internal::WireFormatLite::MessageSize(
  510. *this->locate_information_realtime_);
  511. }
  512. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  513. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  514. _cached_size_ = cached_size;
  515. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  516. return total_size;
  517. }
  518. void Ground_measure_statu_msg::MergeFrom(const ::google::protobuf::Message& from) {
  519. // @@protoc_insertion_point(generalized_merge_from_start:message.Ground_measure_statu_msg)
  520. GOOGLE_DCHECK_NE(&from, this);
  521. const Ground_measure_statu_msg* source =
  522. ::google::protobuf::internal::DynamicCastToGenerated<const Ground_measure_statu_msg>(
  523. &from);
  524. if (source == NULL) {
  525. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Ground_measure_statu_msg)
  526. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  527. } else {
  528. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Ground_measure_statu_msg)
  529. MergeFrom(*source);
  530. }
  531. }
  532. void Ground_measure_statu_msg::MergeFrom(const Ground_measure_statu_msg& from) {
  533. // @@protoc_insertion_point(class_specific_merge_from_start:message.Ground_measure_statu_msg)
  534. GOOGLE_DCHECK_NE(&from, this);
  535. _internal_metadata_.MergeFrom(from._internal_metadata_);
  536. ::google::protobuf::uint32 cached_has_bits = 0;
  537. (void) cached_has_bits;
  538. laser_statu_vector_.MergeFrom(from.laser_statu_vector_);
  539. cached_has_bits = from._has_bits_[0];
  540. if (cached_has_bits & 15u) {
  541. if (cached_has_bits & 0x00000001u) {
  542. mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
  543. }
  544. if (cached_has_bits & 0x00000002u) {
  545. mutable_locate_information_realtime()->::message::Locate_information::MergeFrom(from.locate_information_realtime());
  546. }
  547. if (cached_has_bits & 0x00000004u) {
  548. id_ = from.id_;
  549. }
  550. if (cached_has_bits & 0x00000008u) {
  551. ground_statu_ = from.ground_statu_;
  552. }
  553. _has_bits_[0] |= cached_has_bits;
  554. }
  555. }
  556. void Ground_measure_statu_msg::CopyFrom(const ::google::protobuf::Message& from) {
  557. // @@protoc_insertion_point(generalized_copy_from_start:message.Ground_measure_statu_msg)
  558. if (&from == this) return;
  559. Clear();
  560. MergeFrom(from);
  561. }
  562. void Ground_measure_statu_msg::CopyFrom(const Ground_measure_statu_msg& from) {
  563. // @@protoc_insertion_point(class_specific_copy_from_start:message.Ground_measure_statu_msg)
  564. if (&from == this) return;
  565. Clear();
  566. MergeFrom(from);
  567. }
  568. bool Ground_measure_statu_msg::IsInitialized() const {
  569. if ((_has_bits_[0] & 0x0000000d) != 0x0000000d) return false;
  570. if (has_base_info()) {
  571. if (!this->base_info_->IsInitialized()) return false;
  572. }
  573. return true;
  574. }
  575. void Ground_measure_statu_msg::Swap(Ground_measure_statu_msg* other) {
  576. if (other == this) return;
  577. InternalSwap(other);
  578. }
  579. void Ground_measure_statu_msg::InternalSwap(Ground_measure_statu_msg* other) {
  580. using std::swap;
  581. laser_statu_vector_.InternalSwap(&other->laser_statu_vector_);
  582. swap(base_info_, other->base_info_);
  583. swap(locate_information_realtime_, other->locate_information_realtime_);
  584. swap(id_, other->id_);
  585. swap(ground_statu_, other->ground_statu_);
  586. swap(_has_bits_[0], other->_has_bits_[0]);
  587. _internal_metadata_.Swap(&other->_internal_metadata_);
  588. swap(_cached_size_, other->_cached_size_);
  589. }
  590. ::google::protobuf::Metadata Ground_measure_statu_msg::GetMetadata() const {
  591. protobuf_ground_5fmeasure_5fmsg_2eproto::protobuf_AssignDescriptorsOnce();
  592. return ::protobuf_ground_5fmeasure_5fmsg_2eproto::file_level_metadata[kIndexInFileMessages];
  593. }
  594. // @@protoc_insertion_point(namespace_scope)
  595. } // namespace message
  596. // @@protoc_insertion_point(global_scope)