hardware_message.pb.cc 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: hardware_message.proto
  3. #include "hardware_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 PositionDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<Position>
  23. _instance;
  24. } _Position_default_instance_;
  25. class Carrier_statusDefaultTypeInternal {
  26. public:
  27. ::google::protobuf::internal::ExplicitlyConstructed<Carrier_status>
  28. _instance;
  29. } _Carrier_status_default_instance_;
  30. class Harware_statu_msgDefaultTypeInternal {
  31. public:
  32. ::google::protobuf::internal::ExplicitlyConstructed<Harware_statu_msg>
  33. _instance;
  34. } _Harware_statu_msg_default_instance_;
  35. class Execute_request_msgDefaultTypeInternal {
  36. public:
  37. ::google::protobuf::internal::ExplicitlyConstructed<Execute_request_msg>
  38. _instance;
  39. } _Execute_request_msg_default_instance_;
  40. class Execute_response_msgDefaultTypeInternal {
  41. public:
  42. ::google::protobuf::internal::ExplicitlyConstructed<Execute_response_msg>
  43. _instance;
  44. } _Execute_response_msg_default_instance_;
  45. } // namespace message
  46. namespace protobuf_hardware_5fmessage_2eproto {
  47. void InitDefaultsPositionImpl() {
  48. GOOGLE_PROTOBUF_VERIFY_VERSION;
  49. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  50. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  51. #else
  52. ::google::protobuf::internal::InitProtobufDefaults();
  53. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  54. {
  55. void* ptr = &::message::_Position_default_instance_;
  56. new (ptr) ::message::Position();
  57. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  58. }
  59. ::message::Position::InitAsDefaultInstance();
  60. }
  61. void InitDefaultsPosition() {
  62. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  63. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsPositionImpl);
  64. }
  65. void InitDefaultsCarrier_statusImpl() {
  66. GOOGLE_PROTOBUF_VERIFY_VERSION;
  67. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  68. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  69. #else
  70. ::google::protobuf::internal::InitProtobufDefaults();
  71. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  72. protobuf_message_5fbase_2eproto::InitDefaultsCommand_message();
  73. protobuf_hardware_5fmessage_2eproto::InitDefaultsPosition();
  74. {
  75. void* ptr = &::message::_Carrier_status_default_instance_;
  76. new (ptr) ::message::Carrier_status();
  77. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  78. }
  79. ::message::Carrier_status::InitAsDefaultInstance();
  80. }
  81. void InitDefaultsCarrier_status() {
  82. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  83. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCarrier_statusImpl);
  84. }
  85. void InitDefaultsHarware_statu_msgImpl() {
  86. GOOGLE_PROTOBUF_VERIFY_VERSION;
  87. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  88. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  89. #else
  90. ::google::protobuf::internal::InitProtobufDefaults();
  91. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  92. protobuf_hardware_5fmessage_2eproto::InitDefaultsCarrier_status();
  93. {
  94. void* ptr = &::message::_Harware_statu_msg_default_instance_;
  95. new (ptr) ::message::Harware_statu_msg();
  96. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  97. }
  98. ::message::Harware_statu_msg::InitAsDefaultInstance();
  99. }
  100. void InitDefaultsHarware_statu_msg() {
  101. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  102. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsHarware_statu_msgImpl);
  103. }
  104. void InitDefaultsExecute_request_msgImpl() {
  105. GOOGLE_PROTOBUF_VERIFY_VERSION;
  106. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  107. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  108. #else
  109. ::google::protobuf::internal::InitProtobufDefaults();
  110. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  111. protobuf_message_5fbase_2eproto::InitDefaultsCommand_message();
  112. {
  113. void* ptr = &::message::_Execute_request_msg_default_instance_;
  114. new (ptr) ::message::Execute_request_msg();
  115. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  116. }
  117. ::message::Execute_request_msg::InitAsDefaultInstance();
  118. }
  119. void InitDefaultsExecute_request_msg() {
  120. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  121. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsExecute_request_msgImpl);
  122. }
  123. void InitDefaultsExecute_response_msgImpl() {
  124. GOOGLE_PROTOBUF_VERIFY_VERSION;
  125. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  126. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  127. #else
  128. ::google::protobuf::internal::InitProtobufDefaults();
  129. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  130. protobuf_message_5fbase_2eproto::InitDefaultsCommand_message();
  131. {
  132. void* ptr = &::message::_Execute_response_msg_default_instance_;
  133. new (ptr) ::message::Execute_response_msg();
  134. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  135. }
  136. ::message::Execute_response_msg::InitAsDefaultInstance();
  137. }
  138. void InitDefaultsExecute_response_msg() {
  139. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  140. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsExecute_response_msgImpl);
  141. }
  142. ::google::protobuf::Metadata file_level_metadata[5];
  143. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
  144. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  145. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Position, _has_bits_),
  146. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Position, _internal_metadata_),
  147. ~0u, // no _extensions_
  148. ~0u, // no _oneof_case_
  149. ~0u, // no _weak_field_map_
  150. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Position, x_),
  151. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Position, y_),
  152. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Position, z_),
  153. 0,
  154. 1,
  155. 2,
  156. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Carrier_status, _has_bits_),
  157. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Carrier_status, _internal_metadata_),
  158. ~0u, // no _extensions_
  159. ~0u, // no _oneof_case_
  160. ~0u, // no _weak_field_map_
  161. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Carrier_status, statu_),
  162. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Carrier_status, cmd_msg_),
  163. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Carrier_status, error_destination_),
  164. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Carrier_status, position_),
  165. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Carrier_status, empty_),
  166. 3,
  167. 1,
  168. 0,
  169. 2,
  170. 4,
  171. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Harware_statu_msg, _has_bits_),
  172. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Harware_statu_msg, _internal_metadata_),
  173. ~0u, // no _extensions_
  174. ~0u, // no _oneof_case_
  175. ~0u, // no _weak_field_map_
  176. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Harware_statu_msg, msg_type_),
  177. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Harware_statu_msg, carrier1_statu_),
  178. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Harware_statu_msg, carrier2_statu_),
  179. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Harware_statu_msg, carrier3_statu_),
  180. 3,
  181. 0,
  182. 1,
  183. 2,
  184. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_request_msg, _has_bits_),
  185. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_request_msg, _internal_metadata_),
  186. ~0u, // no _extensions_
  187. ~0u, // no _oneof_case_
  188. ~0u, // no _weak_field_map_
  189. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_request_msg, msg_type_),
  190. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_request_msg, cmd_msg_),
  191. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_request_msg, time_out_),
  192. 1,
  193. 0,
  194. 2,
  195. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_response_msg, _has_bits_),
  196. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_response_msg, _internal_metadata_),
  197. ~0u, // no _extensions_
  198. ~0u, // no _oneof_case_
  199. ~0u, // no _weak_field_map_
  200. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_response_msg, msg_type_),
  201. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_response_msg, cmd_msg_),
  202. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_response_msg, error_code_),
  203. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Execute_response_msg, error_description_),
  204. 2,
  205. 1,
  206. 3,
  207. 0,
  208. };
  209. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  210. { 0, 8, sizeof(::message::Position)},
  211. { 11, 21, sizeof(::message::Carrier_status)},
  212. { 26, 35, sizeof(::message::Harware_statu_msg)},
  213. { 39, 47, sizeof(::message::Execute_request_msg)},
  214. { 50, 59, sizeof(::message::Execute_response_msg)},
  215. };
  216. static ::google::protobuf::Message const * const file_default_instances[] = {
  217. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Position_default_instance_),
  218. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Carrier_status_default_instance_),
  219. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Harware_statu_msg_default_instance_),
  220. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Execute_request_msg_default_instance_),
  221. reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Execute_response_msg_default_instance_),
  222. };
  223. void protobuf_AssignDescriptors() {
  224. AddDescriptors();
  225. ::google::protobuf::MessageFactory* factory = NULL;
  226. AssignDescriptors(
  227. "hardware_message.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  228. file_level_metadata, file_level_enum_descriptors, NULL);
  229. }
  230. void protobuf_AssignDescriptorsOnce() {
  231. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  232. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  233. }
  234. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  235. void protobuf_RegisterTypes(const ::std::string&) {
  236. protobuf_AssignDescriptorsOnce();
  237. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
  238. }
  239. void AddDescriptorsImpl() {
  240. InitDefaults();
  241. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  242. "\n\026hardware_message.proto\022\007message\032\022messa"
  243. "ge_base.proto\"+\n\010Position\022\t\n\001x\030\001 \002(\002\022\t\n\001"
  244. "y\030\002 \002(\002\022\t\n\001z\030\003 \002(\002\"\262\001\n\016Carrier_status\022&\n"
  245. "\005statu\030\001 \002(\0162\027.message.Hardware_statu\022)\n"
  246. "\007cmd_msg\030\002 \001(\0132\030.message.Command_message"
  247. "\022\031\n\021error_destination\030\003 \001(\t\022#\n\010position\030"
  248. "\004 \001(\0132\021.message.Position\022\r\n\005empty\030\005 \002(\010\""
  249. "\317\001\n\021Harware_statu_msg\022\'\n\010msg_type\030\001 \002(\0162"
  250. "\025.message.Message_type\022/\n\016carrier1_statu"
  251. "\030\002 \002(\0132\027.message.Carrier_status\022/\n\016carri"
  252. "er2_statu\030\003 \002(\0132\027.message.Carrier_status"
  253. "\022/\n\016carrier3_statu\030\004 \002(\0132\027.message.Carri"
  254. "er_status\"\203\001\n\023Execute_request_msg\022\'\n\010msg"
  255. "_type\030\001 \002(\0162\025.message.Message_type\022)\n\007cm"
  256. "d_msg\030\002 \002(\0132\030.message.Command_message\022\030\n"
  257. "\010time_out\030\003 \001(\005:\006200000\"\231\001\n\024Execute_resp"
  258. "onse_msg\022\'\n\010msg_type\030\001 \002(\0162\025.message.Mes"
  259. "sage_type\022)\n\007cmd_msg\030\002 \002(\0132\030.message.Com"
  260. "mand_message\022\022\n\nerror_code\030\003 \002(\005\022\031\n\021erro"
  261. "r_description\030\004 \001(\t*\?\n\016Hardware_statu\022\013\n"
  262. "\007eNormal\020\000\022\t\n\005eBusy\020\001\022\t\n\005eMiss\020\002\022\n\n\006eErr"
  263. "or\020\003"
  264. };
  265. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  266. descriptor, 844);
  267. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  268. "hardware_message.proto", &protobuf_RegisterTypes);
  269. ::protobuf_message_5fbase_2eproto::AddDescriptors();
  270. }
  271. void AddDescriptors() {
  272. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  273. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  274. }
  275. // Force AddDescriptors() to be called at dynamic initialization time.
  276. struct StaticDescriptorInitializer {
  277. StaticDescriptorInitializer() {
  278. AddDescriptors();
  279. }
  280. } static_descriptor_initializer;
  281. } // namespace protobuf_hardware_5fmessage_2eproto
  282. namespace message {
  283. const ::google::protobuf::EnumDescriptor* Hardware_statu_descriptor() {
  284. protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  285. return protobuf_hardware_5fmessage_2eproto::file_level_enum_descriptors[0];
  286. }
  287. bool Hardware_statu_IsValid(int value) {
  288. switch (value) {
  289. case 0:
  290. case 1:
  291. case 2:
  292. case 3:
  293. return true;
  294. default:
  295. return false;
  296. }
  297. }
  298. // ===================================================================
  299. void Position::InitAsDefaultInstance() {
  300. }
  301. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  302. const int Position::kXFieldNumber;
  303. const int Position::kYFieldNumber;
  304. const int Position::kZFieldNumber;
  305. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  306. Position::Position()
  307. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  308. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  309. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsPosition();
  310. }
  311. SharedCtor();
  312. // @@protoc_insertion_point(constructor:message.Position)
  313. }
  314. Position::Position(const Position& from)
  315. : ::google::protobuf::Message(),
  316. _internal_metadata_(NULL),
  317. _has_bits_(from._has_bits_),
  318. _cached_size_(0) {
  319. _internal_metadata_.MergeFrom(from._internal_metadata_);
  320. ::memcpy(&x_, &from.x_,
  321. static_cast<size_t>(reinterpret_cast<char*>(&z_) -
  322. reinterpret_cast<char*>(&x_)) + sizeof(z_));
  323. // @@protoc_insertion_point(copy_constructor:message.Position)
  324. }
  325. void Position::SharedCtor() {
  326. _cached_size_ = 0;
  327. ::memset(&x_, 0, static_cast<size_t>(
  328. reinterpret_cast<char*>(&z_) -
  329. reinterpret_cast<char*>(&x_)) + sizeof(z_));
  330. }
  331. Position::~Position() {
  332. // @@protoc_insertion_point(destructor:message.Position)
  333. SharedDtor();
  334. }
  335. void Position::SharedDtor() {
  336. }
  337. void Position::SetCachedSize(int size) const {
  338. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  339. _cached_size_ = size;
  340. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  341. }
  342. const ::google::protobuf::Descriptor* Position::descriptor() {
  343. ::protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  344. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  345. }
  346. const Position& Position::default_instance() {
  347. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsPosition();
  348. return *internal_default_instance();
  349. }
  350. Position* Position::New(::google::protobuf::Arena* arena) const {
  351. Position* n = new Position;
  352. if (arena != NULL) {
  353. arena->Own(n);
  354. }
  355. return n;
  356. }
  357. void Position::Clear() {
  358. // @@protoc_insertion_point(message_clear_start:message.Position)
  359. ::google::protobuf::uint32 cached_has_bits = 0;
  360. // Prevent compiler warnings about cached_has_bits being unused
  361. (void) cached_has_bits;
  362. cached_has_bits = _has_bits_[0];
  363. if (cached_has_bits & 7u) {
  364. ::memset(&x_, 0, static_cast<size_t>(
  365. reinterpret_cast<char*>(&z_) -
  366. reinterpret_cast<char*>(&x_)) + sizeof(z_));
  367. }
  368. _has_bits_.Clear();
  369. _internal_metadata_.Clear();
  370. }
  371. bool Position::MergePartialFromCodedStream(
  372. ::google::protobuf::io::CodedInputStream* input) {
  373. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  374. ::google::protobuf::uint32 tag;
  375. // @@protoc_insertion_point(parse_start:message.Position)
  376. for (;;) {
  377. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  378. tag = p.first;
  379. if (!p.second) goto handle_unusual;
  380. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  381. // required float x = 1;
  382. case 1: {
  383. if (static_cast< ::google::protobuf::uint8>(tag) ==
  384. static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
  385. set_has_x();
  386. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  387. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  388. input, &x_)));
  389. } else {
  390. goto handle_unusual;
  391. }
  392. break;
  393. }
  394. // required float y = 2;
  395. case 2: {
  396. if (static_cast< ::google::protobuf::uint8>(tag) ==
  397. static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
  398. set_has_y();
  399. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  400. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  401. input, &y_)));
  402. } else {
  403. goto handle_unusual;
  404. }
  405. break;
  406. }
  407. // required float z = 3;
  408. case 3: {
  409. if (static_cast< ::google::protobuf::uint8>(tag) ==
  410. static_cast< ::google::protobuf::uint8>(29u /* 29 & 0xFF */)) {
  411. set_has_z();
  412. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  413. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  414. input, &z_)));
  415. } else {
  416. goto handle_unusual;
  417. }
  418. break;
  419. }
  420. default: {
  421. handle_unusual:
  422. if (tag == 0) {
  423. goto success;
  424. }
  425. DO_(::google::protobuf::internal::WireFormat::SkipField(
  426. input, tag, _internal_metadata_.mutable_unknown_fields()));
  427. break;
  428. }
  429. }
  430. }
  431. success:
  432. // @@protoc_insertion_point(parse_success:message.Position)
  433. return true;
  434. failure:
  435. // @@protoc_insertion_point(parse_failure:message.Position)
  436. return false;
  437. #undef DO_
  438. }
  439. void Position::SerializeWithCachedSizes(
  440. ::google::protobuf::io::CodedOutputStream* output) const {
  441. // @@protoc_insertion_point(serialize_start:message.Position)
  442. ::google::protobuf::uint32 cached_has_bits = 0;
  443. (void) cached_has_bits;
  444. cached_has_bits = _has_bits_[0];
  445. // required float x = 1;
  446. if (cached_has_bits & 0x00000001u) {
  447. ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->x(), output);
  448. }
  449. // required float y = 2;
  450. if (cached_has_bits & 0x00000002u) {
  451. ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->y(), output);
  452. }
  453. // required float z = 3;
  454. if (cached_has_bits & 0x00000004u) {
  455. ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->z(), output);
  456. }
  457. if (_internal_metadata_.have_unknown_fields()) {
  458. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  459. _internal_metadata_.unknown_fields(), output);
  460. }
  461. // @@protoc_insertion_point(serialize_end:message.Position)
  462. }
  463. ::google::protobuf::uint8* Position::InternalSerializeWithCachedSizesToArray(
  464. bool deterministic, ::google::protobuf::uint8* target) const {
  465. (void)deterministic; // Unused
  466. // @@protoc_insertion_point(serialize_to_array_start:message.Position)
  467. ::google::protobuf::uint32 cached_has_bits = 0;
  468. (void) cached_has_bits;
  469. cached_has_bits = _has_bits_[0];
  470. // required float x = 1;
  471. if (cached_has_bits & 0x00000001u) {
  472. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->x(), target);
  473. }
  474. // required float y = 2;
  475. if (cached_has_bits & 0x00000002u) {
  476. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->y(), target);
  477. }
  478. // required float z = 3;
  479. if (cached_has_bits & 0x00000004u) {
  480. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->z(), target);
  481. }
  482. if (_internal_metadata_.have_unknown_fields()) {
  483. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  484. _internal_metadata_.unknown_fields(), target);
  485. }
  486. // @@protoc_insertion_point(serialize_to_array_end:message.Position)
  487. return target;
  488. }
  489. size_t Position::RequiredFieldsByteSizeFallback() const {
  490. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Position)
  491. size_t total_size = 0;
  492. if (has_x()) {
  493. // required float x = 1;
  494. total_size += 1 + 4;
  495. }
  496. if (has_y()) {
  497. // required float y = 2;
  498. total_size += 1 + 4;
  499. }
  500. if (has_z()) {
  501. // required float z = 3;
  502. total_size += 1 + 4;
  503. }
  504. return total_size;
  505. }
  506. size_t Position::ByteSizeLong() const {
  507. // @@protoc_insertion_point(message_byte_size_start:message.Position)
  508. size_t total_size = 0;
  509. if (_internal_metadata_.have_unknown_fields()) {
  510. total_size +=
  511. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  512. _internal_metadata_.unknown_fields());
  513. }
  514. if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
  515. // required float x = 1;
  516. total_size += 1 + 4;
  517. // required float y = 2;
  518. total_size += 1 + 4;
  519. // required float z = 3;
  520. total_size += 1 + 4;
  521. } else {
  522. total_size += RequiredFieldsByteSizeFallback();
  523. }
  524. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  525. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  526. _cached_size_ = cached_size;
  527. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  528. return total_size;
  529. }
  530. void Position::MergeFrom(const ::google::protobuf::Message& from) {
  531. // @@protoc_insertion_point(generalized_merge_from_start:message.Position)
  532. GOOGLE_DCHECK_NE(&from, this);
  533. const Position* source =
  534. ::google::protobuf::internal::DynamicCastToGenerated<const Position>(
  535. &from);
  536. if (source == NULL) {
  537. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Position)
  538. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  539. } else {
  540. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Position)
  541. MergeFrom(*source);
  542. }
  543. }
  544. void Position::MergeFrom(const Position& from) {
  545. // @@protoc_insertion_point(class_specific_merge_from_start:message.Position)
  546. GOOGLE_DCHECK_NE(&from, this);
  547. _internal_metadata_.MergeFrom(from._internal_metadata_);
  548. ::google::protobuf::uint32 cached_has_bits = 0;
  549. (void) cached_has_bits;
  550. cached_has_bits = from._has_bits_[0];
  551. if (cached_has_bits & 7u) {
  552. if (cached_has_bits & 0x00000001u) {
  553. x_ = from.x_;
  554. }
  555. if (cached_has_bits & 0x00000002u) {
  556. y_ = from.y_;
  557. }
  558. if (cached_has_bits & 0x00000004u) {
  559. z_ = from.z_;
  560. }
  561. _has_bits_[0] |= cached_has_bits;
  562. }
  563. }
  564. void Position::CopyFrom(const ::google::protobuf::Message& from) {
  565. // @@protoc_insertion_point(generalized_copy_from_start:message.Position)
  566. if (&from == this) return;
  567. Clear();
  568. MergeFrom(from);
  569. }
  570. void Position::CopyFrom(const Position& from) {
  571. // @@protoc_insertion_point(class_specific_copy_from_start:message.Position)
  572. if (&from == this) return;
  573. Clear();
  574. MergeFrom(from);
  575. }
  576. bool Position::IsInitialized() const {
  577. if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  578. return true;
  579. }
  580. void Position::Swap(Position* other) {
  581. if (other == this) return;
  582. InternalSwap(other);
  583. }
  584. void Position::InternalSwap(Position* other) {
  585. using std::swap;
  586. swap(x_, other->x_);
  587. swap(y_, other->y_);
  588. swap(z_, other->z_);
  589. swap(_has_bits_[0], other->_has_bits_[0]);
  590. _internal_metadata_.Swap(&other->_internal_metadata_);
  591. swap(_cached_size_, other->_cached_size_);
  592. }
  593. ::google::protobuf::Metadata Position::GetMetadata() const {
  594. protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  595. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  596. }
  597. // ===================================================================
  598. void Carrier_status::InitAsDefaultInstance() {
  599. ::message::_Carrier_status_default_instance_._instance.get_mutable()->cmd_msg_ = const_cast< ::message::Command_message*>(
  600. ::message::Command_message::internal_default_instance());
  601. ::message::_Carrier_status_default_instance_._instance.get_mutable()->position_ = const_cast< ::message::Position*>(
  602. ::message::Position::internal_default_instance());
  603. }
  604. void Carrier_status::clear_cmd_msg() {
  605. if (cmd_msg_ != NULL) cmd_msg_->Clear();
  606. clear_has_cmd_msg();
  607. }
  608. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  609. const int Carrier_status::kStatuFieldNumber;
  610. const int Carrier_status::kCmdMsgFieldNumber;
  611. const int Carrier_status::kErrorDestinationFieldNumber;
  612. const int Carrier_status::kPositionFieldNumber;
  613. const int Carrier_status::kEmptyFieldNumber;
  614. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  615. Carrier_status::Carrier_status()
  616. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  617. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  618. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsCarrier_status();
  619. }
  620. SharedCtor();
  621. // @@protoc_insertion_point(constructor:message.Carrier_status)
  622. }
  623. Carrier_status::Carrier_status(const Carrier_status& from)
  624. : ::google::protobuf::Message(),
  625. _internal_metadata_(NULL),
  626. _has_bits_(from._has_bits_),
  627. _cached_size_(0) {
  628. _internal_metadata_.MergeFrom(from._internal_metadata_);
  629. error_destination_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  630. if (from.has_error_destination()) {
  631. error_destination_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_destination_);
  632. }
  633. if (from.has_cmd_msg()) {
  634. cmd_msg_ = new ::message::Command_message(*from.cmd_msg_);
  635. } else {
  636. cmd_msg_ = NULL;
  637. }
  638. if (from.has_position()) {
  639. position_ = new ::message::Position(*from.position_);
  640. } else {
  641. position_ = NULL;
  642. }
  643. ::memcpy(&statu_, &from.statu_,
  644. static_cast<size_t>(reinterpret_cast<char*>(&empty_) -
  645. reinterpret_cast<char*>(&statu_)) + sizeof(empty_));
  646. // @@protoc_insertion_point(copy_constructor:message.Carrier_status)
  647. }
  648. void Carrier_status::SharedCtor() {
  649. _cached_size_ = 0;
  650. error_destination_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  651. ::memset(&cmd_msg_, 0, static_cast<size_t>(
  652. reinterpret_cast<char*>(&empty_) -
  653. reinterpret_cast<char*>(&cmd_msg_)) + sizeof(empty_));
  654. }
  655. Carrier_status::~Carrier_status() {
  656. // @@protoc_insertion_point(destructor:message.Carrier_status)
  657. SharedDtor();
  658. }
  659. void Carrier_status::SharedDtor() {
  660. error_destination_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  661. if (this != internal_default_instance()) delete cmd_msg_;
  662. if (this != internal_default_instance()) delete position_;
  663. }
  664. void Carrier_status::SetCachedSize(int size) const {
  665. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  666. _cached_size_ = size;
  667. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  668. }
  669. const ::google::protobuf::Descriptor* Carrier_status::descriptor() {
  670. ::protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  671. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  672. }
  673. const Carrier_status& Carrier_status::default_instance() {
  674. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsCarrier_status();
  675. return *internal_default_instance();
  676. }
  677. Carrier_status* Carrier_status::New(::google::protobuf::Arena* arena) const {
  678. Carrier_status* n = new Carrier_status;
  679. if (arena != NULL) {
  680. arena->Own(n);
  681. }
  682. return n;
  683. }
  684. void Carrier_status::Clear() {
  685. // @@protoc_insertion_point(message_clear_start:message.Carrier_status)
  686. ::google::protobuf::uint32 cached_has_bits = 0;
  687. // Prevent compiler warnings about cached_has_bits being unused
  688. (void) cached_has_bits;
  689. cached_has_bits = _has_bits_[0];
  690. if (cached_has_bits & 7u) {
  691. if (cached_has_bits & 0x00000001u) {
  692. GOOGLE_DCHECK(!error_destination_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  693. (*error_destination_.UnsafeRawStringPointer())->clear();
  694. }
  695. if (cached_has_bits & 0x00000002u) {
  696. GOOGLE_DCHECK(cmd_msg_ != NULL);
  697. cmd_msg_->Clear();
  698. }
  699. if (cached_has_bits & 0x00000004u) {
  700. GOOGLE_DCHECK(position_ != NULL);
  701. position_->Clear();
  702. }
  703. }
  704. if (cached_has_bits & 24u) {
  705. ::memset(&statu_, 0, static_cast<size_t>(
  706. reinterpret_cast<char*>(&empty_) -
  707. reinterpret_cast<char*>(&statu_)) + sizeof(empty_));
  708. }
  709. _has_bits_.Clear();
  710. _internal_metadata_.Clear();
  711. }
  712. bool Carrier_status::MergePartialFromCodedStream(
  713. ::google::protobuf::io::CodedInputStream* input) {
  714. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  715. ::google::protobuf::uint32 tag;
  716. // @@protoc_insertion_point(parse_start:message.Carrier_status)
  717. for (;;) {
  718. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  719. tag = p.first;
  720. if (!p.second) goto handle_unusual;
  721. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  722. // required .message.Hardware_statu statu = 1;
  723. case 1: {
  724. if (static_cast< ::google::protobuf::uint8>(tag) ==
  725. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  726. int value;
  727. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  728. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  729. input, &value)));
  730. if (::message::Hardware_statu_IsValid(value)) {
  731. set_statu(static_cast< ::message::Hardware_statu >(value));
  732. } else {
  733. mutable_unknown_fields()->AddVarint(
  734. 1, static_cast< ::google::protobuf::uint64>(value));
  735. }
  736. } else {
  737. goto handle_unusual;
  738. }
  739. break;
  740. }
  741. // optional .message.Command_message cmd_msg = 2;
  742. case 2: {
  743. if (static_cast< ::google::protobuf::uint8>(tag) ==
  744. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  745. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  746. input, mutable_cmd_msg()));
  747. } else {
  748. goto handle_unusual;
  749. }
  750. break;
  751. }
  752. // optional string error_destination = 3;
  753. case 3: {
  754. if (static_cast< ::google::protobuf::uint8>(tag) ==
  755. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  756. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  757. input, this->mutable_error_destination()));
  758. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  759. this->error_destination().data(), static_cast<int>(this->error_destination().length()),
  760. ::google::protobuf::internal::WireFormat::PARSE,
  761. "message.Carrier_status.error_destination");
  762. } else {
  763. goto handle_unusual;
  764. }
  765. break;
  766. }
  767. // optional .message.Position position = 4;
  768. case 4: {
  769. if (static_cast< ::google::protobuf::uint8>(tag) ==
  770. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  771. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  772. input, mutable_position()));
  773. } else {
  774. goto handle_unusual;
  775. }
  776. break;
  777. }
  778. // required bool empty = 5;
  779. case 5: {
  780. if (static_cast< ::google::protobuf::uint8>(tag) ==
  781. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  782. set_has_empty();
  783. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  784. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  785. input, &empty_)));
  786. } else {
  787. goto handle_unusual;
  788. }
  789. break;
  790. }
  791. default: {
  792. handle_unusual:
  793. if (tag == 0) {
  794. goto success;
  795. }
  796. DO_(::google::protobuf::internal::WireFormat::SkipField(
  797. input, tag, _internal_metadata_.mutable_unknown_fields()));
  798. break;
  799. }
  800. }
  801. }
  802. success:
  803. // @@protoc_insertion_point(parse_success:message.Carrier_status)
  804. return true;
  805. failure:
  806. // @@protoc_insertion_point(parse_failure:message.Carrier_status)
  807. return false;
  808. #undef DO_
  809. }
  810. void Carrier_status::SerializeWithCachedSizes(
  811. ::google::protobuf::io::CodedOutputStream* output) const {
  812. // @@protoc_insertion_point(serialize_start:message.Carrier_status)
  813. ::google::protobuf::uint32 cached_has_bits = 0;
  814. (void) cached_has_bits;
  815. cached_has_bits = _has_bits_[0];
  816. // required .message.Hardware_statu statu = 1;
  817. if (cached_has_bits & 0x00000008u) {
  818. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  819. 1, this->statu(), output);
  820. }
  821. // optional .message.Command_message cmd_msg = 2;
  822. if (cached_has_bits & 0x00000002u) {
  823. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  824. 2, *this->cmd_msg_, output);
  825. }
  826. // optional string error_destination = 3;
  827. if (cached_has_bits & 0x00000001u) {
  828. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  829. this->error_destination().data(), static_cast<int>(this->error_destination().length()),
  830. ::google::protobuf::internal::WireFormat::SERIALIZE,
  831. "message.Carrier_status.error_destination");
  832. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  833. 3, this->error_destination(), output);
  834. }
  835. // optional .message.Position position = 4;
  836. if (cached_has_bits & 0x00000004u) {
  837. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  838. 4, *this->position_, output);
  839. }
  840. // required bool empty = 5;
  841. if (cached_has_bits & 0x00000010u) {
  842. ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->empty(), output);
  843. }
  844. if (_internal_metadata_.have_unknown_fields()) {
  845. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  846. _internal_metadata_.unknown_fields(), output);
  847. }
  848. // @@protoc_insertion_point(serialize_end:message.Carrier_status)
  849. }
  850. ::google::protobuf::uint8* Carrier_status::InternalSerializeWithCachedSizesToArray(
  851. bool deterministic, ::google::protobuf::uint8* target) const {
  852. (void)deterministic; // Unused
  853. // @@protoc_insertion_point(serialize_to_array_start:message.Carrier_status)
  854. ::google::protobuf::uint32 cached_has_bits = 0;
  855. (void) cached_has_bits;
  856. cached_has_bits = _has_bits_[0];
  857. // required .message.Hardware_statu statu = 1;
  858. if (cached_has_bits & 0x00000008u) {
  859. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  860. 1, this->statu(), target);
  861. }
  862. // optional .message.Command_message cmd_msg = 2;
  863. if (cached_has_bits & 0x00000002u) {
  864. target = ::google::protobuf::internal::WireFormatLite::
  865. InternalWriteMessageToArray(
  866. 2, *this->cmd_msg_, deterministic, target);
  867. }
  868. // optional string error_destination = 3;
  869. if (cached_has_bits & 0x00000001u) {
  870. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  871. this->error_destination().data(), static_cast<int>(this->error_destination().length()),
  872. ::google::protobuf::internal::WireFormat::SERIALIZE,
  873. "message.Carrier_status.error_destination");
  874. target =
  875. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  876. 3, this->error_destination(), target);
  877. }
  878. // optional .message.Position position = 4;
  879. if (cached_has_bits & 0x00000004u) {
  880. target = ::google::protobuf::internal::WireFormatLite::
  881. InternalWriteMessageToArray(
  882. 4, *this->position_, deterministic, target);
  883. }
  884. // required bool empty = 5;
  885. if (cached_has_bits & 0x00000010u) {
  886. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->empty(), target);
  887. }
  888. if (_internal_metadata_.have_unknown_fields()) {
  889. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  890. _internal_metadata_.unknown_fields(), target);
  891. }
  892. // @@protoc_insertion_point(serialize_to_array_end:message.Carrier_status)
  893. return target;
  894. }
  895. size_t Carrier_status::RequiredFieldsByteSizeFallback() const {
  896. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Carrier_status)
  897. size_t total_size = 0;
  898. if (has_statu()) {
  899. // required .message.Hardware_statu statu = 1;
  900. total_size += 1 +
  901. ::google::protobuf::internal::WireFormatLite::EnumSize(this->statu());
  902. }
  903. if (has_empty()) {
  904. // required bool empty = 5;
  905. total_size += 1 + 1;
  906. }
  907. return total_size;
  908. }
  909. size_t Carrier_status::ByteSizeLong() const {
  910. // @@protoc_insertion_point(message_byte_size_start:message.Carrier_status)
  911. size_t total_size = 0;
  912. if (_internal_metadata_.have_unknown_fields()) {
  913. total_size +=
  914. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  915. _internal_metadata_.unknown_fields());
  916. }
  917. if (((_has_bits_[0] & 0x00000018) ^ 0x00000018) == 0) { // All required fields are present.
  918. // required .message.Hardware_statu statu = 1;
  919. total_size += 1 +
  920. ::google::protobuf::internal::WireFormatLite::EnumSize(this->statu());
  921. // required bool empty = 5;
  922. total_size += 1 + 1;
  923. } else {
  924. total_size += RequiredFieldsByteSizeFallback();
  925. }
  926. if (_has_bits_[0 / 32] & 7u) {
  927. // optional string error_destination = 3;
  928. if (has_error_destination()) {
  929. total_size += 1 +
  930. ::google::protobuf::internal::WireFormatLite::StringSize(
  931. this->error_destination());
  932. }
  933. // optional .message.Command_message cmd_msg = 2;
  934. if (has_cmd_msg()) {
  935. total_size += 1 +
  936. ::google::protobuf::internal::WireFormatLite::MessageSize(
  937. *this->cmd_msg_);
  938. }
  939. // optional .message.Position position = 4;
  940. if (has_position()) {
  941. total_size += 1 +
  942. ::google::protobuf::internal::WireFormatLite::MessageSize(
  943. *this->position_);
  944. }
  945. }
  946. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  947. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  948. _cached_size_ = cached_size;
  949. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  950. return total_size;
  951. }
  952. void Carrier_status::MergeFrom(const ::google::protobuf::Message& from) {
  953. // @@protoc_insertion_point(generalized_merge_from_start:message.Carrier_status)
  954. GOOGLE_DCHECK_NE(&from, this);
  955. const Carrier_status* source =
  956. ::google::protobuf::internal::DynamicCastToGenerated<const Carrier_status>(
  957. &from);
  958. if (source == NULL) {
  959. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Carrier_status)
  960. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  961. } else {
  962. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Carrier_status)
  963. MergeFrom(*source);
  964. }
  965. }
  966. void Carrier_status::MergeFrom(const Carrier_status& from) {
  967. // @@protoc_insertion_point(class_specific_merge_from_start:message.Carrier_status)
  968. GOOGLE_DCHECK_NE(&from, this);
  969. _internal_metadata_.MergeFrom(from._internal_metadata_);
  970. ::google::protobuf::uint32 cached_has_bits = 0;
  971. (void) cached_has_bits;
  972. cached_has_bits = from._has_bits_[0];
  973. if (cached_has_bits & 31u) {
  974. if (cached_has_bits & 0x00000001u) {
  975. set_has_error_destination();
  976. error_destination_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_destination_);
  977. }
  978. if (cached_has_bits & 0x00000002u) {
  979. mutable_cmd_msg()->::message::Command_message::MergeFrom(from.cmd_msg());
  980. }
  981. if (cached_has_bits & 0x00000004u) {
  982. mutable_position()->::message::Position::MergeFrom(from.position());
  983. }
  984. if (cached_has_bits & 0x00000008u) {
  985. statu_ = from.statu_;
  986. }
  987. if (cached_has_bits & 0x00000010u) {
  988. empty_ = from.empty_;
  989. }
  990. _has_bits_[0] |= cached_has_bits;
  991. }
  992. }
  993. void Carrier_status::CopyFrom(const ::google::protobuf::Message& from) {
  994. // @@protoc_insertion_point(generalized_copy_from_start:message.Carrier_status)
  995. if (&from == this) return;
  996. Clear();
  997. MergeFrom(from);
  998. }
  999. void Carrier_status::CopyFrom(const Carrier_status& from) {
  1000. // @@protoc_insertion_point(class_specific_copy_from_start:message.Carrier_status)
  1001. if (&from == this) return;
  1002. Clear();
  1003. MergeFrom(from);
  1004. }
  1005. bool Carrier_status::IsInitialized() const {
  1006. if ((_has_bits_[0] & 0x00000018) != 0x00000018) return false;
  1007. if (has_cmd_msg()) {
  1008. if (!this->cmd_msg_->IsInitialized()) return false;
  1009. }
  1010. if (has_position()) {
  1011. if (!this->position_->IsInitialized()) return false;
  1012. }
  1013. return true;
  1014. }
  1015. void Carrier_status::Swap(Carrier_status* other) {
  1016. if (other == this) return;
  1017. InternalSwap(other);
  1018. }
  1019. void Carrier_status::InternalSwap(Carrier_status* other) {
  1020. using std::swap;
  1021. error_destination_.Swap(&other->error_destination_);
  1022. swap(cmd_msg_, other->cmd_msg_);
  1023. swap(position_, other->position_);
  1024. swap(statu_, other->statu_);
  1025. swap(empty_, other->empty_);
  1026. swap(_has_bits_[0], other->_has_bits_[0]);
  1027. _internal_metadata_.Swap(&other->_internal_metadata_);
  1028. swap(_cached_size_, other->_cached_size_);
  1029. }
  1030. ::google::protobuf::Metadata Carrier_status::GetMetadata() const {
  1031. protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1032. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  1033. }
  1034. // ===================================================================
  1035. void Harware_statu_msg::InitAsDefaultInstance() {
  1036. ::message::_Harware_statu_msg_default_instance_._instance.get_mutable()->carrier1_statu_ = const_cast< ::message::Carrier_status*>(
  1037. ::message::Carrier_status::internal_default_instance());
  1038. ::message::_Harware_statu_msg_default_instance_._instance.get_mutable()->carrier2_statu_ = const_cast< ::message::Carrier_status*>(
  1039. ::message::Carrier_status::internal_default_instance());
  1040. ::message::_Harware_statu_msg_default_instance_._instance.get_mutable()->carrier3_statu_ = const_cast< ::message::Carrier_status*>(
  1041. ::message::Carrier_status::internal_default_instance());
  1042. }
  1043. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1044. const int Harware_statu_msg::kMsgTypeFieldNumber;
  1045. const int Harware_statu_msg::kCarrier1StatuFieldNumber;
  1046. const int Harware_statu_msg::kCarrier2StatuFieldNumber;
  1047. const int Harware_statu_msg::kCarrier3StatuFieldNumber;
  1048. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1049. Harware_statu_msg::Harware_statu_msg()
  1050. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1051. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1052. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsHarware_statu_msg();
  1053. }
  1054. SharedCtor();
  1055. // @@protoc_insertion_point(constructor:message.Harware_statu_msg)
  1056. }
  1057. Harware_statu_msg::Harware_statu_msg(const Harware_statu_msg& from)
  1058. : ::google::protobuf::Message(),
  1059. _internal_metadata_(NULL),
  1060. _has_bits_(from._has_bits_),
  1061. _cached_size_(0) {
  1062. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1063. if (from.has_carrier1_statu()) {
  1064. carrier1_statu_ = new ::message::Carrier_status(*from.carrier1_statu_);
  1065. } else {
  1066. carrier1_statu_ = NULL;
  1067. }
  1068. if (from.has_carrier2_statu()) {
  1069. carrier2_statu_ = new ::message::Carrier_status(*from.carrier2_statu_);
  1070. } else {
  1071. carrier2_statu_ = NULL;
  1072. }
  1073. if (from.has_carrier3_statu()) {
  1074. carrier3_statu_ = new ::message::Carrier_status(*from.carrier3_statu_);
  1075. } else {
  1076. carrier3_statu_ = NULL;
  1077. }
  1078. msg_type_ = from.msg_type_;
  1079. // @@protoc_insertion_point(copy_constructor:message.Harware_statu_msg)
  1080. }
  1081. void Harware_statu_msg::SharedCtor() {
  1082. _cached_size_ = 0;
  1083. ::memset(&carrier1_statu_, 0, static_cast<size_t>(
  1084. reinterpret_cast<char*>(&msg_type_) -
  1085. reinterpret_cast<char*>(&carrier1_statu_)) + sizeof(msg_type_));
  1086. }
  1087. Harware_statu_msg::~Harware_statu_msg() {
  1088. // @@protoc_insertion_point(destructor:message.Harware_statu_msg)
  1089. SharedDtor();
  1090. }
  1091. void Harware_statu_msg::SharedDtor() {
  1092. if (this != internal_default_instance()) delete carrier1_statu_;
  1093. if (this != internal_default_instance()) delete carrier2_statu_;
  1094. if (this != internal_default_instance()) delete carrier3_statu_;
  1095. }
  1096. void Harware_statu_msg::SetCachedSize(int size) const {
  1097. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1098. _cached_size_ = size;
  1099. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1100. }
  1101. const ::google::protobuf::Descriptor* Harware_statu_msg::descriptor() {
  1102. ::protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1103. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1104. }
  1105. const Harware_statu_msg& Harware_statu_msg::default_instance() {
  1106. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsHarware_statu_msg();
  1107. return *internal_default_instance();
  1108. }
  1109. Harware_statu_msg* Harware_statu_msg::New(::google::protobuf::Arena* arena) const {
  1110. Harware_statu_msg* n = new Harware_statu_msg;
  1111. if (arena != NULL) {
  1112. arena->Own(n);
  1113. }
  1114. return n;
  1115. }
  1116. void Harware_statu_msg::Clear() {
  1117. // @@protoc_insertion_point(message_clear_start:message.Harware_statu_msg)
  1118. ::google::protobuf::uint32 cached_has_bits = 0;
  1119. // Prevent compiler warnings about cached_has_bits being unused
  1120. (void) cached_has_bits;
  1121. cached_has_bits = _has_bits_[0];
  1122. if (cached_has_bits & 7u) {
  1123. if (cached_has_bits & 0x00000001u) {
  1124. GOOGLE_DCHECK(carrier1_statu_ != NULL);
  1125. carrier1_statu_->Clear();
  1126. }
  1127. if (cached_has_bits & 0x00000002u) {
  1128. GOOGLE_DCHECK(carrier2_statu_ != NULL);
  1129. carrier2_statu_->Clear();
  1130. }
  1131. if (cached_has_bits & 0x00000004u) {
  1132. GOOGLE_DCHECK(carrier3_statu_ != NULL);
  1133. carrier3_statu_->Clear();
  1134. }
  1135. }
  1136. msg_type_ = 0;
  1137. _has_bits_.Clear();
  1138. _internal_metadata_.Clear();
  1139. }
  1140. bool Harware_statu_msg::MergePartialFromCodedStream(
  1141. ::google::protobuf::io::CodedInputStream* input) {
  1142. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1143. ::google::protobuf::uint32 tag;
  1144. // @@protoc_insertion_point(parse_start:message.Harware_statu_msg)
  1145. for (;;) {
  1146. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1147. tag = p.first;
  1148. if (!p.second) goto handle_unusual;
  1149. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1150. // required .message.Message_type msg_type = 1;
  1151. case 1: {
  1152. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1153. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1154. int value;
  1155. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1156. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1157. input, &value)));
  1158. if (::message::Message_type_IsValid(value)) {
  1159. set_msg_type(static_cast< ::message::Message_type >(value));
  1160. } else {
  1161. mutable_unknown_fields()->AddVarint(
  1162. 1, static_cast< ::google::protobuf::uint64>(value));
  1163. }
  1164. } else {
  1165. goto handle_unusual;
  1166. }
  1167. break;
  1168. }
  1169. // required .message.Carrier_status carrier1_statu = 2;
  1170. case 2: {
  1171. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1172. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1173. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1174. input, mutable_carrier1_statu()));
  1175. } else {
  1176. goto handle_unusual;
  1177. }
  1178. break;
  1179. }
  1180. // required .message.Carrier_status carrier2_statu = 3;
  1181. case 3: {
  1182. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1183. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1184. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1185. input, mutable_carrier2_statu()));
  1186. } else {
  1187. goto handle_unusual;
  1188. }
  1189. break;
  1190. }
  1191. // required .message.Carrier_status carrier3_statu = 4;
  1192. case 4: {
  1193. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1194. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1195. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1196. input, mutable_carrier3_statu()));
  1197. } else {
  1198. goto handle_unusual;
  1199. }
  1200. break;
  1201. }
  1202. default: {
  1203. handle_unusual:
  1204. if (tag == 0) {
  1205. goto success;
  1206. }
  1207. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1208. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1209. break;
  1210. }
  1211. }
  1212. }
  1213. success:
  1214. // @@protoc_insertion_point(parse_success:message.Harware_statu_msg)
  1215. return true;
  1216. failure:
  1217. // @@protoc_insertion_point(parse_failure:message.Harware_statu_msg)
  1218. return false;
  1219. #undef DO_
  1220. }
  1221. void Harware_statu_msg::SerializeWithCachedSizes(
  1222. ::google::protobuf::io::CodedOutputStream* output) const {
  1223. // @@protoc_insertion_point(serialize_start:message.Harware_statu_msg)
  1224. ::google::protobuf::uint32 cached_has_bits = 0;
  1225. (void) cached_has_bits;
  1226. cached_has_bits = _has_bits_[0];
  1227. // required .message.Message_type msg_type = 1;
  1228. if (cached_has_bits & 0x00000008u) {
  1229. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1230. 1, this->msg_type(), output);
  1231. }
  1232. // required .message.Carrier_status carrier1_statu = 2;
  1233. if (cached_has_bits & 0x00000001u) {
  1234. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1235. 2, *this->carrier1_statu_, output);
  1236. }
  1237. // required .message.Carrier_status carrier2_statu = 3;
  1238. if (cached_has_bits & 0x00000002u) {
  1239. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1240. 3, *this->carrier2_statu_, output);
  1241. }
  1242. // required .message.Carrier_status carrier3_statu = 4;
  1243. if (cached_has_bits & 0x00000004u) {
  1244. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1245. 4, *this->carrier3_statu_, output);
  1246. }
  1247. if (_internal_metadata_.have_unknown_fields()) {
  1248. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1249. _internal_metadata_.unknown_fields(), output);
  1250. }
  1251. // @@protoc_insertion_point(serialize_end:message.Harware_statu_msg)
  1252. }
  1253. ::google::protobuf::uint8* Harware_statu_msg::InternalSerializeWithCachedSizesToArray(
  1254. bool deterministic, ::google::protobuf::uint8* target) const {
  1255. (void)deterministic; // Unused
  1256. // @@protoc_insertion_point(serialize_to_array_start:message.Harware_statu_msg)
  1257. ::google::protobuf::uint32 cached_has_bits = 0;
  1258. (void) cached_has_bits;
  1259. cached_has_bits = _has_bits_[0];
  1260. // required .message.Message_type msg_type = 1;
  1261. if (cached_has_bits & 0x00000008u) {
  1262. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1263. 1, this->msg_type(), target);
  1264. }
  1265. // required .message.Carrier_status carrier1_statu = 2;
  1266. if (cached_has_bits & 0x00000001u) {
  1267. target = ::google::protobuf::internal::WireFormatLite::
  1268. InternalWriteMessageToArray(
  1269. 2, *this->carrier1_statu_, deterministic, target);
  1270. }
  1271. // required .message.Carrier_status carrier2_statu = 3;
  1272. if (cached_has_bits & 0x00000002u) {
  1273. target = ::google::protobuf::internal::WireFormatLite::
  1274. InternalWriteMessageToArray(
  1275. 3, *this->carrier2_statu_, deterministic, target);
  1276. }
  1277. // required .message.Carrier_status carrier3_statu = 4;
  1278. if (cached_has_bits & 0x00000004u) {
  1279. target = ::google::protobuf::internal::WireFormatLite::
  1280. InternalWriteMessageToArray(
  1281. 4, *this->carrier3_statu_, deterministic, target);
  1282. }
  1283. if (_internal_metadata_.have_unknown_fields()) {
  1284. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1285. _internal_metadata_.unknown_fields(), target);
  1286. }
  1287. // @@protoc_insertion_point(serialize_to_array_end:message.Harware_statu_msg)
  1288. return target;
  1289. }
  1290. size_t Harware_statu_msg::RequiredFieldsByteSizeFallback() const {
  1291. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Harware_statu_msg)
  1292. size_t total_size = 0;
  1293. if (has_carrier1_statu()) {
  1294. // required .message.Carrier_status carrier1_statu = 2;
  1295. total_size += 1 +
  1296. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1297. *this->carrier1_statu_);
  1298. }
  1299. if (has_carrier2_statu()) {
  1300. // required .message.Carrier_status carrier2_statu = 3;
  1301. total_size += 1 +
  1302. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1303. *this->carrier2_statu_);
  1304. }
  1305. if (has_carrier3_statu()) {
  1306. // required .message.Carrier_status carrier3_statu = 4;
  1307. total_size += 1 +
  1308. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1309. *this->carrier3_statu_);
  1310. }
  1311. if (has_msg_type()) {
  1312. // required .message.Message_type msg_type = 1;
  1313. total_size += 1 +
  1314. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  1315. }
  1316. return total_size;
  1317. }
  1318. size_t Harware_statu_msg::ByteSizeLong() const {
  1319. // @@protoc_insertion_point(message_byte_size_start:message.Harware_statu_msg)
  1320. size_t total_size = 0;
  1321. if (_internal_metadata_.have_unknown_fields()) {
  1322. total_size +=
  1323. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1324. _internal_metadata_.unknown_fields());
  1325. }
  1326. if (((_has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) { // All required fields are present.
  1327. // required .message.Carrier_status carrier1_statu = 2;
  1328. total_size += 1 +
  1329. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1330. *this->carrier1_statu_);
  1331. // required .message.Carrier_status carrier2_statu = 3;
  1332. total_size += 1 +
  1333. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1334. *this->carrier2_statu_);
  1335. // required .message.Carrier_status carrier3_statu = 4;
  1336. total_size += 1 +
  1337. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1338. *this->carrier3_statu_);
  1339. // required .message.Message_type msg_type = 1;
  1340. total_size += 1 +
  1341. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  1342. } else {
  1343. total_size += RequiredFieldsByteSizeFallback();
  1344. }
  1345. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1346. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1347. _cached_size_ = cached_size;
  1348. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1349. return total_size;
  1350. }
  1351. void Harware_statu_msg::MergeFrom(const ::google::protobuf::Message& from) {
  1352. // @@protoc_insertion_point(generalized_merge_from_start:message.Harware_statu_msg)
  1353. GOOGLE_DCHECK_NE(&from, this);
  1354. const Harware_statu_msg* source =
  1355. ::google::protobuf::internal::DynamicCastToGenerated<const Harware_statu_msg>(
  1356. &from);
  1357. if (source == NULL) {
  1358. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Harware_statu_msg)
  1359. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1360. } else {
  1361. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Harware_statu_msg)
  1362. MergeFrom(*source);
  1363. }
  1364. }
  1365. void Harware_statu_msg::MergeFrom(const Harware_statu_msg& from) {
  1366. // @@protoc_insertion_point(class_specific_merge_from_start:message.Harware_statu_msg)
  1367. GOOGLE_DCHECK_NE(&from, this);
  1368. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1369. ::google::protobuf::uint32 cached_has_bits = 0;
  1370. (void) cached_has_bits;
  1371. cached_has_bits = from._has_bits_[0];
  1372. if (cached_has_bits & 15u) {
  1373. if (cached_has_bits & 0x00000001u) {
  1374. mutable_carrier1_statu()->::message::Carrier_status::MergeFrom(from.carrier1_statu());
  1375. }
  1376. if (cached_has_bits & 0x00000002u) {
  1377. mutable_carrier2_statu()->::message::Carrier_status::MergeFrom(from.carrier2_statu());
  1378. }
  1379. if (cached_has_bits & 0x00000004u) {
  1380. mutable_carrier3_statu()->::message::Carrier_status::MergeFrom(from.carrier3_statu());
  1381. }
  1382. if (cached_has_bits & 0x00000008u) {
  1383. msg_type_ = from.msg_type_;
  1384. }
  1385. _has_bits_[0] |= cached_has_bits;
  1386. }
  1387. }
  1388. void Harware_statu_msg::CopyFrom(const ::google::protobuf::Message& from) {
  1389. // @@protoc_insertion_point(generalized_copy_from_start:message.Harware_statu_msg)
  1390. if (&from == this) return;
  1391. Clear();
  1392. MergeFrom(from);
  1393. }
  1394. void Harware_statu_msg::CopyFrom(const Harware_statu_msg& from) {
  1395. // @@protoc_insertion_point(class_specific_copy_from_start:message.Harware_statu_msg)
  1396. if (&from == this) return;
  1397. Clear();
  1398. MergeFrom(from);
  1399. }
  1400. bool Harware_statu_msg::IsInitialized() const {
  1401. if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false;
  1402. if (has_carrier1_statu()) {
  1403. if (!this->carrier1_statu_->IsInitialized()) return false;
  1404. }
  1405. if (has_carrier2_statu()) {
  1406. if (!this->carrier2_statu_->IsInitialized()) return false;
  1407. }
  1408. if (has_carrier3_statu()) {
  1409. if (!this->carrier3_statu_->IsInitialized()) return false;
  1410. }
  1411. return true;
  1412. }
  1413. void Harware_statu_msg::Swap(Harware_statu_msg* other) {
  1414. if (other == this) return;
  1415. InternalSwap(other);
  1416. }
  1417. void Harware_statu_msg::InternalSwap(Harware_statu_msg* other) {
  1418. using std::swap;
  1419. swap(carrier1_statu_, other->carrier1_statu_);
  1420. swap(carrier2_statu_, other->carrier2_statu_);
  1421. swap(carrier3_statu_, other->carrier3_statu_);
  1422. swap(msg_type_, other->msg_type_);
  1423. swap(_has_bits_[0], other->_has_bits_[0]);
  1424. _internal_metadata_.Swap(&other->_internal_metadata_);
  1425. swap(_cached_size_, other->_cached_size_);
  1426. }
  1427. ::google::protobuf::Metadata Harware_statu_msg::GetMetadata() const {
  1428. protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1429. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  1430. }
  1431. // ===================================================================
  1432. void Execute_request_msg::InitAsDefaultInstance() {
  1433. ::message::_Execute_request_msg_default_instance_._instance.get_mutable()->cmd_msg_ = const_cast< ::message::Command_message*>(
  1434. ::message::Command_message::internal_default_instance());
  1435. }
  1436. void Execute_request_msg::clear_cmd_msg() {
  1437. if (cmd_msg_ != NULL) cmd_msg_->Clear();
  1438. clear_has_cmd_msg();
  1439. }
  1440. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1441. const int Execute_request_msg::kMsgTypeFieldNumber;
  1442. const int Execute_request_msg::kCmdMsgFieldNumber;
  1443. const int Execute_request_msg::kTimeOutFieldNumber;
  1444. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1445. Execute_request_msg::Execute_request_msg()
  1446. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1447. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1448. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsExecute_request_msg();
  1449. }
  1450. SharedCtor();
  1451. // @@protoc_insertion_point(constructor:message.Execute_request_msg)
  1452. }
  1453. Execute_request_msg::Execute_request_msg(const Execute_request_msg& from)
  1454. : ::google::protobuf::Message(),
  1455. _internal_metadata_(NULL),
  1456. _has_bits_(from._has_bits_),
  1457. _cached_size_(0) {
  1458. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1459. if (from.has_cmd_msg()) {
  1460. cmd_msg_ = new ::message::Command_message(*from.cmd_msg_);
  1461. } else {
  1462. cmd_msg_ = NULL;
  1463. }
  1464. ::memcpy(&msg_type_, &from.msg_type_,
  1465. static_cast<size_t>(reinterpret_cast<char*>(&time_out_) -
  1466. reinterpret_cast<char*>(&msg_type_)) + sizeof(time_out_));
  1467. // @@protoc_insertion_point(copy_constructor:message.Execute_request_msg)
  1468. }
  1469. void Execute_request_msg::SharedCtor() {
  1470. _cached_size_ = 0;
  1471. ::memset(&cmd_msg_, 0, static_cast<size_t>(
  1472. reinterpret_cast<char*>(&msg_type_) -
  1473. reinterpret_cast<char*>(&cmd_msg_)) + sizeof(msg_type_));
  1474. time_out_ = 200000;
  1475. }
  1476. Execute_request_msg::~Execute_request_msg() {
  1477. // @@protoc_insertion_point(destructor:message.Execute_request_msg)
  1478. SharedDtor();
  1479. }
  1480. void Execute_request_msg::SharedDtor() {
  1481. if (this != internal_default_instance()) delete cmd_msg_;
  1482. }
  1483. void Execute_request_msg::SetCachedSize(int size) const {
  1484. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1485. _cached_size_ = size;
  1486. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1487. }
  1488. const ::google::protobuf::Descriptor* Execute_request_msg::descriptor() {
  1489. ::protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1490. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1491. }
  1492. const Execute_request_msg& Execute_request_msg::default_instance() {
  1493. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsExecute_request_msg();
  1494. return *internal_default_instance();
  1495. }
  1496. Execute_request_msg* Execute_request_msg::New(::google::protobuf::Arena* arena) const {
  1497. Execute_request_msg* n = new Execute_request_msg;
  1498. if (arena != NULL) {
  1499. arena->Own(n);
  1500. }
  1501. return n;
  1502. }
  1503. void Execute_request_msg::Clear() {
  1504. // @@protoc_insertion_point(message_clear_start:message.Execute_request_msg)
  1505. ::google::protobuf::uint32 cached_has_bits = 0;
  1506. // Prevent compiler warnings about cached_has_bits being unused
  1507. (void) cached_has_bits;
  1508. cached_has_bits = _has_bits_[0];
  1509. if (cached_has_bits & 0x00000001u) {
  1510. GOOGLE_DCHECK(cmd_msg_ != NULL);
  1511. cmd_msg_->Clear();
  1512. }
  1513. if (cached_has_bits & 6u) {
  1514. msg_type_ = 0;
  1515. time_out_ = 200000;
  1516. }
  1517. _has_bits_.Clear();
  1518. _internal_metadata_.Clear();
  1519. }
  1520. bool Execute_request_msg::MergePartialFromCodedStream(
  1521. ::google::protobuf::io::CodedInputStream* input) {
  1522. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1523. ::google::protobuf::uint32 tag;
  1524. // @@protoc_insertion_point(parse_start:message.Execute_request_msg)
  1525. for (;;) {
  1526. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1527. tag = p.first;
  1528. if (!p.second) goto handle_unusual;
  1529. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1530. // required .message.Message_type msg_type = 1;
  1531. case 1: {
  1532. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1533. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1534. int value;
  1535. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1536. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1537. input, &value)));
  1538. if (::message::Message_type_IsValid(value)) {
  1539. set_msg_type(static_cast< ::message::Message_type >(value));
  1540. } else {
  1541. mutable_unknown_fields()->AddVarint(
  1542. 1, static_cast< ::google::protobuf::uint64>(value));
  1543. }
  1544. } else {
  1545. goto handle_unusual;
  1546. }
  1547. break;
  1548. }
  1549. // required .message.Command_message cmd_msg = 2;
  1550. case 2: {
  1551. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1552. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1553. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1554. input, mutable_cmd_msg()));
  1555. } else {
  1556. goto handle_unusual;
  1557. }
  1558. break;
  1559. }
  1560. // optional int32 time_out = 3 [default = 200000];
  1561. case 3: {
  1562. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1563. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  1564. set_has_time_out();
  1565. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1566. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1567. input, &time_out_)));
  1568. } else {
  1569. goto handle_unusual;
  1570. }
  1571. break;
  1572. }
  1573. default: {
  1574. handle_unusual:
  1575. if (tag == 0) {
  1576. goto success;
  1577. }
  1578. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1579. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1580. break;
  1581. }
  1582. }
  1583. }
  1584. success:
  1585. // @@protoc_insertion_point(parse_success:message.Execute_request_msg)
  1586. return true;
  1587. failure:
  1588. // @@protoc_insertion_point(parse_failure:message.Execute_request_msg)
  1589. return false;
  1590. #undef DO_
  1591. }
  1592. void Execute_request_msg::SerializeWithCachedSizes(
  1593. ::google::protobuf::io::CodedOutputStream* output) const {
  1594. // @@protoc_insertion_point(serialize_start:message.Execute_request_msg)
  1595. ::google::protobuf::uint32 cached_has_bits = 0;
  1596. (void) cached_has_bits;
  1597. cached_has_bits = _has_bits_[0];
  1598. // required .message.Message_type msg_type = 1;
  1599. if (cached_has_bits & 0x00000002u) {
  1600. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1601. 1, this->msg_type(), output);
  1602. }
  1603. // required .message.Command_message cmd_msg = 2;
  1604. if (cached_has_bits & 0x00000001u) {
  1605. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1606. 2, *this->cmd_msg_, output);
  1607. }
  1608. // optional int32 time_out = 3 [default = 200000];
  1609. if (cached_has_bits & 0x00000004u) {
  1610. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->time_out(), output);
  1611. }
  1612. if (_internal_metadata_.have_unknown_fields()) {
  1613. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1614. _internal_metadata_.unknown_fields(), output);
  1615. }
  1616. // @@protoc_insertion_point(serialize_end:message.Execute_request_msg)
  1617. }
  1618. ::google::protobuf::uint8* Execute_request_msg::InternalSerializeWithCachedSizesToArray(
  1619. bool deterministic, ::google::protobuf::uint8* target) const {
  1620. (void)deterministic; // Unused
  1621. // @@protoc_insertion_point(serialize_to_array_start:message.Execute_request_msg)
  1622. ::google::protobuf::uint32 cached_has_bits = 0;
  1623. (void) cached_has_bits;
  1624. cached_has_bits = _has_bits_[0];
  1625. // required .message.Message_type msg_type = 1;
  1626. if (cached_has_bits & 0x00000002u) {
  1627. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1628. 1, this->msg_type(), target);
  1629. }
  1630. // required .message.Command_message cmd_msg = 2;
  1631. if (cached_has_bits & 0x00000001u) {
  1632. target = ::google::protobuf::internal::WireFormatLite::
  1633. InternalWriteMessageToArray(
  1634. 2, *this->cmd_msg_, deterministic, target);
  1635. }
  1636. // optional int32 time_out = 3 [default = 200000];
  1637. if (cached_has_bits & 0x00000004u) {
  1638. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->time_out(), target);
  1639. }
  1640. if (_internal_metadata_.have_unknown_fields()) {
  1641. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1642. _internal_metadata_.unknown_fields(), target);
  1643. }
  1644. // @@protoc_insertion_point(serialize_to_array_end:message.Execute_request_msg)
  1645. return target;
  1646. }
  1647. size_t Execute_request_msg::RequiredFieldsByteSizeFallback() const {
  1648. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Execute_request_msg)
  1649. size_t total_size = 0;
  1650. if (has_cmd_msg()) {
  1651. // required .message.Command_message cmd_msg = 2;
  1652. total_size += 1 +
  1653. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1654. *this->cmd_msg_);
  1655. }
  1656. if (has_msg_type()) {
  1657. // required .message.Message_type msg_type = 1;
  1658. total_size += 1 +
  1659. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  1660. }
  1661. return total_size;
  1662. }
  1663. size_t Execute_request_msg::ByteSizeLong() const {
  1664. // @@protoc_insertion_point(message_byte_size_start:message.Execute_request_msg)
  1665. size_t total_size = 0;
  1666. if (_internal_metadata_.have_unknown_fields()) {
  1667. total_size +=
  1668. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1669. _internal_metadata_.unknown_fields());
  1670. }
  1671. if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
  1672. // required .message.Command_message cmd_msg = 2;
  1673. total_size += 1 +
  1674. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1675. *this->cmd_msg_);
  1676. // required .message.Message_type msg_type = 1;
  1677. total_size += 1 +
  1678. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  1679. } else {
  1680. total_size += RequiredFieldsByteSizeFallback();
  1681. }
  1682. // optional int32 time_out = 3 [default = 200000];
  1683. if (has_time_out()) {
  1684. total_size += 1 +
  1685. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1686. this->time_out());
  1687. }
  1688. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1689. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1690. _cached_size_ = cached_size;
  1691. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1692. return total_size;
  1693. }
  1694. void Execute_request_msg::MergeFrom(const ::google::protobuf::Message& from) {
  1695. // @@protoc_insertion_point(generalized_merge_from_start:message.Execute_request_msg)
  1696. GOOGLE_DCHECK_NE(&from, this);
  1697. const Execute_request_msg* source =
  1698. ::google::protobuf::internal::DynamicCastToGenerated<const Execute_request_msg>(
  1699. &from);
  1700. if (source == NULL) {
  1701. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Execute_request_msg)
  1702. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1703. } else {
  1704. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Execute_request_msg)
  1705. MergeFrom(*source);
  1706. }
  1707. }
  1708. void Execute_request_msg::MergeFrom(const Execute_request_msg& from) {
  1709. // @@protoc_insertion_point(class_specific_merge_from_start:message.Execute_request_msg)
  1710. GOOGLE_DCHECK_NE(&from, this);
  1711. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1712. ::google::protobuf::uint32 cached_has_bits = 0;
  1713. (void) cached_has_bits;
  1714. cached_has_bits = from._has_bits_[0];
  1715. if (cached_has_bits & 7u) {
  1716. if (cached_has_bits & 0x00000001u) {
  1717. mutable_cmd_msg()->::message::Command_message::MergeFrom(from.cmd_msg());
  1718. }
  1719. if (cached_has_bits & 0x00000002u) {
  1720. msg_type_ = from.msg_type_;
  1721. }
  1722. if (cached_has_bits & 0x00000004u) {
  1723. time_out_ = from.time_out_;
  1724. }
  1725. _has_bits_[0] |= cached_has_bits;
  1726. }
  1727. }
  1728. void Execute_request_msg::CopyFrom(const ::google::protobuf::Message& from) {
  1729. // @@protoc_insertion_point(generalized_copy_from_start:message.Execute_request_msg)
  1730. if (&from == this) return;
  1731. Clear();
  1732. MergeFrom(from);
  1733. }
  1734. void Execute_request_msg::CopyFrom(const Execute_request_msg& from) {
  1735. // @@protoc_insertion_point(class_specific_copy_from_start:message.Execute_request_msg)
  1736. if (&from == this) return;
  1737. Clear();
  1738. MergeFrom(from);
  1739. }
  1740. bool Execute_request_msg::IsInitialized() const {
  1741. if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
  1742. if (has_cmd_msg()) {
  1743. if (!this->cmd_msg_->IsInitialized()) return false;
  1744. }
  1745. return true;
  1746. }
  1747. void Execute_request_msg::Swap(Execute_request_msg* other) {
  1748. if (other == this) return;
  1749. InternalSwap(other);
  1750. }
  1751. void Execute_request_msg::InternalSwap(Execute_request_msg* other) {
  1752. using std::swap;
  1753. swap(cmd_msg_, other->cmd_msg_);
  1754. swap(msg_type_, other->msg_type_);
  1755. swap(time_out_, other->time_out_);
  1756. swap(_has_bits_[0], other->_has_bits_[0]);
  1757. _internal_metadata_.Swap(&other->_internal_metadata_);
  1758. swap(_cached_size_, other->_cached_size_);
  1759. }
  1760. ::google::protobuf::Metadata Execute_request_msg::GetMetadata() const {
  1761. protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1762. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  1763. }
  1764. // ===================================================================
  1765. void Execute_response_msg::InitAsDefaultInstance() {
  1766. ::message::_Execute_response_msg_default_instance_._instance.get_mutable()->cmd_msg_ = const_cast< ::message::Command_message*>(
  1767. ::message::Command_message::internal_default_instance());
  1768. }
  1769. void Execute_response_msg::clear_cmd_msg() {
  1770. if (cmd_msg_ != NULL) cmd_msg_->Clear();
  1771. clear_has_cmd_msg();
  1772. }
  1773. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1774. const int Execute_response_msg::kMsgTypeFieldNumber;
  1775. const int Execute_response_msg::kCmdMsgFieldNumber;
  1776. const int Execute_response_msg::kErrorCodeFieldNumber;
  1777. const int Execute_response_msg::kErrorDescriptionFieldNumber;
  1778. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1779. Execute_response_msg::Execute_response_msg()
  1780. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1781. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1782. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsExecute_response_msg();
  1783. }
  1784. SharedCtor();
  1785. // @@protoc_insertion_point(constructor:message.Execute_response_msg)
  1786. }
  1787. Execute_response_msg::Execute_response_msg(const Execute_response_msg& from)
  1788. : ::google::protobuf::Message(),
  1789. _internal_metadata_(NULL),
  1790. _has_bits_(from._has_bits_),
  1791. _cached_size_(0) {
  1792. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1793. error_description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1794. if (from.has_error_description()) {
  1795. error_description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_description_);
  1796. }
  1797. if (from.has_cmd_msg()) {
  1798. cmd_msg_ = new ::message::Command_message(*from.cmd_msg_);
  1799. } else {
  1800. cmd_msg_ = NULL;
  1801. }
  1802. ::memcpy(&msg_type_, &from.msg_type_,
  1803. static_cast<size_t>(reinterpret_cast<char*>(&error_code_) -
  1804. reinterpret_cast<char*>(&msg_type_)) + sizeof(error_code_));
  1805. // @@protoc_insertion_point(copy_constructor:message.Execute_response_msg)
  1806. }
  1807. void Execute_response_msg::SharedCtor() {
  1808. _cached_size_ = 0;
  1809. error_description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1810. ::memset(&cmd_msg_, 0, static_cast<size_t>(
  1811. reinterpret_cast<char*>(&error_code_) -
  1812. reinterpret_cast<char*>(&cmd_msg_)) + sizeof(error_code_));
  1813. }
  1814. Execute_response_msg::~Execute_response_msg() {
  1815. // @@protoc_insertion_point(destructor:message.Execute_response_msg)
  1816. SharedDtor();
  1817. }
  1818. void Execute_response_msg::SharedDtor() {
  1819. error_description_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1820. if (this != internal_default_instance()) delete cmd_msg_;
  1821. }
  1822. void Execute_response_msg::SetCachedSize(int size) const {
  1823. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1824. _cached_size_ = size;
  1825. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1826. }
  1827. const ::google::protobuf::Descriptor* Execute_response_msg::descriptor() {
  1828. ::protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  1829. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1830. }
  1831. const Execute_response_msg& Execute_response_msg::default_instance() {
  1832. ::protobuf_hardware_5fmessage_2eproto::InitDefaultsExecute_response_msg();
  1833. return *internal_default_instance();
  1834. }
  1835. Execute_response_msg* Execute_response_msg::New(::google::protobuf::Arena* arena) const {
  1836. Execute_response_msg* n = new Execute_response_msg;
  1837. if (arena != NULL) {
  1838. arena->Own(n);
  1839. }
  1840. return n;
  1841. }
  1842. void Execute_response_msg::Clear() {
  1843. // @@protoc_insertion_point(message_clear_start:message.Execute_response_msg)
  1844. ::google::protobuf::uint32 cached_has_bits = 0;
  1845. // Prevent compiler warnings about cached_has_bits being unused
  1846. (void) cached_has_bits;
  1847. cached_has_bits = _has_bits_[0];
  1848. if (cached_has_bits & 3u) {
  1849. if (cached_has_bits & 0x00000001u) {
  1850. GOOGLE_DCHECK(!error_description_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  1851. (*error_description_.UnsafeRawStringPointer())->clear();
  1852. }
  1853. if (cached_has_bits & 0x00000002u) {
  1854. GOOGLE_DCHECK(cmd_msg_ != NULL);
  1855. cmd_msg_->Clear();
  1856. }
  1857. }
  1858. if (cached_has_bits & 12u) {
  1859. ::memset(&msg_type_, 0, static_cast<size_t>(
  1860. reinterpret_cast<char*>(&error_code_) -
  1861. reinterpret_cast<char*>(&msg_type_)) + sizeof(error_code_));
  1862. }
  1863. _has_bits_.Clear();
  1864. _internal_metadata_.Clear();
  1865. }
  1866. bool Execute_response_msg::MergePartialFromCodedStream(
  1867. ::google::protobuf::io::CodedInputStream* input) {
  1868. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1869. ::google::protobuf::uint32 tag;
  1870. // @@protoc_insertion_point(parse_start:message.Execute_response_msg)
  1871. for (;;) {
  1872. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1873. tag = p.first;
  1874. if (!p.second) goto handle_unusual;
  1875. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1876. // required .message.Message_type msg_type = 1;
  1877. case 1: {
  1878. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1879. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1880. int value;
  1881. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1882. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1883. input, &value)));
  1884. if (::message::Message_type_IsValid(value)) {
  1885. set_msg_type(static_cast< ::message::Message_type >(value));
  1886. } else {
  1887. mutable_unknown_fields()->AddVarint(
  1888. 1, static_cast< ::google::protobuf::uint64>(value));
  1889. }
  1890. } else {
  1891. goto handle_unusual;
  1892. }
  1893. break;
  1894. }
  1895. // required .message.Command_message cmd_msg = 2;
  1896. case 2: {
  1897. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1898. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1899. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1900. input, mutable_cmd_msg()));
  1901. } else {
  1902. goto handle_unusual;
  1903. }
  1904. break;
  1905. }
  1906. // required int32 error_code = 3;
  1907. case 3: {
  1908. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1909. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  1910. set_has_error_code();
  1911. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1912. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1913. input, &error_code_)));
  1914. } else {
  1915. goto handle_unusual;
  1916. }
  1917. break;
  1918. }
  1919. // optional string error_description = 4;
  1920. case 4: {
  1921. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1922. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1923. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1924. input, this->mutable_error_description()));
  1925. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1926. this->error_description().data(), static_cast<int>(this->error_description().length()),
  1927. ::google::protobuf::internal::WireFormat::PARSE,
  1928. "message.Execute_response_msg.error_description");
  1929. } else {
  1930. goto handle_unusual;
  1931. }
  1932. break;
  1933. }
  1934. default: {
  1935. handle_unusual:
  1936. if (tag == 0) {
  1937. goto success;
  1938. }
  1939. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1940. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1941. break;
  1942. }
  1943. }
  1944. }
  1945. success:
  1946. // @@protoc_insertion_point(parse_success:message.Execute_response_msg)
  1947. return true;
  1948. failure:
  1949. // @@protoc_insertion_point(parse_failure:message.Execute_response_msg)
  1950. return false;
  1951. #undef DO_
  1952. }
  1953. void Execute_response_msg::SerializeWithCachedSizes(
  1954. ::google::protobuf::io::CodedOutputStream* output) const {
  1955. // @@protoc_insertion_point(serialize_start:message.Execute_response_msg)
  1956. ::google::protobuf::uint32 cached_has_bits = 0;
  1957. (void) cached_has_bits;
  1958. cached_has_bits = _has_bits_[0];
  1959. // required .message.Message_type msg_type = 1;
  1960. if (cached_has_bits & 0x00000004u) {
  1961. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1962. 1, this->msg_type(), output);
  1963. }
  1964. // required .message.Command_message cmd_msg = 2;
  1965. if (cached_has_bits & 0x00000002u) {
  1966. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1967. 2, *this->cmd_msg_, output);
  1968. }
  1969. // required int32 error_code = 3;
  1970. if (cached_has_bits & 0x00000008u) {
  1971. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->error_code(), output);
  1972. }
  1973. // optional string error_description = 4;
  1974. if (cached_has_bits & 0x00000001u) {
  1975. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1976. this->error_description().data(), static_cast<int>(this->error_description().length()),
  1977. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1978. "message.Execute_response_msg.error_description");
  1979. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1980. 4, this->error_description(), output);
  1981. }
  1982. if (_internal_metadata_.have_unknown_fields()) {
  1983. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1984. _internal_metadata_.unknown_fields(), output);
  1985. }
  1986. // @@protoc_insertion_point(serialize_end:message.Execute_response_msg)
  1987. }
  1988. ::google::protobuf::uint8* Execute_response_msg::InternalSerializeWithCachedSizesToArray(
  1989. bool deterministic, ::google::protobuf::uint8* target) const {
  1990. (void)deterministic; // Unused
  1991. // @@protoc_insertion_point(serialize_to_array_start:message.Execute_response_msg)
  1992. ::google::protobuf::uint32 cached_has_bits = 0;
  1993. (void) cached_has_bits;
  1994. cached_has_bits = _has_bits_[0];
  1995. // required .message.Message_type msg_type = 1;
  1996. if (cached_has_bits & 0x00000004u) {
  1997. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1998. 1, this->msg_type(), target);
  1999. }
  2000. // required .message.Command_message cmd_msg = 2;
  2001. if (cached_has_bits & 0x00000002u) {
  2002. target = ::google::protobuf::internal::WireFormatLite::
  2003. InternalWriteMessageToArray(
  2004. 2, *this->cmd_msg_, deterministic, target);
  2005. }
  2006. // required int32 error_code = 3;
  2007. if (cached_has_bits & 0x00000008u) {
  2008. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->error_code(), target);
  2009. }
  2010. // optional string error_description = 4;
  2011. if (cached_has_bits & 0x00000001u) {
  2012. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  2013. this->error_description().data(), static_cast<int>(this->error_description().length()),
  2014. ::google::protobuf::internal::WireFormat::SERIALIZE,
  2015. "message.Execute_response_msg.error_description");
  2016. target =
  2017. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2018. 4, this->error_description(), target);
  2019. }
  2020. if (_internal_metadata_.have_unknown_fields()) {
  2021. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2022. _internal_metadata_.unknown_fields(), target);
  2023. }
  2024. // @@protoc_insertion_point(serialize_to_array_end:message.Execute_response_msg)
  2025. return target;
  2026. }
  2027. size_t Execute_response_msg::RequiredFieldsByteSizeFallback() const {
  2028. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Execute_response_msg)
  2029. size_t total_size = 0;
  2030. if (has_cmd_msg()) {
  2031. // required .message.Command_message cmd_msg = 2;
  2032. total_size += 1 +
  2033. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2034. *this->cmd_msg_);
  2035. }
  2036. if (has_msg_type()) {
  2037. // required .message.Message_type msg_type = 1;
  2038. total_size += 1 +
  2039. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  2040. }
  2041. if (has_error_code()) {
  2042. // required int32 error_code = 3;
  2043. total_size += 1 +
  2044. ::google::protobuf::internal::WireFormatLite::Int32Size(
  2045. this->error_code());
  2046. }
  2047. return total_size;
  2048. }
  2049. size_t Execute_response_msg::ByteSizeLong() const {
  2050. // @@protoc_insertion_point(message_byte_size_start:message.Execute_response_msg)
  2051. size_t total_size = 0;
  2052. if (_internal_metadata_.have_unknown_fields()) {
  2053. total_size +=
  2054. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2055. _internal_metadata_.unknown_fields());
  2056. }
  2057. if (((_has_bits_[0] & 0x0000000e) ^ 0x0000000e) == 0) { // All required fields are present.
  2058. // required .message.Command_message cmd_msg = 2;
  2059. total_size += 1 +
  2060. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2061. *this->cmd_msg_);
  2062. // required .message.Message_type msg_type = 1;
  2063. total_size += 1 +
  2064. ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type());
  2065. // required int32 error_code = 3;
  2066. total_size += 1 +
  2067. ::google::protobuf::internal::WireFormatLite::Int32Size(
  2068. this->error_code());
  2069. } else {
  2070. total_size += RequiredFieldsByteSizeFallback();
  2071. }
  2072. // optional string error_description = 4;
  2073. if (has_error_description()) {
  2074. total_size += 1 +
  2075. ::google::protobuf::internal::WireFormatLite::StringSize(
  2076. this->error_description());
  2077. }
  2078. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2079. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2080. _cached_size_ = cached_size;
  2081. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2082. return total_size;
  2083. }
  2084. void Execute_response_msg::MergeFrom(const ::google::protobuf::Message& from) {
  2085. // @@protoc_insertion_point(generalized_merge_from_start:message.Execute_response_msg)
  2086. GOOGLE_DCHECK_NE(&from, this);
  2087. const Execute_response_msg* source =
  2088. ::google::protobuf::internal::DynamicCastToGenerated<const Execute_response_msg>(
  2089. &from);
  2090. if (source == NULL) {
  2091. // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Execute_response_msg)
  2092. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2093. } else {
  2094. // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Execute_response_msg)
  2095. MergeFrom(*source);
  2096. }
  2097. }
  2098. void Execute_response_msg::MergeFrom(const Execute_response_msg& from) {
  2099. // @@protoc_insertion_point(class_specific_merge_from_start:message.Execute_response_msg)
  2100. GOOGLE_DCHECK_NE(&from, this);
  2101. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2102. ::google::protobuf::uint32 cached_has_bits = 0;
  2103. (void) cached_has_bits;
  2104. cached_has_bits = from._has_bits_[0];
  2105. if (cached_has_bits & 15u) {
  2106. if (cached_has_bits & 0x00000001u) {
  2107. set_has_error_description();
  2108. error_description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_description_);
  2109. }
  2110. if (cached_has_bits & 0x00000002u) {
  2111. mutable_cmd_msg()->::message::Command_message::MergeFrom(from.cmd_msg());
  2112. }
  2113. if (cached_has_bits & 0x00000004u) {
  2114. msg_type_ = from.msg_type_;
  2115. }
  2116. if (cached_has_bits & 0x00000008u) {
  2117. error_code_ = from.error_code_;
  2118. }
  2119. _has_bits_[0] |= cached_has_bits;
  2120. }
  2121. }
  2122. void Execute_response_msg::CopyFrom(const ::google::protobuf::Message& from) {
  2123. // @@protoc_insertion_point(generalized_copy_from_start:message.Execute_response_msg)
  2124. if (&from == this) return;
  2125. Clear();
  2126. MergeFrom(from);
  2127. }
  2128. void Execute_response_msg::CopyFrom(const Execute_response_msg& from) {
  2129. // @@protoc_insertion_point(class_specific_copy_from_start:message.Execute_response_msg)
  2130. if (&from == this) return;
  2131. Clear();
  2132. MergeFrom(from);
  2133. }
  2134. bool Execute_response_msg::IsInitialized() const {
  2135. if ((_has_bits_[0] & 0x0000000e) != 0x0000000e) return false;
  2136. if (has_cmd_msg()) {
  2137. if (!this->cmd_msg_->IsInitialized()) return false;
  2138. }
  2139. return true;
  2140. }
  2141. void Execute_response_msg::Swap(Execute_response_msg* other) {
  2142. if (other == this) return;
  2143. InternalSwap(other);
  2144. }
  2145. void Execute_response_msg::InternalSwap(Execute_response_msg* other) {
  2146. using std::swap;
  2147. error_description_.Swap(&other->error_description_);
  2148. swap(cmd_msg_, other->cmd_msg_);
  2149. swap(msg_type_, other->msg_type_);
  2150. swap(error_code_, other->error_code_);
  2151. swap(_has_bits_[0], other->_has_bits_[0]);
  2152. _internal_metadata_.Swap(&other->_internal_metadata_);
  2153. swap(_cached_size_, other->_cached_size_);
  2154. }
  2155. ::google::protobuf::Metadata Execute_response_msg::GetMetadata() const {
  2156. protobuf_hardware_5fmessage_2eproto::protobuf_AssignDescriptorsOnce();
  2157. return ::protobuf_hardware_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages];
  2158. }
  2159. // @@protoc_insertion_point(namespace_scope)
  2160. } // namespace message
  2161. // @@protoc_insertion_point(global_scope)