velodyne_config.pb.cc 116 KB

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