message.pb.cc 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: message.proto
  3. #include "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. class AGVStatuDefaultTypeInternal {
  15. public:
  16. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<AGVStatu> _instance;
  17. } _AGVStatu_default_instance_;
  18. class ChangeSpeedCmdDefaultTypeInternal {
  19. public:
  20. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ChangeSpeedCmd> _instance;
  21. } _ChangeSpeedCmd_default_instance_;
  22. static void InitDefaultsscc_info_AGVStatu_message_2eproto() {
  23. GOOGLE_PROTOBUF_VERIFY_VERSION;
  24. {
  25. void* ptr = &::_AGVStatu_default_instance_;
  26. new (ptr) ::AGVStatu();
  27. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  28. }
  29. ::AGVStatu::InitAsDefaultInstance();
  30. }
  31. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AGVStatu_message_2eproto =
  32. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AGVStatu_message_2eproto}, {}};
  33. static void InitDefaultsscc_info_ChangeSpeedCmd_message_2eproto() {
  34. GOOGLE_PROTOBUF_VERIFY_VERSION;
  35. {
  36. void* ptr = &::_ChangeSpeedCmd_default_instance_;
  37. new (ptr) ::ChangeSpeedCmd();
  38. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  39. }
  40. ::ChangeSpeedCmd::InitAsDefaultInstance();
  41. }
  42. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ChangeSpeedCmd_message_2eproto =
  43. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ChangeSpeedCmd_message_2eproto}, {}};
  44. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_message_2eproto[2];
  45. static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_message_2eproto = nullptr;
  46. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_message_2eproto = nullptr;
  47. const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_message_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  48. ~0u, // no _has_bits_
  49. PROTOBUF_FIELD_OFFSET(::AGVStatu, _internal_metadata_),
  50. ~0u, // no _extensions_
  51. ~0u, // no _oneof_case_
  52. ~0u, // no _weak_field_map_
  53. PROTOBUF_FIELD_OFFSET(::AGVStatu, x_),
  54. PROTOBUF_FIELD_OFFSET(::AGVStatu, y_),
  55. PROTOBUF_FIELD_OFFSET(::AGVStatu, theta_),
  56. PROTOBUF_FIELD_OFFSET(::AGVStatu, v_),
  57. PROTOBUF_FIELD_OFFSET(::AGVStatu, vth_),
  58. ~0u, // no _has_bits_
  59. PROTOBUF_FIELD_OFFSET(::ChangeSpeedCmd, _internal_metadata_),
  60. ~0u, // no _extensions_
  61. ~0u, // no _oneof_case_
  62. ~0u, // no _weak_field_map_
  63. PROTOBUF_FIELD_OFFSET(::ChangeSpeedCmd, v_),
  64. PROTOBUF_FIELD_OFFSET(::ChangeSpeedCmd, vth_),
  65. };
  66. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  67. { 0, -1, sizeof(::AGVStatu)},
  68. { 10, -1, sizeof(::ChangeSpeedCmd)},
  69. };
  70. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  71. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::_AGVStatu_default_instance_),
  72. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::_ChangeSpeedCmd_default_instance_),
  73. };
  74. const char descriptor_table_protodef_message_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  75. "\n\rmessage.proto\"G\n\010AGVStatu\022\t\n\001x\030\001 \001(\002\022\t"
  76. "\n\001y\030\002 \001(\002\022\r\n\005theta\030\003 \001(\002\022\t\n\001v\030\004 \001(\002\022\013\n\003v"
  77. "th\030\005 \001(\002\"(\n\016ChangeSpeedCmd\022\t\n\001v\030\001 \001(\002\022\013\n"
  78. "\003vth\030\002 \001(\002b\006proto3"
  79. ;
  80. static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_message_2eproto_deps[1] = {
  81. };
  82. static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_message_2eproto_sccs[2] = {
  83. &scc_info_AGVStatu_message_2eproto.base,
  84. &scc_info_ChangeSpeedCmd_message_2eproto.base,
  85. };
  86. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_message_2eproto_once;
  87. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_message_2eproto = {
  88. false, false, descriptor_table_protodef_message_2eproto, "message.proto", 138,
  89. &descriptor_table_message_2eproto_once, descriptor_table_message_2eproto_sccs, descriptor_table_message_2eproto_deps, 2, 0,
  90. schemas, file_default_instances, TableStruct_message_2eproto::offsets,
  91. file_level_metadata_message_2eproto, 2, file_level_enum_descriptors_message_2eproto, file_level_service_descriptors_message_2eproto,
  92. };
  93. // Force running AddDescriptors() at dynamic initialization time.
  94. static bool dynamic_init_dummy_message_2eproto = (static_cast<void>(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_message_2eproto)), true);
  95. // ===================================================================
  96. void AGVStatu::InitAsDefaultInstance() {
  97. }
  98. class AGVStatu::_Internal {
  99. public:
  100. };
  101. AGVStatu::AGVStatu(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  102. : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  103. SharedCtor();
  104. RegisterArenaDtor(arena);
  105. // @@protoc_insertion_point(arena_constructor:AGVStatu)
  106. }
  107. AGVStatu::AGVStatu(const AGVStatu& from)
  108. : ::PROTOBUF_NAMESPACE_ID::Message() {
  109. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  110. ::memcpy(&x_, &from.x_,
  111. static_cast<size_t>(reinterpret_cast<char*>(&vth_) -
  112. reinterpret_cast<char*>(&x_)) + sizeof(vth_));
  113. // @@protoc_insertion_point(copy_constructor:AGVStatu)
  114. }
  115. void AGVStatu::SharedCtor() {
  116. ::memset(&x_, 0, static_cast<size_t>(
  117. reinterpret_cast<char*>(&vth_) -
  118. reinterpret_cast<char*>(&x_)) + sizeof(vth_));
  119. }
  120. AGVStatu::~AGVStatu() {
  121. // @@protoc_insertion_point(destructor:AGVStatu)
  122. SharedDtor();
  123. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  124. }
  125. void AGVStatu::SharedDtor() {
  126. GOOGLE_DCHECK(GetArena() == nullptr);
  127. }
  128. void AGVStatu::ArenaDtor(void* object) {
  129. AGVStatu* _this = reinterpret_cast< AGVStatu* >(object);
  130. (void)_this;
  131. }
  132. void AGVStatu::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  133. }
  134. void AGVStatu::SetCachedSize(int size) const {
  135. _cached_size_.Set(size);
  136. }
  137. const AGVStatu& AGVStatu::default_instance() {
  138. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AGVStatu_message_2eproto.base);
  139. return *internal_default_instance();
  140. }
  141. void AGVStatu::Clear() {
  142. // @@protoc_insertion_point(message_clear_start:AGVStatu)
  143. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  144. // Prevent compiler warnings about cached_has_bits being unused
  145. (void) cached_has_bits;
  146. ::memset(&x_, 0, static_cast<size_t>(
  147. reinterpret_cast<char*>(&vth_) -
  148. reinterpret_cast<char*>(&x_)) + sizeof(vth_));
  149. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  150. }
  151. const char* AGVStatu::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  152. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  153. ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
  154. while (!ctx->Done(&ptr)) {
  155. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  156. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  157. CHK_(ptr);
  158. switch (tag >> 3) {
  159. // float x = 1;
  160. case 1:
  161. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) {
  162. x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
  163. ptr += sizeof(float);
  164. } else goto handle_unusual;
  165. continue;
  166. // float y = 2;
  167. case 2:
  168. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) {
  169. y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
  170. ptr += sizeof(float);
  171. } else goto handle_unusual;
  172. continue;
  173. // float theta = 3;
  174. case 3:
  175. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) {
  176. theta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
  177. ptr += sizeof(float);
  178. } else goto handle_unusual;
  179. continue;
  180. // float v = 4;
  181. case 4:
  182. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) {
  183. v_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
  184. ptr += sizeof(float);
  185. } else goto handle_unusual;
  186. continue;
  187. // float vth = 5;
  188. case 5:
  189. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) {
  190. vth_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
  191. ptr += sizeof(float);
  192. } else goto handle_unusual;
  193. continue;
  194. default: {
  195. handle_unusual:
  196. if ((tag & 7) == 4 || tag == 0) {
  197. ctx->SetLastTag(tag);
  198. goto success;
  199. }
  200. ptr = UnknownFieldParse(tag,
  201. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  202. ptr, ctx);
  203. CHK_(ptr != nullptr);
  204. continue;
  205. }
  206. } // switch
  207. } // while
  208. success:
  209. return ptr;
  210. failure:
  211. ptr = nullptr;
  212. goto success;
  213. #undef CHK_
  214. }
  215. ::PROTOBUF_NAMESPACE_ID::uint8* AGVStatu::_InternalSerialize(
  216. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  217. // @@protoc_insertion_point(serialize_to_array_start:AGVStatu)
  218. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  219. (void) cached_has_bits;
  220. // float x = 1;
  221. if (!(this->x() <= 0 && this->x() >= 0)) {
  222. target = stream->EnsureSpace(target);
  223. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target);
  224. }
  225. // float y = 2;
  226. if (!(this->y() <= 0 && this->y() >= 0)) {
  227. target = stream->EnsureSpace(target);
  228. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target);
  229. }
  230. // float theta = 3;
  231. if (!(this->theta() <= 0 && this->theta() >= 0)) {
  232. target = stream->EnsureSpace(target);
  233. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_theta(), target);
  234. }
  235. // float v = 4;
  236. if (!(this->v() <= 0 && this->v() >= 0)) {
  237. target = stream->EnsureSpace(target);
  238. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_v(), target);
  239. }
  240. // float vth = 5;
  241. if (!(this->vth() <= 0 && this->vth() >= 0)) {
  242. target = stream->EnsureSpace(target);
  243. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_vth(), target);
  244. }
  245. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  246. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  247. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  248. }
  249. // @@protoc_insertion_point(serialize_to_array_end:AGVStatu)
  250. return target;
  251. }
  252. size_t AGVStatu::ByteSizeLong() const {
  253. // @@protoc_insertion_point(message_byte_size_start:AGVStatu)
  254. size_t total_size = 0;
  255. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  256. // Prevent compiler warnings about cached_has_bits being unused
  257. (void) cached_has_bits;
  258. // float x = 1;
  259. if (!(this->x() <= 0 && this->x() >= 0)) {
  260. total_size += 1 + 4;
  261. }
  262. // float y = 2;
  263. if (!(this->y() <= 0 && this->y() >= 0)) {
  264. total_size += 1 + 4;
  265. }
  266. // float theta = 3;
  267. if (!(this->theta() <= 0 && this->theta() >= 0)) {
  268. total_size += 1 + 4;
  269. }
  270. // float v = 4;
  271. if (!(this->v() <= 0 && this->v() >= 0)) {
  272. total_size += 1 + 4;
  273. }
  274. // float vth = 5;
  275. if (!(this->vth() <= 0 && this->vth() >= 0)) {
  276. total_size += 1 + 4;
  277. }
  278. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  279. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  280. _internal_metadata_, total_size, &_cached_size_);
  281. }
  282. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  283. SetCachedSize(cached_size);
  284. return total_size;
  285. }
  286. void AGVStatu::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  287. // @@protoc_insertion_point(generalized_merge_from_start:AGVStatu)
  288. GOOGLE_DCHECK_NE(&from, this);
  289. const AGVStatu* source =
  290. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<AGVStatu>(
  291. &from);
  292. if (source == nullptr) {
  293. // @@protoc_insertion_point(generalized_merge_from_cast_fail:AGVStatu)
  294. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  295. } else {
  296. // @@protoc_insertion_point(generalized_merge_from_cast_success:AGVStatu)
  297. MergeFrom(*source);
  298. }
  299. }
  300. void AGVStatu::MergeFrom(const AGVStatu& from) {
  301. // @@protoc_insertion_point(class_specific_merge_from_start:AGVStatu)
  302. GOOGLE_DCHECK_NE(&from, this);
  303. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  304. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  305. (void) cached_has_bits;
  306. if (!(from.x() <= 0 && from.x() >= 0)) {
  307. _internal_set_x(from._internal_x());
  308. }
  309. if (!(from.y() <= 0 && from.y() >= 0)) {
  310. _internal_set_y(from._internal_y());
  311. }
  312. if (!(from.theta() <= 0 && from.theta() >= 0)) {
  313. _internal_set_theta(from._internal_theta());
  314. }
  315. if (!(from.v() <= 0 && from.v() >= 0)) {
  316. _internal_set_v(from._internal_v());
  317. }
  318. if (!(from.vth() <= 0 && from.vth() >= 0)) {
  319. _internal_set_vth(from._internal_vth());
  320. }
  321. }
  322. void AGVStatu::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  323. // @@protoc_insertion_point(generalized_copy_from_start:AGVStatu)
  324. if (&from == this) return;
  325. Clear();
  326. MergeFrom(from);
  327. }
  328. void AGVStatu::CopyFrom(const AGVStatu& from) {
  329. // @@protoc_insertion_point(class_specific_copy_from_start:AGVStatu)
  330. if (&from == this) return;
  331. Clear();
  332. MergeFrom(from);
  333. }
  334. bool AGVStatu::IsInitialized() const {
  335. return true;
  336. }
  337. void AGVStatu::InternalSwap(AGVStatu* other) {
  338. using std::swap;
  339. _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  340. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  341. PROTOBUF_FIELD_OFFSET(AGVStatu, vth_)
  342. + sizeof(AGVStatu::vth_)
  343. - PROTOBUF_FIELD_OFFSET(AGVStatu, x_)>(
  344. reinterpret_cast<char*>(&x_),
  345. reinterpret_cast<char*>(&other->x_));
  346. }
  347. ::PROTOBUF_NAMESPACE_ID::Metadata AGVStatu::GetMetadata() const {
  348. return GetMetadataStatic();
  349. }
  350. // ===================================================================
  351. void ChangeSpeedCmd::InitAsDefaultInstance() {
  352. }
  353. class ChangeSpeedCmd::_Internal {
  354. public:
  355. };
  356. ChangeSpeedCmd::ChangeSpeedCmd(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  357. : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  358. SharedCtor();
  359. RegisterArenaDtor(arena);
  360. // @@protoc_insertion_point(arena_constructor:ChangeSpeedCmd)
  361. }
  362. ChangeSpeedCmd::ChangeSpeedCmd(const ChangeSpeedCmd& from)
  363. : ::PROTOBUF_NAMESPACE_ID::Message() {
  364. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  365. ::memcpy(&v_, &from.v_,
  366. static_cast<size_t>(reinterpret_cast<char*>(&vth_) -
  367. reinterpret_cast<char*>(&v_)) + sizeof(vth_));
  368. // @@protoc_insertion_point(copy_constructor:ChangeSpeedCmd)
  369. }
  370. void ChangeSpeedCmd::SharedCtor() {
  371. ::memset(&v_, 0, static_cast<size_t>(
  372. reinterpret_cast<char*>(&vth_) -
  373. reinterpret_cast<char*>(&v_)) + sizeof(vth_));
  374. }
  375. ChangeSpeedCmd::~ChangeSpeedCmd() {
  376. // @@protoc_insertion_point(destructor:ChangeSpeedCmd)
  377. SharedDtor();
  378. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  379. }
  380. void ChangeSpeedCmd::SharedDtor() {
  381. GOOGLE_DCHECK(GetArena() == nullptr);
  382. }
  383. void ChangeSpeedCmd::ArenaDtor(void* object) {
  384. ChangeSpeedCmd* _this = reinterpret_cast< ChangeSpeedCmd* >(object);
  385. (void)_this;
  386. }
  387. void ChangeSpeedCmd::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  388. }
  389. void ChangeSpeedCmd::SetCachedSize(int size) const {
  390. _cached_size_.Set(size);
  391. }
  392. const ChangeSpeedCmd& ChangeSpeedCmd::default_instance() {
  393. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ChangeSpeedCmd_message_2eproto.base);
  394. return *internal_default_instance();
  395. }
  396. void ChangeSpeedCmd::Clear() {
  397. // @@protoc_insertion_point(message_clear_start:ChangeSpeedCmd)
  398. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  399. // Prevent compiler warnings about cached_has_bits being unused
  400. (void) cached_has_bits;
  401. ::memset(&v_, 0, static_cast<size_t>(
  402. reinterpret_cast<char*>(&vth_) -
  403. reinterpret_cast<char*>(&v_)) + sizeof(vth_));
  404. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  405. }
  406. const char* ChangeSpeedCmd::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  407. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  408. ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
  409. while (!ctx->Done(&ptr)) {
  410. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  411. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  412. CHK_(ptr);
  413. switch (tag >> 3) {
  414. // float v = 1;
  415. case 1:
  416. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) {
  417. v_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
  418. ptr += sizeof(float);
  419. } else goto handle_unusual;
  420. continue;
  421. // float vth = 2;
  422. case 2:
  423. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) {
  424. vth_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
  425. ptr += sizeof(float);
  426. } else goto handle_unusual;
  427. continue;
  428. default: {
  429. handle_unusual:
  430. if ((tag & 7) == 4 || tag == 0) {
  431. ctx->SetLastTag(tag);
  432. goto success;
  433. }
  434. ptr = UnknownFieldParse(tag,
  435. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  436. ptr, ctx);
  437. CHK_(ptr != nullptr);
  438. continue;
  439. }
  440. } // switch
  441. } // while
  442. success:
  443. return ptr;
  444. failure:
  445. ptr = nullptr;
  446. goto success;
  447. #undef CHK_
  448. }
  449. ::PROTOBUF_NAMESPACE_ID::uint8* ChangeSpeedCmd::_InternalSerialize(
  450. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  451. // @@protoc_insertion_point(serialize_to_array_start:ChangeSpeedCmd)
  452. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  453. (void) cached_has_bits;
  454. // float v = 1;
  455. if (!(this->v() <= 0 && this->v() >= 0)) {
  456. target = stream->EnsureSpace(target);
  457. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_v(), target);
  458. }
  459. // float vth = 2;
  460. if (!(this->vth() <= 0 && this->vth() >= 0)) {
  461. target = stream->EnsureSpace(target);
  462. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_vth(), target);
  463. }
  464. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  465. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  466. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  467. }
  468. // @@protoc_insertion_point(serialize_to_array_end:ChangeSpeedCmd)
  469. return target;
  470. }
  471. size_t ChangeSpeedCmd::ByteSizeLong() const {
  472. // @@protoc_insertion_point(message_byte_size_start:ChangeSpeedCmd)
  473. size_t total_size = 0;
  474. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  475. // Prevent compiler warnings about cached_has_bits being unused
  476. (void) cached_has_bits;
  477. // float v = 1;
  478. if (!(this->v() <= 0 && this->v() >= 0)) {
  479. total_size += 1 + 4;
  480. }
  481. // float vth = 2;
  482. if (!(this->vth() <= 0 && this->vth() >= 0)) {
  483. total_size += 1 + 4;
  484. }
  485. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  486. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  487. _internal_metadata_, total_size, &_cached_size_);
  488. }
  489. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  490. SetCachedSize(cached_size);
  491. return total_size;
  492. }
  493. void ChangeSpeedCmd::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  494. // @@protoc_insertion_point(generalized_merge_from_start:ChangeSpeedCmd)
  495. GOOGLE_DCHECK_NE(&from, this);
  496. const ChangeSpeedCmd* source =
  497. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ChangeSpeedCmd>(
  498. &from);
  499. if (source == nullptr) {
  500. // @@protoc_insertion_point(generalized_merge_from_cast_fail:ChangeSpeedCmd)
  501. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  502. } else {
  503. // @@protoc_insertion_point(generalized_merge_from_cast_success:ChangeSpeedCmd)
  504. MergeFrom(*source);
  505. }
  506. }
  507. void ChangeSpeedCmd::MergeFrom(const ChangeSpeedCmd& from) {
  508. // @@protoc_insertion_point(class_specific_merge_from_start:ChangeSpeedCmd)
  509. GOOGLE_DCHECK_NE(&from, this);
  510. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  511. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  512. (void) cached_has_bits;
  513. if (!(from.v() <= 0 && from.v() >= 0)) {
  514. _internal_set_v(from._internal_v());
  515. }
  516. if (!(from.vth() <= 0 && from.vth() >= 0)) {
  517. _internal_set_vth(from._internal_vth());
  518. }
  519. }
  520. void ChangeSpeedCmd::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  521. // @@protoc_insertion_point(generalized_copy_from_start:ChangeSpeedCmd)
  522. if (&from == this) return;
  523. Clear();
  524. MergeFrom(from);
  525. }
  526. void ChangeSpeedCmd::CopyFrom(const ChangeSpeedCmd& from) {
  527. // @@protoc_insertion_point(class_specific_copy_from_start:ChangeSpeedCmd)
  528. if (&from == this) return;
  529. Clear();
  530. MergeFrom(from);
  531. }
  532. bool ChangeSpeedCmd::IsInitialized() const {
  533. return true;
  534. }
  535. void ChangeSpeedCmd::InternalSwap(ChangeSpeedCmd* other) {
  536. using std::swap;
  537. _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  538. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  539. PROTOBUF_FIELD_OFFSET(ChangeSpeedCmd, vth_)
  540. + sizeof(ChangeSpeedCmd::vth_)
  541. - PROTOBUF_FIELD_OFFSET(ChangeSpeedCmd, v_)>(
  542. reinterpret_cast<char*>(&v_),
  543. reinterpret_cast<char*>(&other->v_));
  544. }
  545. ::PROTOBUF_NAMESPACE_ID::Metadata ChangeSpeedCmd::GetMetadata() const {
  546. return GetMetadataStatic();
  547. }
  548. // @@protoc_insertion_point(namespace_scope)
  549. PROTOBUF_NAMESPACE_OPEN
  550. template<> PROTOBUF_NOINLINE ::AGVStatu* Arena::CreateMaybeMessage< ::AGVStatu >(Arena* arena) {
  551. return Arena::CreateMessageInternal< ::AGVStatu >(arena);
  552. }
  553. template<> PROTOBUF_NOINLINE ::ChangeSpeedCmd* Arena::CreateMaybeMessage< ::ChangeSpeedCmd >(Arena* arena) {
  554. return Arena::CreateMessageInternal< ::ChangeSpeedCmd >(arena);
  555. }
  556. PROTOBUF_NAMESPACE_CLOSE
  557. // @@protoc_insertion_point(global_scope)
  558. #include <google/protobuf/port_undef.inc>