velodyne_config.pb.cc 115 KB

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