laser_message.pb.cc 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: laser_message.proto
  3. #include "laser_message.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/io/coded_stream.h>
  6. #include <google/protobuf/extension_set.h>
  7. #include <google/protobuf/wire_format_lite.h>
  8. #include <google/protobuf/descriptor.h>
  9. #include <google/protobuf/generated_message_reflection.h>
  10. #include <google/protobuf/reflection_ops.h>
  11. #include <google/protobuf/wire_format.h>
  12. // @@protoc_insertion_point(includes)
  13. #include <google/protobuf/port_def.inc>
  14. namespace laser_message {
  15. class laserMsgDefaultTypeInternal {
  16. public:
  17. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<laserMsg> _instance;
  18. } _laserMsg_default_instance_;
  19. } // namespace laser_message
  20. static void InitDefaultsscc_info_laserMsg_laser_5fmessage_2eproto() {
  21. GOOGLE_PROTOBUF_VERIFY_VERSION;
  22. {
  23. void* ptr = &::laser_message::_laserMsg_default_instance_;
  24. new (ptr) ::laser_message::laserMsg();
  25. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  26. }
  27. ::laser_message::laserMsg::InitAsDefaultInstance();
  28. }
  29. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_laserMsg_laser_5fmessage_2eproto =
  30. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_laserMsg_laser_5fmessage_2eproto}, {}};
  31. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_laser_5fmessage_2eproto[1];
  32. static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_laser_5fmessage_2eproto[1];
  33. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_laser_5fmessage_2eproto = nullptr;
  34. const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_laser_5fmessage_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  35. PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, _has_bits_),
  36. PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, _internal_metadata_),
  37. ~0u, // no _extensions_
  38. ~0u, // no _oneof_case_
  39. ~0u, // no _weak_field_map_
  40. PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, laser_status_),
  41. PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, queue_data_count_),
  42. PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, cloud_count_),
  43. PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, id_),
  44. 0,
  45. 1,
  46. 2,
  47. 3,
  48. };
  49. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  50. { 0, 9, sizeof(::laser_message::laserMsg)},
  51. };
  52. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  53. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::laser_message::_laserMsg_default_instance_),
  54. };
  55. const char descriptor_table_protodef_laser_5fmessage_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  56. "\n\023laser_message.proto\022\rlaser_message\"w\n\010"
  57. "laserMsg\0220\n\014laser_status\030\001 \001(\0162\032.laser_m"
  58. "essage.laserStatus\022\030\n\020queue_data_count\030\002"
  59. " \001(\005\022\023\n\013cloud_count\030\003 \001(\005\022\n\n\002id\030\004 \002(\005*]\n"
  60. "\013laserStatus\022\023\n\017eLaserConnected\020\000\022\026\n\022eLa"
  61. "serDisconnected\020\001\022\016\n\neLaserBusy\020\002\022\021\n\reLa"
  62. "serUnknown\020\003"
  63. ;
  64. static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_laser_5fmessage_2eproto_deps[1] = {
  65. };
  66. static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_laser_5fmessage_2eproto_sccs[1] = {
  67. &scc_info_laserMsg_laser_5fmessage_2eproto.base,
  68. };
  69. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_laser_5fmessage_2eproto_once;
  70. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_laser_5fmessage_2eproto = {
  71. false, false, descriptor_table_protodef_laser_5fmessage_2eproto, "laser_message.proto", 252,
  72. &descriptor_table_laser_5fmessage_2eproto_once, descriptor_table_laser_5fmessage_2eproto_sccs, descriptor_table_laser_5fmessage_2eproto_deps, 1, 0,
  73. schemas, file_default_instances, TableStruct_laser_5fmessage_2eproto::offsets,
  74. file_level_metadata_laser_5fmessage_2eproto, 1, file_level_enum_descriptors_laser_5fmessage_2eproto, file_level_service_descriptors_laser_5fmessage_2eproto,
  75. };
  76. // Force running AddDescriptors() at dynamic initialization time.
  77. static bool dynamic_init_dummy_laser_5fmessage_2eproto = (static_cast<void>(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_laser_5fmessage_2eproto)), true);
  78. namespace laser_message {
  79. const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* laserStatus_descriptor() {
  80. ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_laser_5fmessage_2eproto);
  81. return file_level_enum_descriptors_laser_5fmessage_2eproto[0];
  82. }
  83. bool laserStatus_IsValid(int value) {
  84. switch (value) {
  85. case 0:
  86. case 1:
  87. case 2:
  88. case 3:
  89. return true;
  90. default:
  91. return false;
  92. }
  93. }
  94. // ===================================================================
  95. void laserMsg::InitAsDefaultInstance() {
  96. }
  97. class laserMsg::_Internal {
  98. public:
  99. using HasBits = decltype(std::declval<laserMsg>()._has_bits_);
  100. static void set_has_laser_status(HasBits* has_bits) {
  101. (*has_bits)[0] |= 1u;
  102. }
  103. static void set_has_queue_data_count(HasBits* has_bits) {
  104. (*has_bits)[0] |= 2u;
  105. }
  106. static void set_has_cloud_count(HasBits* has_bits) {
  107. (*has_bits)[0] |= 4u;
  108. }
  109. static void set_has_id(HasBits* has_bits) {
  110. (*has_bits)[0] |= 8u;
  111. }
  112. static bool MissingRequiredFields(const HasBits& has_bits) {
  113. return ((has_bits[0] & 0x00000008) ^ 0x00000008) != 0;
  114. }
  115. };
  116. laserMsg::laserMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  117. : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  118. SharedCtor();
  119. RegisterArenaDtor(arena);
  120. // @@protoc_insertion_point(arena_constructor:laser_message.laserMsg)
  121. }
  122. laserMsg::laserMsg(const laserMsg& from)
  123. : ::PROTOBUF_NAMESPACE_ID::Message(),
  124. _has_bits_(from._has_bits_) {
  125. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  126. ::memcpy(&laser_status_, &from.laser_status_,
  127. static_cast<size_t>(reinterpret_cast<char*>(&id_) -
  128. reinterpret_cast<char*>(&laser_status_)) + sizeof(id_));
  129. // @@protoc_insertion_point(copy_constructor:laser_message.laserMsg)
  130. }
  131. void laserMsg::SharedCtor() {
  132. ::memset(&laser_status_, 0, static_cast<size_t>(
  133. reinterpret_cast<char*>(&id_) -
  134. reinterpret_cast<char*>(&laser_status_)) + sizeof(id_));
  135. }
  136. laserMsg::~laserMsg() {
  137. // @@protoc_insertion_point(destructor:laser_message.laserMsg)
  138. SharedDtor();
  139. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  140. }
  141. void laserMsg::SharedDtor() {
  142. GOOGLE_DCHECK(GetArena() == nullptr);
  143. }
  144. void laserMsg::ArenaDtor(void* object) {
  145. laserMsg* _this = reinterpret_cast< laserMsg* >(object);
  146. (void)_this;
  147. }
  148. void laserMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  149. }
  150. void laserMsg::SetCachedSize(int size) const {
  151. _cached_size_.Set(size);
  152. }
  153. const laserMsg& laserMsg::default_instance() {
  154. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_laserMsg_laser_5fmessage_2eproto.base);
  155. return *internal_default_instance();
  156. }
  157. void laserMsg::Clear() {
  158. // @@protoc_insertion_point(message_clear_start:laser_message.laserMsg)
  159. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  160. // Prevent compiler warnings about cached_has_bits being unused
  161. (void) cached_has_bits;
  162. cached_has_bits = _has_bits_[0];
  163. if (cached_has_bits & 0x0000000fu) {
  164. ::memset(&laser_status_, 0, static_cast<size_t>(
  165. reinterpret_cast<char*>(&id_) -
  166. reinterpret_cast<char*>(&laser_status_)) + sizeof(id_));
  167. }
  168. _has_bits_.Clear();
  169. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  170. }
  171. const char* laserMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  172. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  173. _Internal::HasBits has_bits{};
  174. ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
  175. while (!ctx->Done(&ptr)) {
  176. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  177. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  178. CHK_(ptr);
  179. switch (tag >> 3) {
  180. // optional .laser_message.laserStatus laser_status = 1;
  181. case 1:
  182. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
  183. ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  184. CHK_(ptr);
  185. if (PROTOBUF_PREDICT_TRUE(::laser_message::laserStatus_IsValid(val))) {
  186. _internal_set_laser_status(static_cast<::laser_message::laserStatus>(val));
  187. } else {
  188. ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
  189. }
  190. } else goto handle_unusual;
  191. continue;
  192. // optional int32 queue_data_count = 2;
  193. case 2:
  194. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
  195. _Internal::set_has_queue_data_count(&has_bits);
  196. queue_data_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  197. CHK_(ptr);
  198. } else goto handle_unusual;
  199. continue;
  200. // optional int32 cloud_count = 3;
  201. case 3:
  202. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  203. _Internal::set_has_cloud_count(&has_bits);
  204. cloud_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  205. CHK_(ptr);
  206. } else goto handle_unusual;
  207. continue;
  208. // required int32 id = 4;
  209. case 4:
  210. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
  211. _Internal::set_has_id(&has_bits);
  212. id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  213. CHK_(ptr);
  214. } else goto handle_unusual;
  215. continue;
  216. default: {
  217. handle_unusual:
  218. if ((tag & 7) == 4 || tag == 0) {
  219. ctx->SetLastTag(tag);
  220. goto success;
  221. }
  222. ptr = UnknownFieldParse(tag,
  223. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  224. ptr, ctx);
  225. CHK_(ptr != nullptr);
  226. continue;
  227. }
  228. } // switch
  229. } // while
  230. success:
  231. _has_bits_.Or(has_bits);
  232. return ptr;
  233. failure:
  234. ptr = nullptr;
  235. goto success;
  236. #undef CHK_
  237. }
  238. ::PROTOBUF_NAMESPACE_ID::uint8* laserMsg::_InternalSerialize(
  239. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  240. // @@protoc_insertion_point(serialize_to_array_start:laser_message.laserMsg)
  241. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  242. (void) cached_has_bits;
  243. cached_has_bits = _has_bits_[0];
  244. // optional .laser_message.laserStatus laser_status = 1;
  245. if (cached_has_bits & 0x00000001u) {
  246. target = stream->EnsureSpace(target);
  247. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
  248. 1, this->_internal_laser_status(), target);
  249. }
  250. // optional int32 queue_data_count = 2;
  251. if (cached_has_bits & 0x00000002u) {
  252. target = stream->EnsureSpace(target);
  253. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_queue_data_count(), target);
  254. }
  255. // optional int32 cloud_count = 3;
  256. if (cached_has_bits & 0x00000004u) {
  257. target = stream->EnsureSpace(target);
  258. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_cloud_count(), target);
  259. }
  260. // required int32 id = 4;
  261. if (cached_has_bits & 0x00000008u) {
  262. target = stream->EnsureSpace(target);
  263. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_id(), target);
  264. }
  265. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  266. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  267. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  268. }
  269. // @@protoc_insertion_point(serialize_to_array_end:laser_message.laserMsg)
  270. return target;
  271. }
  272. size_t laserMsg::ByteSizeLong() const {
  273. // @@protoc_insertion_point(message_byte_size_start:laser_message.laserMsg)
  274. size_t total_size = 0;
  275. // required int32 id = 4;
  276. if (_internal_has_id()) {
  277. total_size += 1 +
  278. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  279. this->_internal_id());
  280. }
  281. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  282. // Prevent compiler warnings about cached_has_bits being unused
  283. (void) cached_has_bits;
  284. cached_has_bits = _has_bits_[0];
  285. if (cached_has_bits & 0x00000007u) {
  286. // optional .laser_message.laserStatus laser_status = 1;
  287. if (cached_has_bits & 0x00000001u) {
  288. total_size += 1 +
  289. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_laser_status());
  290. }
  291. // optional int32 queue_data_count = 2;
  292. if (cached_has_bits & 0x00000002u) {
  293. total_size += 1 +
  294. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  295. this->_internal_queue_data_count());
  296. }
  297. // optional int32 cloud_count = 3;
  298. if (cached_has_bits & 0x00000004u) {
  299. total_size += 1 +
  300. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  301. this->_internal_cloud_count());
  302. }
  303. }
  304. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  305. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  306. _internal_metadata_, total_size, &_cached_size_);
  307. }
  308. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  309. SetCachedSize(cached_size);
  310. return total_size;
  311. }
  312. void laserMsg::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  313. // @@protoc_insertion_point(generalized_merge_from_start:laser_message.laserMsg)
  314. GOOGLE_DCHECK_NE(&from, this);
  315. const laserMsg* source =
  316. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<laserMsg>(
  317. &from);
  318. if (source == nullptr) {
  319. // @@protoc_insertion_point(generalized_merge_from_cast_fail:laser_message.laserMsg)
  320. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  321. } else {
  322. // @@protoc_insertion_point(generalized_merge_from_cast_success:laser_message.laserMsg)
  323. MergeFrom(*source);
  324. }
  325. }
  326. void laserMsg::MergeFrom(const laserMsg& from) {
  327. // @@protoc_insertion_point(class_specific_merge_from_start:laser_message.laserMsg)
  328. GOOGLE_DCHECK_NE(&from, this);
  329. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  330. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  331. (void) cached_has_bits;
  332. cached_has_bits = from._has_bits_[0];
  333. if (cached_has_bits & 0x0000000fu) {
  334. if (cached_has_bits & 0x00000001u) {
  335. laser_status_ = from.laser_status_;
  336. }
  337. if (cached_has_bits & 0x00000002u) {
  338. queue_data_count_ = from.queue_data_count_;
  339. }
  340. if (cached_has_bits & 0x00000004u) {
  341. cloud_count_ = from.cloud_count_;
  342. }
  343. if (cached_has_bits & 0x00000008u) {
  344. id_ = from.id_;
  345. }
  346. _has_bits_[0] |= cached_has_bits;
  347. }
  348. }
  349. void laserMsg::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  350. // @@protoc_insertion_point(generalized_copy_from_start:laser_message.laserMsg)
  351. if (&from == this) return;
  352. Clear();
  353. MergeFrom(from);
  354. }
  355. void laserMsg::CopyFrom(const laserMsg& from) {
  356. // @@protoc_insertion_point(class_specific_copy_from_start:laser_message.laserMsg)
  357. if (&from == this) return;
  358. Clear();
  359. MergeFrom(from);
  360. }
  361. bool laserMsg::IsInitialized() const {
  362. if (_Internal::MissingRequiredFields(_has_bits_)) return false;
  363. return true;
  364. }
  365. void laserMsg::InternalSwap(laserMsg* other) {
  366. using std::swap;
  367. _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  368. swap(_has_bits_[0], other->_has_bits_[0]);
  369. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  370. PROTOBUF_FIELD_OFFSET(laserMsg, id_)
  371. + sizeof(laserMsg::id_)
  372. - PROTOBUF_FIELD_OFFSET(laserMsg, laser_status_)>(
  373. reinterpret_cast<char*>(&laser_status_),
  374. reinterpret_cast<char*>(&other->laser_status_));
  375. }
  376. ::PROTOBUF_NAMESPACE_ID::Metadata laserMsg::GetMetadata() const {
  377. return GetMetadataStatic();
  378. }
  379. // @@protoc_insertion_point(namespace_scope)
  380. } // namespace laser_message
  381. PROTOBUF_NAMESPACE_OPEN
  382. template<> PROTOBUF_NOINLINE ::laser_message::laserMsg* Arena::CreateMaybeMessage< ::laser_message::laserMsg >(Arena* arena) {
  383. return Arena::CreateMessageInternal< ::laser_message::laserMsg >(arena);
  384. }
  385. PROTOBUF_NAMESPACE_CLOSE
  386. // @@protoc_insertion_point(global_scope)
  387. #include <google/protobuf/port_undef.inc>