velodyne_config.pb.cc 82 KB

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