velodyne_config.pb.cc 95 KB

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