Gazebo Msgs

API Reference

9.5.1
battery_state.pb.h
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: gz/msgs/battery_state.proto
3 
4 #ifndef PROTOBUF_INCLUDED_gz_2fmsgs_2fbattery_5fstate_2eproto
5 #define PROTOBUF_INCLUDED_gz_2fmsgs_2fbattery_5fstate_2eproto
6 
7 #include <string>
8 
9 #include <google/protobuf/stubs/common.h>
10 
11 #if GOOGLE_PROTOBUF_VERSION < 3006001
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
14 #error your headers.
15 #endif
16 #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
20 #endif
21 
22 #include <google/protobuf/io/coded_stream.h>
23 #include <google/protobuf/arena.h>
24 #include <google/protobuf/arenastring.h>
25 #include <google/protobuf/generated_message_table_driven.h>
26 #include <google/protobuf/generated_message_util.h>
27 #include <google/protobuf/inlined_string_field.h>
28 #include <google/protobuf/metadata.h>
29 #include <google/protobuf/message.h>
30 #include <google/protobuf/repeated_field.h> // IWYU pragma: export
31 #include <google/protobuf/extension_set.h> // IWYU pragma: export
32 #include <google/protobuf/generated_enum_reflection.h>
33 #include <google/protobuf/unknown_field_set.h>
34 #include "gz/msgs/header.pb.h"
35 // @@protoc_insertion_point(includes)
36 #define PROTOBUF_INTERNAL_EXPORT_protobuf_gz_2fmsgs_2fbattery_5fstate_2eproto GZ_MSGS_VISIBLE
37 
39 // Internal implementation detail -- do not use these members.
40 struct GZ_MSGS_VISIBLE TableStruct {
41  static const ::google::protobuf::internal::ParseTableField entries[];
42  static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
43  static const ::google::protobuf::internal::ParseTable schema[1];
44  static const ::google::protobuf::internal::FieldMetadata field_metadata[];
45  static const ::google::protobuf::internal::SerializationTable serialization_table[];
46  static const ::google::protobuf::uint32 offsets[];
47 };
48 void GZ_MSGS_VISIBLE AddDescriptors();
49 } // namespace protobuf_gz_2fmsgs_2fbattery_5fstate_2eproto
50 namespace gz {
51 namespace msgs {
52 class BatteryState;
53 class BatteryStateDefaultTypeInternal;
54 GZ_MSGS_VISIBLE extern BatteryStateDefaultTypeInternal _BatteryState_default_instance_;
55 } // namespace msgs
56 } // namespace gz
57 namespace google {
58 namespace protobuf {
59 template<> GZ_MSGS_VISIBLE ::gz::msgs::BatteryState* Arena::CreateMaybeMessage<::gz::msgs::BatteryState>(Arena*);
60 } // namespace protobuf
61 } // namespace google
62 namespace gz {
63 namespace msgs {
64 
73 };
74 GZ_MSGS_VISIBLE bool BatteryState_PowerSupplyStatus_IsValid(int value);
78 
79 GZ_MSGS_VISIBLE const ::google::protobuf::EnumDescriptor* BatteryState_PowerSupplyStatus_descriptor();
81  return ::google::protobuf::internal::NameOfEnum(
83 }
85  const ::std::string& name, BatteryState_PowerSupplyStatus* value) {
86  return ::google::protobuf::internal::ParseNamedEnum<BatteryState_PowerSupplyStatus>(
88 }
89 // ===================================================================
90 
91 class GZ_MSGS_VISIBLE BatteryState : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gz.msgs.BatteryState) */ {
92  public:
93  BatteryState();
94  virtual ~BatteryState();
95 
96  BatteryState(const BatteryState& from);
97 
98  inline BatteryState& operator=(const BatteryState& from) {
99  CopyFrom(from);
100  return *this;
101  }
102  #if LANG_CXX11
103  BatteryState(BatteryState&& from) noexcept
104  : BatteryState() {
105  *this = ::std::move(from);
106  }
107 
108  inline BatteryState& operator=(BatteryState&& from) noexcept {
109  if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
110  if (this != &from) InternalSwap(&from);
111  } else {
112  CopyFrom(from);
113  }
114  return *this;
115  }
116  #endif
117  static const ::google::protobuf::Descriptor* descriptor();
118  static const BatteryState& default_instance();
119 
120  static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
121  static inline const BatteryState* internal_default_instance() {
122  return reinterpret_cast<const BatteryState*>(
124  }
125  static constexpr int kIndexInFileMessages =
126  0;
127 
128  void Swap(BatteryState* other);
129  friend void swap(BatteryState& a, BatteryState& b) {
130  a.Swap(&b);
131  }
132 
133  // implements Message ----------------------------------------------
134 
135  inline BatteryState* New() const final {
136  return CreateMaybeMessage<BatteryState>(NULL);
137  }
138 
139  BatteryState* New(::google::protobuf::Arena* arena) const final {
140  return CreateMaybeMessage<BatteryState>(arena);
141  }
142  void CopyFrom(const ::google::protobuf::Message& from) final;
143  void MergeFrom(const ::google::protobuf::Message& from) final;
144  void CopyFrom(const BatteryState& from);
145  void MergeFrom(const BatteryState& from);
146  void Clear() final;
147  bool IsInitialized() const final;
148 
149  size_t ByteSizeLong() const final;
150  bool MergePartialFromCodedStream(
151  ::google::protobuf::io::CodedInputStream* input) final;
152  void SerializeWithCachedSizes(
153  ::google::protobuf::io::CodedOutputStream* output) const final;
154  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
155  bool deterministic, ::google::protobuf::uint8* target) const final;
156  int GetCachedSize() const final { return _cached_size_.Get(); }
157 
158  private:
159  void SharedCtor();
160  void SharedDtor();
161  void SetCachedSize(int size) const final;
162  void InternalSwap(BatteryState* other);
163  private:
164  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
165  return NULL;
166  }
167  inline void* MaybeArenaPtr() const {
168  return NULL;
169  }
170  public:
171 
172  ::google::protobuf::Metadata GetMetadata() const final;
173 
174  // nested types ----------------------------------------------------
175 
177  static const PowerSupplyStatus UNKNOWN =
179  static const PowerSupplyStatus CHARGING =
181  static const PowerSupplyStatus DISCHARGING =
183  static const PowerSupplyStatus NOT_CHARGING =
185  static const PowerSupplyStatus FULL =
187  static inline bool PowerSupplyStatus_IsValid(int value) {
189  }
190  static const PowerSupplyStatus PowerSupplyStatus_MIN =
192  static const PowerSupplyStatus PowerSupplyStatus_MAX =
194  static const int PowerSupplyStatus_ARRAYSIZE =
196  static inline const ::google::protobuf::EnumDescriptor*
199  }
200  static inline const ::std::string& PowerSupplyStatus_Name(PowerSupplyStatus value) {
202  }
203  static inline bool PowerSupplyStatus_Parse(const ::std::string& name,
204  PowerSupplyStatus* value) {
205  return BatteryState_PowerSupplyStatus_Parse(name, value);
206  }
207 
208  // accessors -------------------------------------------------------
209 
210  // .gz.msgs.Header header = 1;
211  bool has_header() const;
212  void clear_header();
213  static const int kHeaderFieldNumber = 1;
214  private:
215  const ::gz::msgs::Header& _internal_header() const;
216  public:
217  const ::gz::msgs::Header& header() const;
218  ::gz::msgs::Header* release_header();
219  ::gz::msgs::Header* mutable_header();
220  void set_allocated_header(::gz::msgs::Header* header);
221 
222  // double voltage = 2;
223  void clear_voltage();
224  static const int kVoltageFieldNumber = 2;
225  double voltage() const;
226  void set_voltage(double value);
227 
228  // double current = 3;
229  void clear_current();
230  static const int kCurrentFieldNumber = 3;
231  double current() const;
232  void set_current(double value);
233 
234  // double charge = 4;
235  void clear_charge();
236  static const int kChargeFieldNumber = 4;
237  double charge() const;
238  void set_charge(double value);
239 
240  // double capacity = 5;
241  void clear_capacity();
242  static const int kCapacityFieldNumber = 5;
243  double capacity() const;
244  void set_capacity(double value);
245 
246  // double percentage = 6;
247  void clear_percentage();
248  static const int kPercentageFieldNumber = 6;
249  double percentage() const;
250  void set_percentage(double value);
251 
252  // .gz.msgs.BatteryState.PowerSupplyStatus power_supply_status = 7;
253  void clear_power_supply_status();
254  static const int kPowerSupplyStatusFieldNumber = 7;
255  ::gz::msgs::BatteryState_PowerSupplyStatus power_supply_status() const;
256  void set_power_supply_status(::gz::msgs::BatteryState_PowerSupplyStatus value);
257 
258  // @@protoc_insertion_point(class_scope:gz.msgs.BatteryState)
259  private:
260 
261  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
262  ::gz::msgs::Header* header_;
263  double voltage_;
264  double current_;
265  double charge_;
266  double capacity_;
267  double percentage_;
268  int power_supply_status_;
269  mutable ::google::protobuf::internal::CachedSize _cached_size_;
270  friend struct ::protobuf_gz_2fmsgs_2fbattery_5fstate_2eproto::TableStruct;
271 };
272 // ===================================================================
273 
274 
275 // ===================================================================
276 
277 #ifdef __GNUC__
278  #pragma GCC diagnostic push
279  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
280 #endif // __GNUC__
281 // BatteryState
282 
283 // .gz.msgs.Header header = 1;
284 inline bool BatteryState::has_header() const {
285  return this != internal_default_instance() && header_ != NULL;
286 }
287 inline const ::gz::msgs::Header& BatteryState::_internal_header() const {
288  return *header_;
289 }
290 inline const ::gz::msgs::Header& BatteryState::header() const {
291  const ::gz::msgs::Header* p = header_;
292  // @@protoc_insertion_point(field_get:gz.msgs.BatteryState.header)
293  return p != NULL ? *p : *reinterpret_cast<const ::gz::msgs::Header*>(
295 }
296 inline ::gz::msgs::Header* BatteryState::release_header() {
297  // @@protoc_insertion_point(field_release:gz.msgs.BatteryState.header)
298 
299  ::gz::msgs::Header* temp = header_;
300  header_ = NULL;
301  return temp;
302 }
303 inline ::gz::msgs::Header* BatteryState::mutable_header() {
304 
305  if (header_ == NULL) {
306  auto* p = CreateMaybeMessage<::gz::msgs::Header>(GetArenaNoVirtual());
307  header_ = p;
308  }
309  // @@protoc_insertion_point(field_mutable:gz.msgs.BatteryState.header)
310  return header_;
311 }
313  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
314  if (message_arena == NULL) {
315  delete reinterpret_cast< ::google::protobuf::MessageLite*>(header_);
316  }
317  if (header) {
318  ::google::protobuf::Arena* submessage_arena = NULL;
319  if (message_arena != submessage_arena) {
320  header = ::google::protobuf::internal::GetOwnedMessage(
321  message_arena, header, submessage_arena);
322  }
323 
324  } else {
325 
326  }
327  header_ = header;
328  // @@protoc_insertion_point(field_set_allocated:gz.msgs.BatteryState.header)
329 }
330 
331 // double voltage = 2;
333  voltage_ = 0;
334 }
335 inline double BatteryState::voltage() const {
336  // @@protoc_insertion_point(field_get:gz.msgs.BatteryState.voltage)
337  return voltage_;
338 }
339 inline void BatteryState::set_voltage(double value) {
340 
341  voltage_ = value;
342  // @@protoc_insertion_point(field_set:gz.msgs.BatteryState.voltage)
343 }
344 
345 // double current = 3;
347  current_ = 0;
348 }
349 inline double BatteryState::current() const {
350  // @@protoc_insertion_point(field_get:gz.msgs.BatteryState.current)
351  return current_;
352 }
353 inline void BatteryState::set_current(double value) {
354 
355  current_ = value;
356  // @@protoc_insertion_point(field_set:gz.msgs.BatteryState.current)
357 }
358 
359 // double charge = 4;
361  charge_ = 0;
362 }
363 inline double BatteryState::charge() const {
364  // @@protoc_insertion_point(field_get:gz.msgs.BatteryState.charge)
365  return charge_;
366 }
367 inline void BatteryState::set_charge(double value) {
368 
369  charge_ = value;
370  // @@protoc_insertion_point(field_set:gz.msgs.BatteryState.charge)
371 }
372 
373 // double capacity = 5;
375  capacity_ = 0;
376 }
377 inline double BatteryState::capacity() const {
378  // @@protoc_insertion_point(field_get:gz.msgs.BatteryState.capacity)
379  return capacity_;
380 }
381 inline void BatteryState::set_capacity(double value) {
382 
383  capacity_ = value;
384  // @@protoc_insertion_point(field_set:gz.msgs.BatteryState.capacity)
385 }
386 
387 // double percentage = 6;
389  percentage_ = 0;
390 }
391 inline double BatteryState::percentage() const {
392  // @@protoc_insertion_point(field_get:gz.msgs.BatteryState.percentage)
393  return percentage_;
394 }
395 inline void BatteryState::set_percentage(double value) {
396 
397  percentage_ = value;
398  // @@protoc_insertion_point(field_set:gz.msgs.BatteryState.percentage)
399 }
400 
401 // .gz.msgs.BatteryState.PowerSupplyStatus power_supply_status = 7;
403  power_supply_status_ = 0;
404 }
406  // @@protoc_insertion_point(field_get:gz.msgs.BatteryState.power_supply_status)
407  return static_cast< ::gz::msgs::BatteryState_PowerSupplyStatus >(power_supply_status_);
408 }
410 
411  power_supply_status_ = value;
412  // @@protoc_insertion_point(field_set:gz.msgs.BatteryState.power_supply_status)
413 }
414 
415 #ifdef __GNUC__
416  #pragma GCC diagnostic pop
417 #endif // __GNUC__
418 
419 // @@protoc_insertion_point(namespace_scope)
420 
421 } // namespace msgs
422 } // namespace gz
423 
424 namespace google {
425 namespace protobuf {
426 
427 template <> struct is_proto_enum< ::gz::msgs::BatteryState_PowerSupplyStatus> : ::std::true_type {};
428 template <>
429 inline const EnumDescriptor* GetEnumDescriptor< ::gz::msgs::BatteryState_PowerSupplyStatus>() {
431 }
432 
433 } // namespace protobuf
434 } // namespace google
435 
436 // @@protoc_insertion_point(global_scope)
437 
438 #endif // PROTOBUF_INCLUDED_gz_2fmsgs_2fbattery_5fstate_2eproto