hardware_message.pb.cc 79 KB

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