Ignition Msgs

API Reference

8.2.0
battery_state.pb.h
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: ignition/msgs/battery_state.proto
3 
4 #ifndef PROTOBUF_ignition_2fmsgs_2fbattery_5fstate_2eproto__INCLUDED
5 #define PROTOBUF_ignition_2fmsgs_2fbattery_5fstate_2eproto__INCLUDED
6 
7 #include <string>
8 
9 #include <google/protobuf/stubs/common.h>
10 
11 #if GOOGLE_PROTOBUF_VERSION < 3000000
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 3000000 < 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/arena.h>
23 #include <google/protobuf/arenastring.h>
24 #include <google/protobuf/generated_message_util.h>
25 #include <google/protobuf/metadata.h>
26 #include <google/protobuf/message.h>
27 #include <google/protobuf/repeated_field.h>
28 #include <google/protobuf/extension_set.h>
29 #include <google/protobuf/generated_enum_reflection.h>
30 #include <google/protobuf/unknown_field_set.h>
32 #ifndef _MSC_VER
33 #pragma GCC system_header
34 #else
35 #pragma warning(push)
36 #pragma warning(disable: 4244 4267 4100 4244 4512 4127 4068 4275 4251)
37 #endif
38 #ifdef __linux__
39 #include <sys/sysmacros.h>
40 #endif
41 #include <memory>
42 #include <ignition/msgs/Export.hh>
43 // @@protoc_insertion_point(includes)
44 
45 namespace ignition {
46 namespace msgs {
47 
48 // Internal implementation detail -- do not call these.
52 
53 class BatteryState;
54 
63 };
64 IGNITION_MSGS_VISIBLE bool BatteryState_PowerSupplyStatus_IsValid(int value);
67 const int BatteryState_PowerSupplyStatus_PowerSupplyStatus_ARRAYSIZE = BatteryState_PowerSupplyStatus_PowerSupplyStatus_MAX + 1;
68 
69 IGNITION_MSGS_VISIBLE const ::google::protobuf::EnumDescriptor* BatteryState_PowerSupplyStatus_descriptor();
71  return ::google::protobuf::internal::NameOfEnum(
73 }
75  const ::std::string& name, BatteryState_PowerSupplyStatus* value) {
76  return ::google::protobuf::internal::ParseNamedEnum<BatteryState_PowerSupplyStatus>(
78 }
79 // ===================================================================
80 
81 class IGNITION_MSGS_VISIBLE BatteryState : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:ignition.msgs.BatteryState) */ {
82  public:
83  BatteryState();
84  virtual ~BatteryState();
85 
86  BatteryState(const BatteryState& from);
87 
88  inline BatteryState& operator=(const BatteryState& from) {
89  CopyFrom(from);
90  return *this;
91  }
92 
93  static const ::google::protobuf::Descriptor* descriptor();
94  static const BatteryState& default_instance();
95 
96  void Swap(BatteryState* other);
97 
98  // implements Message ----------------------------------------------
99 
100  inline BatteryState* New() const { return New(NULL); }
101 
102  BatteryState* New(::google::protobuf::Arena* arena) const;
103  void CopyFrom(const ::google::protobuf::Message& from);
104  void MergeFrom(const ::google::protobuf::Message& from);
105  void CopyFrom(const BatteryState& from);
106  void MergeFrom(const BatteryState& from);
107  void Clear();
108  bool IsInitialized() const;
109 
110  int ByteSize() const;
111  bool MergePartialFromCodedStream(
112  ::google::protobuf::io::CodedInputStream* input);
113  void SerializeWithCachedSizes(
114  ::google::protobuf::io::CodedOutputStream* output) const;
115  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
116  bool deterministic, ::google::protobuf::uint8* output) const;
117  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
118  return InternalSerializeWithCachedSizesToArray(false, output);
119  }
120  int GetCachedSize() const { return _cached_size_; }
121  private:
122  void SharedCtor();
123  void SharedDtor();
124  void SetCachedSize(int size) const;
125  void InternalSwap(BatteryState* other);
126  private:
127  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
128  return _internal_metadata_.arena();
129  }
130  inline void* MaybeArenaPtr() const {
131  return _internal_metadata_.raw_arena_ptr();
132  }
133  public:
134 
135  ::google::protobuf::Metadata GetMetadata() const;
136 
137  // nested types ----------------------------------------------------
138 
140  static const PowerSupplyStatus UNKNOWN =
142  static const PowerSupplyStatus CHARGING =
144  static const PowerSupplyStatus DISCHARGING =
146  static const PowerSupplyStatus NOT_CHARGING =
148  static const PowerSupplyStatus FULL =
150  static inline bool PowerSupplyStatus_IsValid(int value) {
152  }
153  static const PowerSupplyStatus PowerSupplyStatus_MIN =
155  static const PowerSupplyStatus PowerSupplyStatus_MAX =
157  static const int PowerSupplyStatus_ARRAYSIZE =
159  static inline const ::google::protobuf::EnumDescriptor*
162  }
163  static inline const ::std::string& PowerSupplyStatus_Name(PowerSupplyStatus value) {
165  }
166  static inline bool PowerSupplyStatus_Parse(const ::std::string& name,
167  PowerSupplyStatus* value) {
168  return BatteryState_PowerSupplyStatus_Parse(name, value);
169  }
170 
171  // accessors -------------------------------------------------------
172 
173  // optional .ignition.msgs.Header header = 1;
174  bool has_header() const;
175  void clear_header();
176  static const int kHeaderFieldNumber = 1;
177  const ::ignition::msgs::Header& header() const;
178  ::ignition::msgs::Header* mutable_header();
179  ::ignition::msgs::Header* release_header();
180  void set_allocated_header(::ignition::msgs::Header* header);
181 
182  // optional double voltage = 2;
183  void clear_voltage();
184  static const int kVoltageFieldNumber = 2;
185  double voltage() const;
186  void set_voltage(double value);
187 
188  // optional double current = 3;
189  void clear_current();
190  static const int kCurrentFieldNumber = 3;
191  double current() const;
192  void set_current(double value);
193 
194  // optional double charge = 4;
195  void clear_charge();
196  static const int kChargeFieldNumber = 4;
197  double charge() const;
198  void set_charge(double value);
199 
200  // optional double capacity = 5;
201  void clear_capacity();
202  static const int kCapacityFieldNumber = 5;
203  double capacity() const;
204  void set_capacity(double value);
205 
206  // optional double percentage = 6;
207  void clear_percentage();
208  static const int kPercentageFieldNumber = 6;
209  double percentage() const;
210  void set_percentage(double value);
211 
212  // optional .ignition.msgs.BatteryState.PowerSupplyStatus power_supply_status = 7;
213  void clear_power_supply_status();
214  static const int kPowerSupplyStatusFieldNumber = 7;
215  ::ignition::msgs::BatteryState_PowerSupplyStatus power_supply_status() const;
216  void set_power_supply_status(::ignition::msgs::BatteryState_PowerSupplyStatus value);
217 
218  // @@protoc_insertion_point(class_scope:ignition.msgs.BatteryState)
219  private:
220 
221  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
222  bool _is_default_instance_;
223  ::ignition::msgs::Header* header_;
224  double voltage_;
225  double current_;
226  double charge_;
227  double capacity_;
228  double percentage_;
229  int power_supply_status_;
230  mutable int _cached_size_;
231  friend void IGNITION_MSGS_VISIBLE protobuf_AddDesc_ignition_2fmsgs_2fbattery_5fstate_2eproto();
234 
235  void InitAsDefaultInstance();
236  static BatteryState* default_instance_;
237 };
238 // ===================================================================
239 
240 
241 // ===================================================================
242 
243 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
244 // BatteryState
245 
246 // optional .ignition.msgs.Header header = 1;
247 inline bool BatteryState::has_header() const {
248  return !_is_default_instance_ && header_ != NULL;
249 }
251  if (GetArenaNoVirtual() == NULL && header_ != NULL) delete header_;
252  header_ = NULL;
253 }
254 inline const ::ignition::msgs::Header& BatteryState::header() const {
255  // @@protoc_insertion_point(field_get:ignition.msgs.BatteryState.header)
256  return header_ != NULL ? *header_ : *default_instance_->header_;
257 }
258 inline ::ignition::msgs::Header* BatteryState::mutable_header() {
259 
260  if (header_ == NULL) {
261  header_ = new ::ignition::msgs::Header;
262  }
263  // @@protoc_insertion_point(field_mutable:ignition.msgs.BatteryState.header)
264  return header_;
265 }
266 inline ::ignition::msgs::Header* BatteryState::release_header() {
267  // @@protoc_insertion_point(field_release:ignition.msgs.BatteryState.header)
268 
269  ::ignition::msgs::Header* temp = header_;
270  header_ = NULL;
271  return temp;
272 }
274  delete header_;
275  header_ = header;
276  if (header) {
277 
278  } else {
279 
280  }
281  // @@protoc_insertion_point(field_set_allocated:ignition.msgs.BatteryState.header)
282 }
283 
284 // optional double voltage = 2;
286  voltage_ = 0;
287 }
288 inline double BatteryState::voltage() const {
289  // @@protoc_insertion_point(field_get:ignition.msgs.BatteryState.voltage)
290  return voltage_;
291 }
292 inline void BatteryState::set_voltage(double value) {
293 
294  voltage_ = value;
295  // @@protoc_insertion_point(field_set:ignition.msgs.BatteryState.voltage)
296 }
297 
298 // optional double current = 3;
300  current_ = 0;
301 }
302 inline double BatteryState::current() const {
303  // @@protoc_insertion_point(field_get:ignition.msgs.BatteryState.current)
304  return current_;
305 }
306 inline void BatteryState::set_current(double value) {
307 
308  current_ = value;
309  // @@protoc_insertion_point(field_set:ignition.msgs.BatteryState.current)
310 }
311 
312 // optional double charge = 4;
314  charge_ = 0;
315 }
316 inline double BatteryState::charge() const {
317  // @@protoc_insertion_point(field_get:ignition.msgs.BatteryState.charge)
318  return charge_;
319 }
320 inline void BatteryState::set_charge(double value) {
321 
322  charge_ = value;
323  // @@protoc_insertion_point(field_set:ignition.msgs.BatteryState.charge)
324 }
325 
326 // optional double capacity = 5;
328  capacity_ = 0;
329 }
330 inline double BatteryState::capacity() const {
331  // @@protoc_insertion_point(field_get:ignition.msgs.BatteryState.capacity)
332  return capacity_;
333 }
334 inline void BatteryState::set_capacity(double value) {
335 
336  capacity_ = value;
337  // @@protoc_insertion_point(field_set:ignition.msgs.BatteryState.capacity)
338 }
339 
340 // optional double percentage = 6;
342  percentage_ = 0;
343 }
344 inline double BatteryState::percentage() const {
345  // @@protoc_insertion_point(field_get:ignition.msgs.BatteryState.percentage)
346  return percentage_;
347 }
348 inline void BatteryState::set_percentage(double value) {
349 
350  percentage_ = value;
351  // @@protoc_insertion_point(field_set:ignition.msgs.BatteryState.percentage)
352 }
353 
354 // optional .ignition.msgs.BatteryState.PowerSupplyStatus power_supply_status = 7;
356  power_supply_status_ = 0;
357 }
359  // @@protoc_insertion_point(field_get:ignition.msgs.BatteryState.power_supply_status)
360  return static_cast< ::ignition::msgs::BatteryState_PowerSupplyStatus >(power_supply_status_);
361 }
363 
364  power_supply_status_ = value;
365  // @@protoc_insertion_point(field_set:ignition.msgs.BatteryState.power_supply_status)
366 }
367 
368 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
369 
374 // @@protoc_insertion_point(namespace_scope)
375 
376 } // namespace msgs
377 } // namespace ignition
378 
379 #ifndef SWIG
380 namespace google {
381 namespace protobuf {
382 
383 template <> struct is_proto_enum< ::ignition::msgs::BatteryState_PowerSupplyStatus> : ::google::protobuf::internal::true_type {};
384 template <>
385 inline const EnumDescriptor* GetEnumDescriptor< ::ignition::msgs::BatteryState_PowerSupplyStatus>() {
387 }
388 
389 } // namespace protobuf
390 } // namespace google
391 #endif // SWIG
392 
393 #ifdef _MSC_VER
394 #pragma warning(pop)
395 #endif
396 // @@protoc_insertion_point(global_scope)
397 
398 #endif // PROTOBUF_ignition_2fmsgs_2fbattery_5fstate_2eproto__INCLUDED
BatteryState_PowerSupplyStatus PowerSupplyStatus
Definition: battery_state.pb.h:139
IGNITION_MSGS_VISIBLE bool BatteryState_PowerSupplyStatus_IsValid(int value)
Definition: battery_state.pb.h:81
void clear_charge()
Definition: battery_state.pb.h:313
void IGNITION_MSGS_VISIBLE protobuf_AddDesc_ignition_2fmsgs_2fbattery_5fstate_2eproto()
IGNITION_MSGS_VISIBLEconst ::google::protobuf::EnumDescriptor * BatteryState_PowerSupplyStatus_descriptor()
static const ::std::string & PowerSupplyStatus_Name(PowerSupplyStatus value)
Definition: battery_state.pb.h:163
double current() const
Definition: battery_state.pb.h:302
void clear_current()
Definition: battery_state.pb.h:299
std::unique_ptr< BatteryState > BatteryStateUniquePtr
Definition: battery_state.pb.h:370
static const ::google::protobuf::EnumDescriptor * PowerSupplyStatus_descriptor()
Definition: battery_state.pb.h:160
BatteryState & operator=(const BatteryState &from)
Definition: battery_state.pb.h:88
void set_percentage(double value)
Definition: battery_state.pb.h:348
const int BatteryState_PowerSupplyStatus_PowerSupplyStatus_ARRAYSIZE
Definition: battery_state.pb.h:67
bool has_header() const
Definition: battery_state.pb.h:247
static bool PowerSupplyStatus_Parse(const ::std::string &name, PowerSupplyStatus *value)
Definition: battery_state.pb.h:166
double charge() const
Definition: battery_state.pb.h:316
void clear_percentage()
Definition: battery_state.pb.h:341
Definition: header.pb.h:161
std::shared_ptr< BatteryState > BatteryStateSharedPtr
Definition: battery_state.pb.h:372
void protobuf_ShutdownFile_ignition_2fmsgs_2fbattery_5fstate_2eproto()
void clear_header()
Definition: battery_state.pb.h:250
int GetCachedSize() const
Definition: battery_state.pb.h:120
double percentage() const
Definition: battery_state.pb.h:344
void set_voltage(double value)
Definition: battery_state.pb.h:292
void set_power_supply_status(::ignition::msgs::BatteryState_PowerSupplyStatus value)
Definition: battery_state.pb.h:362
::ignition::msgs::Header * release_header()
Definition: battery_state.pb.h:266
double voltage() const
Definition: battery_state.pb.h:288
void protobuf_AssignDesc_ignition_2fmsgs_2fbattery_5fstate_2eproto()
double capacity() const
Definition: battery_state.pb.h:330
void set_capacity(double value)
Definition: battery_state.pb.h:334
const BatteryState_PowerSupplyStatus BatteryState_PowerSupplyStatus_PowerSupplyStatus_MIN
Definition: battery_state.pb.h:65
::google::protobuf::uint8 * SerializeWithCachedSizesToArray(::google::protobuf::uint8 *output) const
Definition: battery_state.pb.h:117
STL class.
void clear_voltage()
Definition: battery_state.pb.h:285
std::unique_ptr< const BatteryState > ConstBatteryStateUniquePtr
Definition: battery_state.pb.h:371
std::shared_ptr< const BatteryState > ConstBatteryStateSharedPtr
Definition: battery_state.pb.h:373
void set_charge(double value)
Definition: battery_state.pb.h:320
BatteryState * New() const
Definition: battery_state.pb.h:100
Definition: any.pb.h:839
static bool PowerSupplyStatus_IsValid(int value)
Definition: battery_state.pb.h:150
BatteryState_PowerSupplyStatus
Definition: battery_state.pb.h:55
void set_allocated_header(::ignition::msgs::Header *header)
Definition: battery_state.pb.h:273
const BatteryState_PowerSupplyStatus BatteryState_PowerSupplyStatus_PowerSupplyStatus_MAX
Definition: battery_state.pb.h:66
const ::ignition::msgs::Header & header() const
Definition: battery_state.pb.h:254
::ignition::msgs::Header * mutable_header()
Definition: battery_state.pb.h:258
bool BatteryState_PowerSupplyStatus_Parse(const ::std::string &name, BatteryState_PowerSupplyStatus *value)
Definition: battery_state.pb.h:74
void clear_capacity()
Definition: battery_state.pb.h:327
const ::std::string & BatteryState_PowerSupplyStatus_Name(BatteryState_PowerSupplyStatus value)
Definition: battery_state.pb.h:70
::ignition::msgs::BatteryState_PowerSupplyStatus power_supply_status() const
Definition: battery_state.pb.h:358
void clear_power_supply_status()
Definition: battery_state.pb.h:355
void set_current(double value)
Definition: battery_state.pb.h:306