• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_CHREPOWERTEST_CHRE_POWER_TEST_H_
5 #define FLATBUFFERS_GENERATED_CHREPOWERTEST_CHRE_POWER_TEST_H_
6 
7 #include "flatbuffers/flatbuffers.h"
8 
9 namespace chre {
10 namespace power_test {
11 
12 struct TimerMessage;
13 struct TimerMessageBuilder;
14 struct TimerMessageT;
15 
16 struct WifiScanMessage;
17 struct WifiScanMessageBuilder;
18 struct WifiScanMessageT;
19 
20 struct GnssLocationMessage;
21 struct GnssLocationMessageBuilder;
22 struct GnssLocationMessageT;
23 
24 struct CellQueryMessage;
25 struct CellQueryMessageBuilder;
26 struct CellQueryMessageT;
27 
28 struct AudioRequestMessage;
29 struct AudioRequestMessageBuilder;
30 struct AudioRequestMessageT;
31 
32 struct SensorRequestMessage;
33 struct SensorRequestMessageBuilder;
34 struct SensorRequestMessageT;
35 
36 struct BreakItMessage;
37 struct BreakItMessageBuilder;
38 struct BreakItMessageT;
39 
40 struct NanoappResponseMessage;
41 struct NanoappResponseMessageBuilder;
42 struct NanoappResponseMessageT;
43 
44 struct GnssMeasurementMessage;
45 struct GnssMeasurementMessageBuilder;
46 struct GnssMeasurementMessageT;
47 
48 /// Indicates which of the following messages is being sent to / from the
49 /// nanoapp. Use uint as the base type to match the message type in
50 /// chreMessageFromHostData.
51 enum class MessageType : uint32_t {
52   UNSPECIFIED = 0,
53   /// Should be used with TimerMessage
54   TIMER_TEST = 1,
55   /// Should be used with WifiScanMessage
56   WIFI_SCAN_TEST = 2,
57   /// Should be used with GnssLocationMessage
58   GNSS_LOCATION_TEST = 3,
59   /// Should be used with CellQueryMessage
60   CELL_QUERY_TEST = 4,
61   /// Should be used with AudioRequestMessage
62   AUDIO_REQUEST_TEST = 5,
63   /// Should be used with SensorRequestMessage
64   SENSOR_REQUEST_TEST = 6,
65   /// Should be used with BreakItMessage
66   BREAK_IT_TEST = 7,
67   /// Should be used with NanoappResponseMessage
68   NANOAPP_RESPONSE = 8,
69   /// Should be used with GnssMeasurementMessage
70   GNSS_MEASUREMENT_TEST = 9,
71   MIN = UNSPECIFIED,
72   MAX = GNSS_MEASUREMENT_TEST
73 };
74 
EnumValuesMessageType()75 inline const MessageType (&EnumValuesMessageType())[10] {
76   static const MessageType values[] = {
77     MessageType::UNSPECIFIED,
78     MessageType::TIMER_TEST,
79     MessageType::WIFI_SCAN_TEST,
80     MessageType::GNSS_LOCATION_TEST,
81     MessageType::CELL_QUERY_TEST,
82     MessageType::AUDIO_REQUEST_TEST,
83     MessageType::SENSOR_REQUEST_TEST,
84     MessageType::BREAK_IT_TEST,
85     MessageType::NANOAPP_RESPONSE,
86     MessageType::GNSS_MEASUREMENT_TEST
87   };
88   return values;
89 }
90 
EnumNamesMessageType()91 inline const char * const *EnumNamesMessageType() {
92   static const char * const names[11] = {
93     "UNSPECIFIED",
94     "TIMER_TEST",
95     "WIFI_SCAN_TEST",
96     "GNSS_LOCATION_TEST",
97     "CELL_QUERY_TEST",
98     "AUDIO_REQUEST_TEST",
99     "SENSOR_REQUEST_TEST",
100     "BREAK_IT_TEST",
101     "NANOAPP_RESPONSE",
102     "GNSS_MEASUREMENT_TEST",
103     nullptr
104   };
105   return names;
106 }
107 
EnumNameMessageType(MessageType e)108 inline const char *EnumNameMessageType(MessageType e) {
109   if (flatbuffers::IsOutRange(e, MessageType::UNSPECIFIED, MessageType::GNSS_MEASUREMENT_TEST)) return "";
110   const size_t index = static_cast<size_t>(e);
111   return EnumNamesMessageType()[index];
112 }
113 
114 /// All the various WiFi scan types that can be interacted with inside the
115 /// nanoapp. The values used here map directly to values from the CHRE API.
116 enum class WifiScanType : uint8_t {
117   ACTIVE = 0,
118   ACTIVE_PLUS_PASSIVE_DFS = 1,
119   PASSIVE = 2,
120   NO_PREFERENCE = 3,
121   MIN = ACTIVE,
122   MAX = NO_PREFERENCE
123 };
124 
EnumValuesWifiScanType()125 inline const WifiScanType (&EnumValuesWifiScanType())[4] {
126   static const WifiScanType values[] = {
127     WifiScanType::ACTIVE,
128     WifiScanType::ACTIVE_PLUS_PASSIVE_DFS,
129     WifiScanType::PASSIVE,
130     WifiScanType::NO_PREFERENCE
131   };
132   return values;
133 }
134 
EnumNamesWifiScanType()135 inline const char * const *EnumNamesWifiScanType() {
136   static const char * const names[5] = {
137     "ACTIVE",
138     "ACTIVE_PLUS_PASSIVE_DFS",
139     "PASSIVE",
140     "NO_PREFERENCE",
141     nullptr
142   };
143   return names;
144 }
145 
EnumNameWifiScanType(WifiScanType e)146 inline const char *EnumNameWifiScanType(WifiScanType e) {
147   if (flatbuffers::IsOutRange(e, WifiScanType::ACTIVE, WifiScanType::NO_PREFERENCE)) return "";
148   const size_t index = static_cast<size_t>(e);
149   return EnumNamesWifiScanType()[index];
150 }
151 
152 /// All the various WiFi radio chain preferences that can be interacted with
153 /// inside the nanoapp. The values used here map directly to values from the
154 /// CHRE API.
155 enum class WifiRadioChain : uint8_t {
156   DEFAULT = 0,
157   LOW_LATENCY = 1,
158   LOW_POWER = 2,
159   HIGH_ACCURACY = 3,
160   MIN = DEFAULT,
161   MAX = HIGH_ACCURACY
162 };
163 
EnumValuesWifiRadioChain()164 inline const WifiRadioChain (&EnumValuesWifiRadioChain())[4] {
165   static const WifiRadioChain values[] = {
166     WifiRadioChain::DEFAULT,
167     WifiRadioChain::LOW_LATENCY,
168     WifiRadioChain::LOW_POWER,
169     WifiRadioChain::HIGH_ACCURACY
170   };
171   return values;
172 }
173 
EnumNamesWifiRadioChain()174 inline const char * const *EnumNamesWifiRadioChain() {
175   static const char * const names[5] = {
176     "DEFAULT",
177     "LOW_LATENCY",
178     "LOW_POWER",
179     "HIGH_ACCURACY",
180     nullptr
181   };
182   return names;
183 }
184 
EnumNameWifiRadioChain(WifiRadioChain e)185 inline const char *EnumNameWifiRadioChain(WifiRadioChain e) {
186   if (flatbuffers::IsOutRange(e, WifiRadioChain::DEFAULT, WifiRadioChain::HIGH_ACCURACY)) return "";
187   const size_t index = static_cast<size_t>(e);
188   return EnumNamesWifiRadioChain()[index];
189 }
190 
191 /// All the various WiFi channel sets that can be interacted with inside the
192 /// nanoapp. The values used here map directly to values from the CHRE API.
193 enum class WifiChannelSet : uint8_t {
194   NON_DFS = 0,
195   ALL = 1,
196   MIN = NON_DFS,
197   MAX = ALL
198 };
199 
EnumValuesWifiChannelSet()200 inline const WifiChannelSet (&EnumValuesWifiChannelSet())[2] {
201   static const WifiChannelSet values[] = {
202     WifiChannelSet::NON_DFS,
203     WifiChannelSet::ALL
204   };
205   return values;
206 }
207 
EnumNamesWifiChannelSet()208 inline const char * const *EnumNamesWifiChannelSet() {
209   static const char * const names[3] = {
210     "NON_DFS",
211     "ALL",
212     nullptr
213   };
214   return names;
215 }
216 
EnumNameWifiChannelSet(WifiChannelSet e)217 inline const char *EnumNameWifiChannelSet(WifiChannelSet e) {
218   if (flatbuffers::IsOutRange(e, WifiChannelSet::NON_DFS, WifiChannelSet::ALL)) return "";
219   const size_t index = static_cast<size_t>(e);
220   return EnumNamesWifiChannelSet()[index];
221 }
222 
223 /// All the various sensors that can be interacted with inside the nanoapp.
224 /// The values used here map directly to values from the CHRE API
225 enum class SensorType : uint8_t {
226   UNKNOWN = 0,
227   ACCELEROMETER = 1,
228   INSTANT_MOTION_DETECT = 2,
229   STATIONARY_DETECT = 3,
230   GYROSCOPE = 6,
231   UNCALIBRATED_GYROSCOPE = 7,
232   GEOMAGNETIC_FIELD = 8,
233   UNCALIBRATED_GEOMAGNETIC_FIELD = 9,
234   PRESSURE = 10,
235   LIGHT = 12,
236   PROXIMITY = 13,
237   STEP_DETECT = 23,
238   STEP_COUNTER = 24,
239   UNCALIBRATED_ACCELEROMETER = 55,
240   ACCELEROMETER_TEMPERATURE = 56,
241   GYROSCOPE_TEMPERATURE = 57,
242   GEOMAGNETIC_FIELD_TEMPERATURE = 58,
243   MIN = UNKNOWN,
244   MAX = GEOMAGNETIC_FIELD_TEMPERATURE
245 };
246 
EnumValuesSensorType()247 inline const SensorType (&EnumValuesSensorType())[17] {
248   static const SensorType values[] = {
249     SensorType::UNKNOWN,
250     SensorType::ACCELEROMETER,
251     SensorType::INSTANT_MOTION_DETECT,
252     SensorType::STATIONARY_DETECT,
253     SensorType::GYROSCOPE,
254     SensorType::UNCALIBRATED_GYROSCOPE,
255     SensorType::GEOMAGNETIC_FIELD,
256     SensorType::UNCALIBRATED_GEOMAGNETIC_FIELD,
257     SensorType::PRESSURE,
258     SensorType::LIGHT,
259     SensorType::PROXIMITY,
260     SensorType::STEP_DETECT,
261     SensorType::STEP_COUNTER,
262     SensorType::UNCALIBRATED_ACCELEROMETER,
263     SensorType::ACCELEROMETER_TEMPERATURE,
264     SensorType::GYROSCOPE_TEMPERATURE,
265     SensorType::GEOMAGNETIC_FIELD_TEMPERATURE
266   };
267   return values;
268 }
269 
EnumNamesSensorType()270 inline const char * const *EnumNamesSensorType() {
271   static const char * const names[60] = {
272     "UNKNOWN",
273     "ACCELEROMETER",
274     "INSTANT_MOTION_DETECT",
275     "STATIONARY_DETECT",
276     "",
277     "",
278     "GYROSCOPE",
279     "UNCALIBRATED_GYROSCOPE",
280     "GEOMAGNETIC_FIELD",
281     "UNCALIBRATED_GEOMAGNETIC_FIELD",
282     "PRESSURE",
283     "",
284     "LIGHT",
285     "PROXIMITY",
286     "",
287     "",
288     "",
289     "",
290     "",
291     "",
292     "",
293     "",
294     "",
295     "STEP_DETECT",
296     "STEP_COUNTER",
297     "",
298     "",
299     "",
300     "",
301     "",
302     "",
303     "",
304     "",
305     "",
306     "",
307     "",
308     "",
309     "",
310     "",
311     "",
312     "",
313     "",
314     "",
315     "",
316     "",
317     "",
318     "",
319     "",
320     "",
321     "",
322     "",
323     "",
324     "",
325     "",
326     "",
327     "UNCALIBRATED_ACCELEROMETER",
328     "ACCELEROMETER_TEMPERATURE",
329     "GYROSCOPE_TEMPERATURE",
330     "GEOMAGNETIC_FIELD_TEMPERATURE",
331     nullptr
332   };
333   return names;
334 }
335 
EnumNameSensorType(SensorType e)336 inline const char *EnumNameSensorType(SensorType e) {
337   if (flatbuffers::IsOutRange(e, SensorType::UNKNOWN, SensorType::GEOMAGNETIC_FIELD_TEMPERATURE)) return "";
338   const size_t index = static_cast<size_t>(e);
339   return EnumNamesSensorType()[index];
340 }
341 
342 struct TimerMessageT : public flatbuffers::NativeTable {
343   typedef TimerMessage TableType;
344   bool enable;
345   uint64_t wakeup_interval_ns;
TimerMessageTTimerMessageT346   TimerMessageT()
347       : enable(false),
348         wakeup_interval_ns(0) {
349   }
350 };
351 
352 /// Represents a message to ask the nanoapp to create a timer that wakes up at
353 /// the given interval
354 struct TimerMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
355   typedef TimerMessageT NativeTableType;
356   typedef TimerMessageBuilder Builder;
357   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
358     VT_ENABLE = 4,
359     VT_WAKEUP_INTERVAL_NS = 6
360   };
enableFLATBUFFERS_FINAL_CLASS361   bool enable() const {
362     return GetField<uint8_t>(VT_ENABLE, 0) != 0;
363   }
mutate_enableFLATBUFFERS_FINAL_CLASS364   bool mutate_enable(bool _enable) {
365     return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
366   }
wakeup_interval_nsFLATBUFFERS_FINAL_CLASS367   uint64_t wakeup_interval_ns() const {
368     return GetField<uint64_t>(VT_WAKEUP_INTERVAL_NS, 0);
369   }
mutate_wakeup_interval_nsFLATBUFFERS_FINAL_CLASS370   bool mutate_wakeup_interval_ns(uint64_t _wakeup_interval_ns) {
371     return SetField<uint64_t>(VT_WAKEUP_INTERVAL_NS, _wakeup_interval_ns, 0);
372   }
VerifyFLATBUFFERS_FINAL_CLASS373   bool Verify(flatbuffers::Verifier &verifier) const {
374     return VerifyTableStart(verifier) &&
375            VerifyField<uint8_t>(verifier, VT_ENABLE) &&
376            VerifyField<uint64_t>(verifier, VT_WAKEUP_INTERVAL_NS) &&
377            verifier.EndTable();
378   }
379   TimerMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
380   void UnPackTo(TimerMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
381   static flatbuffers::Offset<TimerMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TimerMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
382 };
383 
384 struct TimerMessageBuilder {
385   typedef TimerMessage Table;
386   flatbuffers::FlatBufferBuilder &fbb_;
387   flatbuffers::uoffset_t start_;
add_enableTimerMessageBuilder388   void add_enable(bool enable) {
389     fbb_.AddElement<uint8_t>(TimerMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
390   }
add_wakeup_interval_nsTimerMessageBuilder391   void add_wakeup_interval_ns(uint64_t wakeup_interval_ns) {
392     fbb_.AddElement<uint64_t>(TimerMessage::VT_WAKEUP_INTERVAL_NS, wakeup_interval_ns, 0);
393   }
TimerMessageBuilderTimerMessageBuilder394   explicit TimerMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
395         : fbb_(_fbb) {
396     start_ = fbb_.StartTable();
397   }
398   TimerMessageBuilder &operator=(const TimerMessageBuilder &);
FinishTimerMessageBuilder399   flatbuffers::Offset<TimerMessage> Finish() {
400     const auto end = fbb_.EndTable(start_);
401     auto o = flatbuffers::Offset<TimerMessage>(end);
402     return o;
403   }
404 };
405 
406 inline flatbuffers::Offset<TimerMessage> CreateTimerMessage(
407     flatbuffers::FlatBufferBuilder &_fbb,
408     bool enable = false,
409     uint64_t wakeup_interval_ns = 0) {
410   TimerMessageBuilder builder_(_fbb);
411   builder_.add_wakeup_interval_ns(wakeup_interval_ns);
412   builder_.add_enable(enable);
413   return builder_.Finish();
414 }
415 
416 flatbuffers::Offset<TimerMessage> CreateTimerMessage(flatbuffers::FlatBufferBuilder &_fbb, const TimerMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
417 
418 struct WifiScanMessageT : public flatbuffers::NativeTable {
419   typedef WifiScanMessage TableType;
420   bool enable;
421   uint64_t scan_interval_ns;
422   chre::power_test::WifiScanType scan_type;
423   chre::power_test::WifiRadioChain radio_chain;
424   chre::power_test::WifiChannelSet channel_set;
WifiScanMessageTWifiScanMessageT425   WifiScanMessageT()
426       : enable(false),
427         scan_interval_ns(0),
428         scan_type(chre::power_test::WifiScanType::ACTIVE),
429         radio_chain(chre::power_test::WifiRadioChain::DEFAULT),
430         channel_set(chre::power_test::WifiChannelSet::NON_DFS) {
431   }
432 };
433 
434 /// Represents a message to ask the nanoapp to start or stop WiFi scanning and
435 /// the scan interval to use if scanning is being started
436 struct WifiScanMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
437   typedef WifiScanMessageT NativeTableType;
438   typedef WifiScanMessageBuilder Builder;
439   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
440     VT_ENABLE = 4,
441     VT_SCAN_INTERVAL_NS = 6,
442     VT_SCAN_TYPE = 8,
443     VT_RADIO_CHAIN = 10,
444     VT_CHANNEL_SET = 12
445   };
enableFLATBUFFERS_FINAL_CLASS446   bool enable() const {
447     return GetField<uint8_t>(VT_ENABLE, 0) != 0;
448   }
mutate_enableFLATBUFFERS_FINAL_CLASS449   bool mutate_enable(bool _enable) {
450     return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
451   }
scan_interval_nsFLATBUFFERS_FINAL_CLASS452   uint64_t scan_interval_ns() const {
453     return GetField<uint64_t>(VT_SCAN_INTERVAL_NS, 0);
454   }
mutate_scan_interval_nsFLATBUFFERS_FINAL_CLASS455   bool mutate_scan_interval_ns(uint64_t _scan_interval_ns) {
456     return SetField<uint64_t>(VT_SCAN_INTERVAL_NS, _scan_interval_ns, 0);
457   }
scan_typeFLATBUFFERS_FINAL_CLASS458   chre::power_test::WifiScanType scan_type() const {
459     return static_cast<chre::power_test::WifiScanType>(GetField<uint8_t>(VT_SCAN_TYPE, 0));
460   }
mutate_scan_typeFLATBUFFERS_FINAL_CLASS461   bool mutate_scan_type(chre::power_test::WifiScanType _scan_type) {
462     return SetField<uint8_t>(VT_SCAN_TYPE, static_cast<uint8_t>(_scan_type), 0);
463   }
radio_chainFLATBUFFERS_FINAL_CLASS464   chre::power_test::WifiRadioChain radio_chain() const {
465     return static_cast<chre::power_test::WifiRadioChain>(GetField<uint8_t>(VT_RADIO_CHAIN, 0));
466   }
mutate_radio_chainFLATBUFFERS_FINAL_CLASS467   bool mutate_radio_chain(chre::power_test::WifiRadioChain _radio_chain) {
468     return SetField<uint8_t>(VT_RADIO_CHAIN, static_cast<uint8_t>(_radio_chain), 0);
469   }
channel_setFLATBUFFERS_FINAL_CLASS470   chre::power_test::WifiChannelSet channel_set() const {
471     return static_cast<chre::power_test::WifiChannelSet>(GetField<uint8_t>(VT_CHANNEL_SET, 0));
472   }
mutate_channel_setFLATBUFFERS_FINAL_CLASS473   bool mutate_channel_set(chre::power_test::WifiChannelSet _channel_set) {
474     return SetField<uint8_t>(VT_CHANNEL_SET, static_cast<uint8_t>(_channel_set), 0);
475   }
VerifyFLATBUFFERS_FINAL_CLASS476   bool Verify(flatbuffers::Verifier &verifier) const {
477     return VerifyTableStart(verifier) &&
478            VerifyField<uint8_t>(verifier, VT_ENABLE) &&
479            VerifyField<uint64_t>(verifier, VT_SCAN_INTERVAL_NS) &&
480            VerifyField<uint8_t>(verifier, VT_SCAN_TYPE) &&
481            VerifyField<uint8_t>(verifier, VT_RADIO_CHAIN) &&
482            VerifyField<uint8_t>(verifier, VT_CHANNEL_SET) &&
483            verifier.EndTable();
484   }
485   WifiScanMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
486   void UnPackTo(WifiScanMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
487   static flatbuffers::Offset<WifiScanMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiScanMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
488 };
489 
490 struct WifiScanMessageBuilder {
491   typedef WifiScanMessage Table;
492   flatbuffers::FlatBufferBuilder &fbb_;
493   flatbuffers::uoffset_t start_;
add_enableWifiScanMessageBuilder494   void add_enable(bool enable) {
495     fbb_.AddElement<uint8_t>(WifiScanMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
496   }
add_scan_interval_nsWifiScanMessageBuilder497   void add_scan_interval_ns(uint64_t scan_interval_ns) {
498     fbb_.AddElement<uint64_t>(WifiScanMessage::VT_SCAN_INTERVAL_NS, scan_interval_ns, 0);
499   }
add_scan_typeWifiScanMessageBuilder500   void add_scan_type(chre::power_test::WifiScanType scan_type) {
501     fbb_.AddElement<uint8_t>(WifiScanMessage::VT_SCAN_TYPE, static_cast<uint8_t>(scan_type), 0);
502   }
add_radio_chainWifiScanMessageBuilder503   void add_radio_chain(chre::power_test::WifiRadioChain radio_chain) {
504     fbb_.AddElement<uint8_t>(WifiScanMessage::VT_RADIO_CHAIN, static_cast<uint8_t>(radio_chain), 0);
505   }
add_channel_setWifiScanMessageBuilder506   void add_channel_set(chre::power_test::WifiChannelSet channel_set) {
507     fbb_.AddElement<uint8_t>(WifiScanMessage::VT_CHANNEL_SET, static_cast<uint8_t>(channel_set), 0);
508   }
WifiScanMessageBuilderWifiScanMessageBuilder509   explicit WifiScanMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
510         : fbb_(_fbb) {
511     start_ = fbb_.StartTable();
512   }
513   WifiScanMessageBuilder &operator=(const WifiScanMessageBuilder &);
FinishWifiScanMessageBuilder514   flatbuffers::Offset<WifiScanMessage> Finish() {
515     const auto end = fbb_.EndTable(start_);
516     auto o = flatbuffers::Offset<WifiScanMessage>(end);
517     return o;
518   }
519 };
520 
521 inline flatbuffers::Offset<WifiScanMessage> CreateWifiScanMessage(
522     flatbuffers::FlatBufferBuilder &_fbb,
523     bool enable = false,
524     uint64_t scan_interval_ns = 0,
525     chre::power_test::WifiScanType scan_type = chre::power_test::WifiScanType::ACTIVE,
526     chre::power_test::WifiRadioChain radio_chain = chre::power_test::WifiRadioChain::DEFAULT,
527     chre::power_test::WifiChannelSet channel_set = chre::power_test::WifiChannelSet::NON_DFS) {
528   WifiScanMessageBuilder builder_(_fbb);
529   builder_.add_scan_interval_ns(scan_interval_ns);
530   builder_.add_channel_set(channel_set);
531   builder_.add_radio_chain(radio_chain);
532   builder_.add_scan_type(scan_type);
533   builder_.add_enable(enable);
534   return builder_.Finish();
535 }
536 
537 flatbuffers::Offset<WifiScanMessage> CreateWifiScanMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiScanMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
538 
539 struct GnssLocationMessageT : public flatbuffers::NativeTable {
540   typedef GnssLocationMessage TableType;
541   bool enable;
542   uint32_t scan_interval_millis;
543   uint32_t min_time_to_next_fix_millis;
GnssLocationMessageTGnssLocationMessageT544   GnssLocationMessageT()
545       : enable(false),
546         scan_interval_millis(0),
547         min_time_to_next_fix_millis(0) {
548   }
549 };
550 
551 /// Represents a message to ask the nanoapp to start or stop Gnss location
552 /// sampling at the requested interval
553 struct GnssLocationMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
554   typedef GnssLocationMessageT NativeTableType;
555   typedef GnssLocationMessageBuilder Builder;
556   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
557     VT_ENABLE = 4,
558     VT_SCAN_INTERVAL_MILLIS = 6,
559     VT_MIN_TIME_TO_NEXT_FIX_MILLIS = 8
560   };
enableFLATBUFFERS_FINAL_CLASS561   bool enable() const {
562     return GetField<uint8_t>(VT_ENABLE, 0) != 0;
563   }
mutate_enableFLATBUFFERS_FINAL_CLASS564   bool mutate_enable(bool _enable) {
565     return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
566   }
scan_interval_millisFLATBUFFERS_FINAL_CLASS567   uint32_t scan_interval_millis() const {
568     return GetField<uint32_t>(VT_SCAN_INTERVAL_MILLIS, 0);
569   }
mutate_scan_interval_millisFLATBUFFERS_FINAL_CLASS570   bool mutate_scan_interval_millis(uint32_t _scan_interval_millis) {
571     return SetField<uint32_t>(VT_SCAN_INTERVAL_MILLIS, _scan_interval_millis, 0);
572   }
min_time_to_next_fix_millisFLATBUFFERS_FINAL_CLASS573   uint32_t min_time_to_next_fix_millis() const {
574     return GetField<uint32_t>(VT_MIN_TIME_TO_NEXT_FIX_MILLIS, 0);
575   }
mutate_min_time_to_next_fix_millisFLATBUFFERS_FINAL_CLASS576   bool mutate_min_time_to_next_fix_millis(uint32_t _min_time_to_next_fix_millis) {
577     return SetField<uint32_t>(VT_MIN_TIME_TO_NEXT_FIX_MILLIS, _min_time_to_next_fix_millis, 0);
578   }
VerifyFLATBUFFERS_FINAL_CLASS579   bool Verify(flatbuffers::Verifier &verifier) const {
580     return VerifyTableStart(verifier) &&
581            VerifyField<uint8_t>(verifier, VT_ENABLE) &&
582            VerifyField<uint32_t>(verifier, VT_SCAN_INTERVAL_MILLIS) &&
583            VerifyField<uint32_t>(verifier, VT_MIN_TIME_TO_NEXT_FIX_MILLIS) &&
584            verifier.EndTable();
585   }
586   GnssLocationMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
587   void UnPackTo(GnssLocationMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
588   static flatbuffers::Offset<GnssLocationMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const GnssLocationMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
589 };
590 
591 struct GnssLocationMessageBuilder {
592   typedef GnssLocationMessage Table;
593   flatbuffers::FlatBufferBuilder &fbb_;
594   flatbuffers::uoffset_t start_;
add_enableGnssLocationMessageBuilder595   void add_enable(bool enable) {
596     fbb_.AddElement<uint8_t>(GnssLocationMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
597   }
add_scan_interval_millisGnssLocationMessageBuilder598   void add_scan_interval_millis(uint32_t scan_interval_millis) {
599     fbb_.AddElement<uint32_t>(GnssLocationMessage::VT_SCAN_INTERVAL_MILLIS, scan_interval_millis, 0);
600   }
add_min_time_to_next_fix_millisGnssLocationMessageBuilder601   void add_min_time_to_next_fix_millis(uint32_t min_time_to_next_fix_millis) {
602     fbb_.AddElement<uint32_t>(GnssLocationMessage::VT_MIN_TIME_TO_NEXT_FIX_MILLIS, min_time_to_next_fix_millis, 0);
603   }
GnssLocationMessageBuilderGnssLocationMessageBuilder604   explicit GnssLocationMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
605         : fbb_(_fbb) {
606     start_ = fbb_.StartTable();
607   }
608   GnssLocationMessageBuilder &operator=(const GnssLocationMessageBuilder &);
FinishGnssLocationMessageBuilder609   flatbuffers::Offset<GnssLocationMessage> Finish() {
610     const auto end = fbb_.EndTable(start_);
611     auto o = flatbuffers::Offset<GnssLocationMessage>(end);
612     return o;
613   }
614 };
615 
616 inline flatbuffers::Offset<GnssLocationMessage> CreateGnssLocationMessage(
617     flatbuffers::FlatBufferBuilder &_fbb,
618     bool enable = false,
619     uint32_t scan_interval_millis = 0,
620     uint32_t min_time_to_next_fix_millis = 0) {
621   GnssLocationMessageBuilder builder_(_fbb);
622   builder_.add_min_time_to_next_fix_millis(min_time_to_next_fix_millis);
623   builder_.add_scan_interval_millis(scan_interval_millis);
624   builder_.add_enable(enable);
625   return builder_.Finish();
626 }
627 
628 flatbuffers::Offset<GnssLocationMessage> CreateGnssLocationMessage(flatbuffers::FlatBufferBuilder &_fbb, const GnssLocationMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
629 
630 struct CellQueryMessageT : public flatbuffers::NativeTable {
631   typedef CellQueryMessage TableType;
632   bool enable;
633   uint64_t query_interval_ns;
CellQueryMessageTCellQueryMessageT634   CellQueryMessageT()
635       : enable(false),
636         query_interval_ns(0) {
637   }
638 };
639 
640 /// Represents a message to ask the nanoapp to start or stop querying the cell
641 /// modem for the latest cell scan results on the given interval
642 struct CellQueryMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
643   typedef CellQueryMessageT NativeTableType;
644   typedef CellQueryMessageBuilder Builder;
645   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
646     VT_ENABLE = 4,
647     VT_QUERY_INTERVAL_NS = 6
648   };
enableFLATBUFFERS_FINAL_CLASS649   bool enable() const {
650     return GetField<uint8_t>(VT_ENABLE, 0) != 0;
651   }
mutate_enableFLATBUFFERS_FINAL_CLASS652   bool mutate_enable(bool _enable) {
653     return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
654   }
query_interval_nsFLATBUFFERS_FINAL_CLASS655   uint64_t query_interval_ns() const {
656     return GetField<uint64_t>(VT_QUERY_INTERVAL_NS, 0);
657   }
mutate_query_interval_nsFLATBUFFERS_FINAL_CLASS658   bool mutate_query_interval_ns(uint64_t _query_interval_ns) {
659     return SetField<uint64_t>(VT_QUERY_INTERVAL_NS, _query_interval_ns, 0);
660   }
VerifyFLATBUFFERS_FINAL_CLASS661   bool Verify(flatbuffers::Verifier &verifier) const {
662     return VerifyTableStart(verifier) &&
663            VerifyField<uint8_t>(verifier, VT_ENABLE) &&
664            VerifyField<uint64_t>(verifier, VT_QUERY_INTERVAL_NS) &&
665            verifier.EndTable();
666   }
667   CellQueryMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
668   void UnPackTo(CellQueryMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
669   static flatbuffers::Offset<CellQueryMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const CellQueryMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
670 };
671 
672 struct CellQueryMessageBuilder {
673   typedef CellQueryMessage Table;
674   flatbuffers::FlatBufferBuilder &fbb_;
675   flatbuffers::uoffset_t start_;
add_enableCellQueryMessageBuilder676   void add_enable(bool enable) {
677     fbb_.AddElement<uint8_t>(CellQueryMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
678   }
add_query_interval_nsCellQueryMessageBuilder679   void add_query_interval_ns(uint64_t query_interval_ns) {
680     fbb_.AddElement<uint64_t>(CellQueryMessage::VT_QUERY_INTERVAL_NS, query_interval_ns, 0);
681   }
CellQueryMessageBuilderCellQueryMessageBuilder682   explicit CellQueryMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
683         : fbb_(_fbb) {
684     start_ = fbb_.StartTable();
685   }
686   CellQueryMessageBuilder &operator=(const CellQueryMessageBuilder &);
FinishCellQueryMessageBuilder687   flatbuffers::Offset<CellQueryMessage> Finish() {
688     const auto end = fbb_.EndTable(start_);
689     auto o = flatbuffers::Offset<CellQueryMessage>(end);
690     return o;
691   }
692 };
693 
694 inline flatbuffers::Offset<CellQueryMessage> CreateCellQueryMessage(
695     flatbuffers::FlatBufferBuilder &_fbb,
696     bool enable = false,
697     uint64_t query_interval_ns = 0) {
698   CellQueryMessageBuilder builder_(_fbb);
699   builder_.add_query_interval_ns(query_interval_ns);
700   builder_.add_enable(enable);
701   return builder_.Finish();
702 }
703 
704 flatbuffers::Offset<CellQueryMessage> CreateCellQueryMessage(flatbuffers::FlatBufferBuilder &_fbb, const CellQueryMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
705 
706 struct AudioRequestMessageT : public flatbuffers::NativeTable {
707   typedef AudioRequestMessage TableType;
708   bool enable;
709   uint64_t buffer_duration_ns;
AudioRequestMessageTAudioRequestMessageT710   AudioRequestMessageT()
711       : enable(false),
712         buffer_duration_ns(0) {
713   }
714 };
715 
716 /// Represents a message to ask the nanoapp to start / stop requesting Audio
717 /// data buffered at given interval. Note: If there is more than one audio
718 /// source, the nanoapp will only request audio from the first source.
719 struct AudioRequestMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
720   typedef AudioRequestMessageT NativeTableType;
721   typedef AudioRequestMessageBuilder Builder;
722   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
723     VT_ENABLE = 4,
724     VT_BUFFER_DURATION_NS = 6
725   };
enableFLATBUFFERS_FINAL_CLASS726   bool enable() const {
727     return GetField<uint8_t>(VT_ENABLE, 0) != 0;
728   }
mutate_enableFLATBUFFERS_FINAL_CLASS729   bool mutate_enable(bool _enable) {
730     return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
731   }
732   /// The buffer duration is also used as the interval for how often
733   /// the buffer should be delivered to the nanoapp.
buffer_duration_nsFLATBUFFERS_FINAL_CLASS734   uint64_t buffer_duration_ns() const {
735     return GetField<uint64_t>(VT_BUFFER_DURATION_NS, 0);
736   }
mutate_buffer_duration_nsFLATBUFFERS_FINAL_CLASS737   bool mutate_buffer_duration_ns(uint64_t _buffer_duration_ns) {
738     return SetField<uint64_t>(VT_BUFFER_DURATION_NS, _buffer_duration_ns, 0);
739   }
VerifyFLATBUFFERS_FINAL_CLASS740   bool Verify(flatbuffers::Verifier &verifier) const {
741     return VerifyTableStart(verifier) &&
742            VerifyField<uint8_t>(verifier, VT_ENABLE) &&
743            VerifyField<uint64_t>(verifier, VT_BUFFER_DURATION_NS) &&
744            verifier.EndTable();
745   }
746   AudioRequestMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
747   void UnPackTo(AudioRequestMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
748   static flatbuffers::Offset<AudioRequestMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const AudioRequestMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
749 };
750 
751 struct AudioRequestMessageBuilder {
752   typedef AudioRequestMessage Table;
753   flatbuffers::FlatBufferBuilder &fbb_;
754   flatbuffers::uoffset_t start_;
add_enableAudioRequestMessageBuilder755   void add_enable(bool enable) {
756     fbb_.AddElement<uint8_t>(AudioRequestMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
757   }
add_buffer_duration_nsAudioRequestMessageBuilder758   void add_buffer_duration_ns(uint64_t buffer_duration_ns) {
759     fbb_.AddElement<uint64_t>(AudioRequestMessage::VT_BUFFER_DURATION_NS, buffer_duration_ns, 0);
760   }
AudioRequestMessageBuilderAudioRequestMessageBuilder761   explicit AudioRequestMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
762         : fbb_(_fbb) {
763     start_ = fbb_.StartTable();
764   }
765   AudioRequestMessageBuilder &operator=(const AudioRequestMessageBuilder &);
FinishAudioRequestMessageBuilder766   flatbuffers::Offset<AudioRequestMessage> Finish() {
767     const auto end = fbb_.EndTable(start_);
768     auto o = flatbuffers::Offset<AudioRequestMessage>(end);
769     return o;
770   }
771 };
772 
773 inline flatbuffers::Offset<AudioRequestMessage> CreateAudioRequestMessage(
774     flatbuffers::FlatBufferBuilder &_fbb,
775     bool enable = false,
776     uint64_t buffer_duration_ns = 0) {
777   AudioRequestMessageBuilder builder_(_fbb);
778   builder_.add_buffer_duration_ns(buffer_duration_ns);
779   builder_.add_enable(enable);
780   return builder_.Finish();
781 }
782 
783 flatbuffers::Offset<AudioRequestMessage> CreateAudioRequestMessage(flatbuffers::FlatBufferBuilder &_fbb, const AudioRequestMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
784 
785 struct SensorRequestMessageT : public flatbuffers::NativeTable {
786   typedef SensorRequestMessage TableType;
787   bool enable;
788   chre::power_test::SensorType sensor;
789   uint64_t sampling_interval_ns;
790   uint64_t latency_ns;
SensorRequestMessageTSensorRequestMessageT791   SensorRequestMessageT()
792       : enable(false),
793         sensor(chre::power_test::SensorType::UNKNOWN),
794         sampling_interval_ns(0),
795         latency_ns(0) {
796   }
797 };
798 
799 /// Represents a message to ask the nanoapp to start / stop sampling / batching
800 /// a given sensor
801 struct SensorRequestMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
802   typedef SensorRequestMessageT NativeTableType;
803   typedef SensorRequestMessageBuilder Builder;
804   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
805     VT_ENABLE = 4,
806     VT_SENSOR = 6,
807     VT_SAMPLING_INTERVAL_NS = 8,
808     VT_LATENCY_NS = 10
809   };
enableFLATBUFFERS_FINAL_CLASS810   bool enable() const {
811     return GetField<uint8_t>(VT_ENABLE, 0) != 0;
812   }
mutate_enableFLATBUFFERS_FINAL_CLASS813   bool mutate_enable(bool _enable) {
814     return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
815   }
sensorFLATBUFFERS_FINAL_CLASS816   chre::power_test::SensorType sensor() const {
817     return static_cast<chre::power_test::SensorType>(GetField<uint8_t>(VT_SENSOR, 0));
818   }
mutate_sensorFLATBUFFERS_FINAL_CLASS819   bool mutate_sensor(chre::power_test::SensorType _sensor) {
820     return SetField<uint8_t>(VT_SENSOR, static_cast<uint8_t>(_sensor), 0);
821   }
sampling_interval_nsFLATBUFFERS_FINAL_CLASS822   uint64_t sampling_interval_ns() const {
823     return GetField<uint64_t>(VT_SAMPLING_INTERVAL_NS, 0);
824   }
mutate_sampling_interval_nsFLATBUFFERS_FINAL_CLASS825   bool mutate_sampling_interval_ns(uint64_t _sampling_interval_ns) {
826     return SetField<uint64_t>(VT_SAMPLING_INTERVAL_NS, _sampling_interval_ns, 0);
827   }
latency_nsFLATBUFFERS_FINAL_CLASS828   uint64_t latency_ns() const {
829     return GetField<uint64_t>(VT_LATENCY_NS, 0);
830   }
mutate_latency_nsFLATBUFFERS_FINAL_CLASS831   bool mutate_latency_ns(uint64_t _latency_ns) {
832     return SetField<uint64_t>(VT_LATENCY_NS, _latency_ns, 0);
833   }
VerifyFLATBUFFERS_FINAL_CLASS834   bool Verify(flatbuffers::Verifier &verifier) const {
835     return VerifyTableStart(verifier) &&
836            VerifyField<uint8_t>(verifier, VT_ENABLE) &&
837            VerifyField<uint8_t>(verifier, VT_SENSOR) &&
838            VerifyField<uint64_t>(verifier, VT_SAMPLING_INTERVAL_NS) &&
839            VerifyField<uint64_t>(verifier, VT_LATENCY_NS) &&
840            verifier.EndTable();
841   }
842   SensorRequestMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
843   void UnPackTo(SensorRequestMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
844   static flatbuffers::Offset<SensorRequestMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const SensorRequestMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
845 };
846 
847 struct SensorRequestMessageBuilder {
848   typedef SensorRequestMessage Table;
849   flatbuffers::FlatBufferBuilder &fbb_;
850   flatbuffers::uoffset_t start_;
add_enableSensorRequestMessageBuilder851   void add_enable(bool enable) {
852     fbb_.AddElement<uint8_t>(SensorRequestMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
853   }
add_sensorSensorRequestMessageBuilder854   void add_sensor(chre::power_test::SensorType sensor) {
855     fbb_.AddElement<uint8_t>(SensorRequestMessage::VT_SENSOR, static_cast<uint8_t>(sensor), 0);
856   }
add_sampling_interval_nsSensorRequestMessageBuilder857   void add_sampling_interval_ns(uint64_t sampling_interval_ns) {
858     fbb_.AddElement<uint64_t>(SensorRequestMessage::VT_SAMPLING_INTERVAL_NS, sampling_interval_ns, 0);
859   }
add_latency_nsSensorRequestMessageBuilder860   void add_latency_ns(uint64_t latency_ns) {
861     fbb_.AddElement<uint64_t>(SensorRequestMessage::VT_LATENCY_NS, latency_ns, 0);
862   }
SensorRequestMessageBuilderSensorRequestMessageBuilder863   explicit SensorRequestMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
864         : fbb_(_fbb) {
865     start_ = fbb_.StartTable();
866   }
867   SensorRequestMessageBuilder &operator=(const SensorRequestMessageBuilder &);
FinishSensorRequestMessageBuilder868   flatbuffers::Offset<SensorRequestMessage> Finish() {
869     const auto end = fbb_.EndTable(start_);
870     auto o = flatbuffers::Offset<SensorRequestMessage>(end);
871     return o;
872   }
873 };
874 
875 inline flatbuffers::Offset<SensorRequestMessage> CreateSensorRequestMessage(
876     flatbuffers::FlatBufferBuilder &_fbb,
877     bool enable = false,
878     chre::power_test::SensorType sensor = chre::power_test::SensorType::UNKNOWN,
879     uint64_t sampling_interval_ns = 0,
880     uint64_t latency_ns = 0) {
881   SensorRequestMessageBuilder builder_(_fbb);
882   builder_.add_latency_ns(latency_ns);
883   builder_.add_sampling_interval_ns(sampling_interval_ns);
884   builder_.add_sensor(sensor);
885   builder_.add_enable(enable);
886   return builder_.Finish();
887 }
888 
889 flatbuffers::Offset<SensorRequestMessage> CreateSensorRequestMessage(flatbuffers::FlatBufferBuilder &_fbb, const SensorRequestMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
890 
891 struct BreakItMessageT : public flatbuffers::NativeTable {
892   typedef BreakItMessage TableType;
893   bool enable;
BreakItMessageTBreakItMessageT894   BreakItMessageT()
895       : enable(false) {
896   }
897 };
898 
899 /// Represents a message to enable / disable break-it mode inside the nanoapp.
900 /// Break-it mode enables WiFi / GNSS / Cell to be queried every second and
901 /// enables all sensors at their fastest sampling rate.
902 struct BreakItMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
903   typedef BreakItMessageT NativeTableType;
904   typedef BreakItMessageBuilder Builder;
905   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
906     VT_ENABLE = 4
907   };
enableFLATBUFFERS_FINAL_CLASS908   bool enable() const {
909     return GetField<uint8_t>(VT_ENABLE, 0) != 0;
910   }
mutate_enableFLATBUFFERS_FINAL_CLASS911   bool mutate_enable(bool _enable) {
912     return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
913   }
VerifyFLATBUFFERS_FINAL_CLASS914   bool Verify(flatbuffers::Verifier &verifier) const {
915     return VerifyTableStart(verifier) &&
916            VerifyField<uint8_t>(verifier, VT_ENABLE) &&
917            verifier.EndTable();
918   }
919   BreakItMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
920   void UnPackTo(BreakItMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
921   static flatbuffers::Offset<BreakItMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const BreakItMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
922 };
923 
924 struct BreakItMessageBuilder {
925   typedef BreakItMessage Table;
926   flatbuffers::FlatBufferBuilder &fbb_;
927   flatbuffers::uoffset_t start_;
add_enableBreakItMessageBuilder928   void add_enable(bool enable) {
929     fbb_.AddElement<uint8_t>(BreakItMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
930   }
BreakItMessageBuilderBreakItMessageBuilder931   explicit BreakItMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
932         : fbb_(_fbb) {
933     start_ = fbb_.StartTable();
934   }
935   BreakItMessageBuilder &operator=(const BreakItMessageBuilder &);
FinishBreakItMessageBuilder936   flatbuffers::Offset<BreakItMessage> Finish() {
937     const auto end = fbb_.EndTable(start_);
938     auto o = flatbuffers::Offset<BreakItMessage>(end);
939     return o;
940   }
941 };
942 
943 inline flatbuffers::Offset<BreakItMessage> CreateBreakItMessage(
944     flatbuffers::FlatBufferBuilder &_fbb,
945     bool enable = false) {
946   BreakItMessageBuilder builder_(_fbb);
947   builder_.add_enable(enable);
948   return builder_.Finish();
949 }
950 
951 flatbuffers::Offset<BreakItMessage> CreateBreakItMessage(flatbuffers::FlatBufferBuilder &_fbb, const BreakItMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
952 
953 struct NanoappResponseMessageT : public flatbuffers::NativeTable {
954   typedef NanoappResponseMessage TableType;
955   bool success;
NanoappResponseMessageTNanoappResponseMessageT956   NanoappResponseMessageT()
957       : success(false) {
958   }
959 };
960 
961 /// Indicates whether the nanoapp successfully performed the requested action.
962 /// Any failures will be printed to the logs.
963 struct NanoappResponseMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
964   typedef NanoappResponseMessageT NativeTableType;
965   typedef NanoappResponseMessageBuilder Builder;
966   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
967     VT_SUCCESS = 4
968   };
successFLATBUFFERS_FINAL_CLASS969   bool success() const {
970     return GetField<uint8_t>(VT_SUCCESS, 0) != 0;
971   }
mutate_successFLATBUFFERS_FINAL_CLASS972   bool mutate_success(bool _success) {
973     return SetField<uint8_t>(VT_SUCCESS, static_cast<uint8_t>(_success), 0);
974   }
VerifyFLATBUFFERS_FINAL_CLASS975   bool Verify(flatbuffers::Verifier &verifier) const {
976     return VerifyTableStart(verifier) &&
977            VerifyField<uint8_t>(verifier, VT_SUCCESS) &&
978            verifier.EndTable();
979   }
980   NanoappResponseMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
981   void UnPackTo(NanoappResponseMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
982   static flatbuffers::Offset<NanoappResponseMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const NanoappResponseMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
983 };
984 
985 struct NanoappResponseMessageBuilder {
986   typedef NanoappResponseMessage Table;
987   flatbuffers::FlatBufferBuilder &fbb_;
988   flatbuffers::uoffset_t start_;
add_successNanoappResponseMessageBuilder989   void add_success(bool success) {
990     fbb_.AddElement<uint8_t>(NanoappResponseMessage::VT_SUCCESS, static_cast<uint8_t>(success), 0);
991   }
NanoappResponseMessageBuilderNanoappResponseMessageBuilder992   explicit NanoappResponseMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
993         : fbb_(_fbb) {
994     start_ = fbb_.StartTable();
995   }
996   NanoappResponseMessageBuilder &operator=(const NanoappResponseMessageBuilder &);
FinishNanoappResponseMessageBuilder997   flatbuffers::Offset<NanoappResponseMessage> Finish() {
998     const auto end = fbb_.EndTable(start_);
999     auto o = flatbuffers::Offset<NanoappResponseMessage>(end);
1000     return o;
1001   }
1002 };
1003 
1004 inline flatbuffers::Offset<NanoappResponseMessage> CreateNanoappResponseMessage(
1005     flatbuffers::FlatBufferBuilder &_fbb,
1006     bool success = false) {
1007   NanoappResponseMessageBuilder builder_(_fbb);
1008   builder_.add_success(success);
1009   return builder_.Finish();
1010 }
1011 
1012 flatbuffers::Offset<NanoappResponseMessage> CreateNanoappResponseMessage(flatbuffers::FlatBufferBuilder &_fbb, const NanoappResponseMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1013 
1014 struct GnssMeasurementMessageT : public flatbuffers::NativeTable {
1015   typedef GnssMeasurementMessage TableType;
1016   bool enable;
1017   uint32_t min_interval_millis;
GnssMeasurementMessageTGnssMeasurementMessageT1018   GnssMeasurementMessageT()
1019       : enable(false),
1020         min_interval_millis(0) {
1021   }
1022 };
1023 
1024 /// Represents a message to ask the nanoapp to start or stop Gnss measurement
1025 /// sampling at the requested interval
1026 struct GnssMeasurementMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1027   typedef GnssMeasurementMessageT NativeTableType;
1028   typedef GnssMeasurementMessageBuilder Builder;
1029   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1030     VT_ENABLE = 4,
1031     VT_MIN_INTERVAL_MILLIS = 6
1032   };
enableFLATBUFFERS_FINAL_CLASS1033   bool enable() const {
1034     return GetField<uint8_t>(VT_ENABLE, 0) != 0;
1035   }
mutate_enableFLATBUFFERS_FINAL_CLASS1036   bool mutate_enable(bool _enable) {
1037     return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
1038   }
min_interval_millisFLATBUFFERS_FINAL_CLASS1039   uint32_t min_interval_millis() const {
1040     return GetField<uint32_t>(VT_MIN_INTERVAL_MILLIS, 0);
1041   }
mutate_min_interval_millisFLATBUFFERS_FINAL_CLASS1042   bool mutate_min_interval_millis(uint32_t _min_interval_millis) {
1043     return SetField<uint32_t>(VT_MIN_INTERVAL_MILLIS, _min_interval_millis, 0);
1044   }
VerifyFLATBUFFERS_FINAL_CLASS1045   bool Verify(flatbuffers::Verifier &verifier) const {
1046     return VerifyTableStart(verifier) &&
1047            VerifyField<uint8_t>(verifier, VT_ENABLE) &&
1048            VerifyField<uint32_t>(verifier, VT_MIN_INTERVAL_MILLIS) &&
1049            verifier.EndTable();
1050   }
1051   GnssMeasurementMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1052   void UnPackTo(GnssMeasurementMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1053   static flatbuffers::Offset<GnssMeasurementMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const GnssMeasurementMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1054 };
1055 
1056 struct GnssMeasurementMessageBuilder {
1057   typedef GnssMeasurementMessage Table;
1058   flatbuffers::FlatBufferBuilder &fbb_;
1059   flatbuffers::uoffset_t start_;
add_enableGnssMeasurementMessageBuilder1060   void add_enable(bool enable) {
1061     fbb_.AddElement<uint8_t>(GnssMeasurementMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
1062   }
add_min_interval_millisGnssMeasurementMessageBuilder1063   void add_min_interval_millis(uint32_t min_interval_millis) {
1064     fbb_.AddElement<uint32_t>(GnssMeasurementMessage::VT_MIN_INTERVAL_MILLIS, min_interval_millis, 0);
1065   }
GnssMeasurementMessageBuilderGnssMeasurementMessageBuilder1066   explicit GnssMeasurementMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1067         : fbb_(_fbb) {
1068     start_ = fbb_.StartTable();
1069   }
1070   GnssMeasurementMessageBuilder &operator=(const GnssMeasurementMessageBuilder &);
FinishGnssMeasurementMessageBuilder1071   flatbuffers::Offset<GnssMeasurementMessage> Finish() {
1072     const auto end = fbb_.EndTable(start_);
1073     auto o = flatbuffers::Offset<GnssMeasurementMessage>(end);
1074     return o;
1075   }
1076 };
1077 
1078 inline flatbuffers::Offset<GnssMeasurementMessage> CreateGnssMeasurementMessage(
1079     flatbuffers::FlatBufferBuilder &_fbb,
1080     bool enable = false,
1081     uint32_t min_interval_millis = 0) {
1082   GnssMeasurementMessageBuilder builder_(_fbb);
1083   builder_.add_min_interval_millis(min_interval_millis);
1084   builder_.add_enable(enable);
1085   return builder_.Finish();
1086 }
1087 
1088 flatbuffers::Offset<GnssMeasurementMessage> CreateGnssMeasurementMessage(flatbuffers::FlatBufferBuilder &_fbb, const GnssMeasurementMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1089 
UnPack(const flatbuffers::resolver_function_t * _resolver)1090 inline TimerMessageT *TimerMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1091   std::unique_ptr<chre::power_test::TimerMessageT> _o = std::unique_ptr<chre::power_test::TimerMessageT>(new TimerMessageT());
1092   UnPackTo(_o.get(), _resolver);
1093   return _o.release();
1094 }
1095 
UnPackTo(TimerMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1096 inline void TimerMessage::UnPackTo(TimerMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1097   (void)_o;
1098   (void)_resolver;
1099   { auto _e = enable(); _o->enable = _e; }
1100   { auto _e = wakeup_interval_ns(); _o->wakeup_interval_ns = _e; }
1101 }
1102 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const TimerMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1103 inline flatbuffers::Offset<TimerMessage> TimerMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TimerMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1104   return CreateTimerMessage(_fbb, _o, _rehasher);
1105 }
1106 
CreateTimerMessage(flatbuffers::FlatBufferBuilder & _fbb,const TimerMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1107 inline flatbuffers::Offset<TimerMessage> CreateTimerMessage(flatbuffers::FlatBufferBuilder &_fbb, const TimerMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1108   (void)_rehasher;
1109   (void)_o;
1110   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TimerMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1111   auto _enable = _o->enable;
1112   auto _wakeup_interval_ns = _o->wakeup_interval_ns;
1113   return chre::power_test::CreateTimerMessage(
1114       _fbb,
1115       _enable,
1116       _wakeup_interval_ns);
1117 }
1118 
UnPack(const flatbuffers::resolver_function_t * _resolver)1119 inline WifiScanMessageT *WifiScanMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1120   std::unique_ptr<chre::power_test::WifiScanMessageT> _o = std::unique_ptr<chre::power_test::WifiScanMessageT>(new WifiScanMessageT());
1121   UnPackTo(_o.get(), _resolver);
1122   return _o.release();
1123 }
1124 
UnPackTo(WifiScanMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1125 inline void WifiScanMessage::UnPackTo(WifiScanMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1126   (void)_o;
1127   (void)_resolver;
1128   { auto _e = enable(); _o->enable = _e; }
1129   { auto _e = scan_interval_ns(); _o->scan_interval_ns = _e; }
1130   { auto _e = scan_type(); _o->scan_type = _e; }
1131   { auto _e = radio_chain(); _o->radio_chain = _e; }
1132   { auto _e = channel_set(); _o->channel_set = _e; }
1133 }
1134 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const WifiScanMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1135 inline flatbuffers::Offset<WifiScanMessage> WifiScanMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiScanMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1136   return CreateWifiScanMessage(_fbb, _o, _rehasher);
1137 }
1138 
CreateWifiScanMessage(flatbuffers::FlatBufferBuilder & _fbb,const WifiScanMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1139 inline flatbuffers::Offset<WifiScanMessage> CreateWifiScanMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiScanMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1140   (void)_rehasher;
1141   (void)_o;
1142   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WifiScanMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1143   auto _enable = _o->enable;
1144   auto _scan_interval_ns = _o->scan_interval_ns;
1145   auto _scan_type = _o->scan_type;
1146   auto _radio_chain = _o->radio_chain;
1147   auto _channel_set = _o->channel_set;
1148   return chre::power_test::CreateWifiScanMessage(
1149       _fbb,
1150       _enable,
1151       _scan_interval_ns,
1152       _scan_type,
1153       _radio_chain,
1154       _channel_set);
1155 }
1156 
UnPack(const flatbuffers::resolver_function_t * _resolver)1157 inline GnssLocationMessageT *GnssLocationMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1158   std::unique_ptr<chre::power_test::GnssLocationMessageT> _o = std::unique_ptr<chre::power_test::GnssLocationMessageT>(new GnssLocationMessageT());
1159   UnPackTo(_o.get(), _resolver);
1160   return _o.release();
1161 }
1162 
UnPackTo(GnssLocationMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1163 inline void GnssLocationMessage::UnPackTo(GnssLocationMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1164   (void)_o;
1165   (void)_resolver;
1166   { auto _e = enable(); _o->enable = _e; }
1167   { auto _e = scan_interval_millis(); _o->scan_interval_millis = _e; }
1168   { auto _e = min_time_to_next_fix_millis(); _o->min_time_to_next_fix_millis = _e; }
1169 }
1170 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const GnssLocationMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1171 inline flatbuffers::Offset<GnssLocationMessage> GnssLocationMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GnssLocationMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1172   return CreateGnssLocationMessage(_fbb, _o, _rehasher);
1173 }
1174 
CreateGnssLocationMessage(flatbuffers::FlatBufferBuilder & _fbb,const GnssLocationMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1175 inline flatbuffers::Offset<GnssLocationMessage> CreateGnssLocationMessage(flatbuffers::FlatBufferBuilder &_fbb, const GnssLocationMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1176   (void)_rehasher;
1177   (void)_o;
1178   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GnssLocationMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1179   auto _enable = _o->enable;
1180   auto _scan_interval_millis = _o->scan_interval_millis;
1181   auto _min_time_to_next_fix_millis = _o->min_time_to_next_fix_millis;
1182   return chre::power_test::CreateGnssLocationMessage(
1183       _fbb,
1184       _enable,
1185       _scan_interval_millis,
1186       _min_time_to_next_fix_millis);
1187 }
1188 
UnPack(const flatbuffers::resolver_function_t * _resolver)1189 inline CellQueryMessageT *CellQueryMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1190   std::unique_ptr<chre::power_test::CellQueryMessageT> _o = std::unique_ptr<chre::power_test::CellQueryMessageT>(new CellQueryMessageT());
1191   UnPackTo(_o.get(), _resolver);
1192   return _o.release();
1193 }
1194 
UnPackTo(CellQueryMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1195 inline void CellQueryMessage::UnPackTo(CellQueryMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1196   (void)_o;
1197   (void)_resolver;
1198   { auto _e = enable(); _o->enable = _e; }
1199   { auto _e = query_interval_ns(); _o->query_interval_ns = _e; }
1200 }
1201 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const CellQueryMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1202 inline flatbuffers::Offset<CellQueryMessage> CellQueryMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CellQueryMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1203   return CreateCellQueryMessage(_fbb, _o, _rehasher);
1204 }
1205 
CreateCellQueryMessage(flatbuffers::FlatBufferBuilder & _fbb,const CellQueryMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1206 inline flatbuffers::Offset<CellQueryMessage> CreateCellQueryMessage(flatbuffers::FlatBufferBuilder &_fbb, const CellQueryMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1207   (void)_rehasher;
1208   (void)_o;
1209   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const CellQueryMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1210   auto _enable = _o->enable;
1211   auto _query_interval_ns = _o->query_interval_ns;
1212   return chre::power_test::CreateCellQueryMessage(
1213       _fbb,
1214       _enable,
1215       _query_interval_ns);
1216 }
1217 
UnPack(const flatbuffers::resolver_function_t * _resolver)1218 inline AudioRequestMessageT *AudioRequestMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1219   std::unique_ptr<chre::power_test::AudioRequestMessageT> _o = std::unique_ptr<chre::power_test::AudioRequestMessageT>(new AudioRequestMessageT());
1220   UnPackTo(_o.get(), _resolver);
1221   return _o.release();
1222 }
1223 
UnPackTo(AudioRequestMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1224 inline void AudioRequestMessage::UnPackTo(AudioRequestMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1225   (void)_o;
1226   (void)_resolver;
1227   { auto _e = enable(); _o->enable = _e; }
1228   { auto _e = buffer_duration_ns(); _o->buffer_duration_ns = _e; }
1229 }
1230 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const AudioRequestMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1231 inline flatbuffers::Offset<AudioRequestMessage> AudioRequestMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AudioRequestMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1232   return CreateAudioRequestMessage(_fbb, _o, _rehasher);
1233 }
1234 
CreateAudioRequestMessage(flatbuffers::FlatBufferBuilder & _fbb,const AudioRequestMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1235 inline flatbuffers::Offset<AudioRequestMessage> CreateAudioRequestMessage(flatbuffers::FlatBufferBuilder &_fbb, const AudioRequestMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1236   (void)_rehasher;
1237   (void)_o;
1238   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const AudioRequestMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1239   auto _enable = _o->enable;
1240   auto _buffer_duration_ns = _o->buffer_duration_ns;
1241   return chre::power_test::CreateAudioRequestMessage(
1242       _fbb,
1243       _enable,
1244       _buffer_duration_ns);
1245 }
1246 
UnPack(const flatbuffers::resolver_function_t * _resolver)1247 inline SensorRequestMessageT *SensorRequestMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1248   std::unique_ptr<chre::power_test::SensorRequestMessageT> _o = std::unique_ptr<chre::power_test::SensorRequestMessageT>(new SensorRequestMessageT());
1249   UnPackTo(_o.get(), _resolver);
1250   return _o.release();
1251 }
1252 
UnPackTo(SensorRequestMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1253 inline void SensorRequestMessage::UnPackTo(SensorRequestMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1254   (void)_o;
1255   (void)_resolver;
1256   { auto _e = enable(); _o->enable = _e; }
1257   { auto _e = sensor(); _o->sensor = _e; }
1258   { auto _e = sampling_interval_ns(); _o->sampling_interval_ns = _e; }
1259   { auto _e = latency_ns(); _o->latency_ns = _e; }
1260 }
1261 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const SensorRequestMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1262 inline flatbuffers::Offset<SensorRequestMessage> SensorRequestMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SensorRequestMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1263   return CreateSensorRequestMessage(_fbb, _o, _rehasher);
1264 }
1265 
CreateSensorRequestMessage(flatbuffers::FlatBufferBuilder & _fbb,const SensorRequestMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1266 inline flatbuffers::Offset<SensorRequestMessage> CreateSensorRequestMessage(flatbuffers::FlatBufferBuilder &_fbb, const SensorRequestMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1267   (void)_rehasher;
1268   (void)_o;
1269   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SensorRequestMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1270   auto _enable = _o->enable;
1271   auto _sensor = _o->sensor;
1272   auto _sampling_interval_ns = _o->sampling_interval_ns;
1273   auto _latency_ns = _o->latency_ns;
1274   return chre::power_test::CreateSensorRequestMessage(
1275       _fbb,
1276       _enable,
1277       _sensor,
1278       _sampling_interval_ns,
1279       _latency_ns);
1280 }
1281 
UnPack(const flatbuffers::resolver_function_t * _resolver)1282 inline BreakItMessageT *BreakItMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1283   std::unique_ptr<chre::power_test::BreakItMessageT> _o = std::unique_ptr<chre::power_test::BreakItMessageT>(new BreakItMessageT());
1284   UnPackTo(_o.get(), _resolver);
1285   return _o.release();
1286 }
1287 
UnPackTo(BreakItMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1288 inline void BreakItMessage::UnPackTo(BreakItMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1289   (void)_o;
1290   (void)_resolver;
1291   { auto _e = enable(); _o->enable = _e; }
1292 }
1293 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const BreakItMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1294 inline flatbuffers::Offset<BreakItMessage> BreakItMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BreakItMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1295   return CreateBreakItMessage(_fbb, _o, _rehasher);
1296 }
1297 
CreateBreakItMessage(flatbuffers::FlatBufferBuilder & _fbb,const BreakItMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1298 inline flatbuffers::Offset<BreakItMessage> CreateBreakItMessage(flatbuffers::FlatBufferBuilder &_fbb, const BreakItMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1299   (void)_rehasher;
1300   (void)_o;
1301   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BreakItMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1302   auto _enable = _o->enable;
1303   return chre::power_test::CreateBreakItMessage(
1304       _fbb,
1305       _enable);
1306 }
1307 
UnPack(const flatbuffers::resolver_function_t * _resolver)1308 inline NanoappResponseMessageT *NanoappResponseMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1309   std::unique_ptr<chre::power_test::NanoappResponseMessageT> _o = std::unique_ptr<chre::power_test::NanoappResponseMessageT>(new NanoappResponseMessageT());
1310   UnPackTo(_o.get(), _resolver);
1311   return _o.release();
1312 }
1313 
UnPackTo(NanoappResponseMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1314 inline void NanoappResponseMessage::UnPackTo(NanoappResponseMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1315   (void)_o;
1316   (void)_resolver;
1317   { auto _e = success(); _o->success = _e; }
1318 }
1319 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const NanoappResponseMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1320 inline flatbuffers::Offset<NanoappResponseMessage> NanoappResponseMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NanoappResponseMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1321   return CreateNanoappResponseMessage(_fbb, _o, _rehasher);
1322 }
1323 
CreateNanoappResponseMessage(flatbuffers::FlatBufferBuilder & _fbb,const NanoappResponseMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1324 inline flatbuffers::Offset<NanoappResponseMessage> CreateNanoappResponseMessage(flatbuffers::FlatBufferBuilder &_fbb, const NanoappResponseMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1325   (void)_rehasher;
1326   (void)_o;
1327   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NanoappResponseMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1328   auto _success = _o->success;
1329   return chre::power_test::CreateNanoappResponseMessage(
1330       _fbb,
1331       _success);
1332 }
1333 
UnPack(const flatbuffers::resolver_function_t * _resolver)1334 inline GnssMeasurementMessageT *GnssMeasurementMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1335   std::unique_ptr<chre::power_test::GnssMeasurementMessageT> _o = std::unique_ptr<chre::power_test::GnssMeasurementMessageT>(new GnssMeasurementMessageT());
1336   UnPackTo(_o.get(), _resolver);
1337   return _o.release();
1338 }
1339 
UnPackTo(GnssMeasurementMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1340 inline void GnssMeasurementMessage::UnPackTo(GnssMeasurementMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1341   (void)_o;
1342   (void)_resolver;
1343   { auto _e = enable(); _o->enable = _e; }
1344   { auto _e = min_interval_millis(); _o->min_interval_millis = _e; }
1345 }
1346 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const GnssMeasurementMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1347 inline flatbuffers::Offset<GnssMeasurementMessage> GnssMeasurementMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GnssMeasurementMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1348   return CreateGnssMeasurementMessage(_fbb, _o, _rehasher);
1349 }
1350 
CreateGnssMeasurementMessage(flatbuffers::FlatBufferBuilder & _fbb,const GnssMeasurementMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1351 inline flatbuffers::Offset<GnssMeasurementMessage> CreateGnssMeasurementMessage(flatbuffers::FlatBufferBuilder &_fbb, const GnssMeasurementMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1352   (void)_rehasher;
1353   (void)_o;
1354   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GnssMeasurementMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1355   auto _enable = _o->enable;
1356   auto _min_interval_millis = _o->min_interval_millis;
1357   return chre::power_test::CreateGnssMeasurementMessage(
1358       _fbb,
1359       _enable,
1360       _min_interval_millis);
1361 }
1362 
1363 }  // namespace power_test
1364 }  // namespace chre
1365 
1366 #endif  // FLATBUFFERS_GENERATED_CHREPOWERTEST_CHRE_POWER_TEST_H_
1367