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 struct WifiNanSubMessage;
49 struct WifiNanSubMessageBuilder;
50 struct WifiNanSubMessageT;
51
52 struct WifiNanSubCancelMessage;
53 struct WifiNanSubCancelMessageBuilder;
54 struct WifiNanSubCancelMessageT;
55
56 struct WifiNanSubResponseMessage;
57 struct WifiNanSubResponseMessageBuilder;
58 struct WifiNanSubResponseMessageT;
59
60 /// Indicates which of the following messages is being sent to / from the
61 /// nanoapp. Use uint as the base type to match the message type in
62 /// chreMessageFromHostData.
63 enum class MessageType : uint32_t {
64 UNSPECIFIED = 0,
65 /// Should be used with TimerMessage
66 TIMER_TEST = 1,
67 /// Should be used with WifiScanMessage
68 WIFI_SCAN_TEST = 2,
69 /// Should be used with GnssLocationMessage
70 GNSS_LOCATION_TEST = 3,
71 /// Should be used with CellQueryMessage
72 CELL_QUERY_TEST = 4,
73 /// Should be used with AudioRequestMessage
74 AUDIO_REQUEST_TEST = 5,
75 /// Should be used with SensorRequestMessage
76 SENSOR_REQUEST_TEST = 6,
77 /// Should be used with BreakItMessage
78 BREAK_IT_TEST = 7,
79 /// Should be used with NanoappResponseMessage
80 NANOAPP_RESPONSE = 8,
81 /// Should be used with GnssMeasurementMessage
82 GNSS_MEASUREMENT_TEST = 9,
83 /// Should be used with WifiNanSubMessage
84 WIFI_NAN_SUB = 10,
85 /// Should be used with WifiNanSubCancelMessage
86 WIFI_NAN_SUB_CANCEL = 11,
87 /// Should be used with WifiNanSubResponseMessage
88 WIFI_NAN_SUB_RESP = 12,
89 MIN = UNSPECIFIED,
90 MAX = WIFI_NAN_SUB_RESP
91 };
92
EnumValuesMessageType()93 inline const MessageType (&EnumValuesMessageType())[13] {
94 static const MessageType values[] = {
95 MessageType::UNSPECIFIED,
96 MessageType::TIMER_TEST,
97 MessageType::WIFI_SCAN_TEST,
98 MessageType::GNSS_LOCATION_TEST,
99 MessageType::CELL_QUERY_TEST,
100 MessageType::AUDIO_REQUEST_TEST,
101 MessageType::SENSOR_REQUEST_TEST,
102 MessageType::BREAK_IT_TEST,
103 MessageType::NANOAPP_RESPONSE,
104 MessageType::GNSS_MEASUREMENT_TEST,
105 MessageType::WIFI_NAN_SUB,
106 MessageType::WIFI_NAN_SUB_CANCEL,
107 MessageType::WIFI_NAN_SUB_RESP
108 };
109 return values;
110 }
111
EnumNamesMessageType()112 inline const char * const *EnumNamesMessageType() {
113 static const char * const names[14] = {
114 "UNSPECIFIED",
115 "TIMER_TEST",
116 "WIFI_SCAN_TEST",
117 "GNSS_LOCATION_TEST",
118 "CELL_QUERY_TEST",
119 "AUDIO_REQUEST_TEST",
120 "SENSOR_REQUEST_TEST",
121 "BREAK_IT_TEST",
122 "NANOAPP_RESPONSE",
123 "GNSS_MEASUREMENT_TEST",
124 "WIFI_NAN_SUB",
125 "WIFI_NAN_SUB_CANCEL",
126 "WIFI_NAN_SUB_RESP",
127 nullptr
128 };
129 return names;
130 }
131
EnumNameMessageType(MessageType e)132 inline const char *EnumNameMessageType(MessageType e) {
133 if (flatbuffers::IsOutRange(e, MessageType::UNSPECIFIED, MessageType::WIFI_NAN_SUB_RESP)) return "";
134 const size_t index = static_cast<size_t>(e);
135 return EnumNamesMessageType()[index];
136 }
137
138 /// All the various WiFi scan types that can be interacted with inside the
139 /// nanoapp. The values used here map directly to values from the CHRE API.
140 enum class WifiScanType : uint8_t {
141 ACTIVE = 0,
142 ACTIVE_PLUS_PASSIVE_DFS = 1,
143 PASSIVE = 2,
144 NO_PREFERENCE = 3,
145 MIN = ACTIVE,
146 MAX = NO_PREFERENCE
147 };
148
EnumValuesWifiScanType()149 inline const WifiScanType (&EnumValuesWifiScanType())[4] {
150 static const WifiScanType values[] = {
151 WifiScanType::ACTIVE,
152 WifiScanType::ACTIVE_PLUS_PASSIVE_DFS,
153 WifiScanType::PASSIVE,
154 WifiScanType::NO_PREFERENCE
155 };
156 return values;
157 }
158
EnumNamesWifiScanType()159 inline const char * const *EnumNamesWifiScanType() {
160 static const char * const names[5] = {
161 "ACTIVE",
162 "ACTIVE_PLUS_PASSIVE_DFS",
163 "PASSIVE",
164 "NO_PREFERENCE",
165 nullptr
166 };
167 return names;
168 }
169
EnumNameWifiScanType(WifiScanType e)170 inline const char *EnumNameWifiScanType(WifiScanType e) {
171 if (flatbuffers::IsOutRange(e, WifiScanType::ACTIVE, WifiScanType::NO_PREFERENCE)) return "";
172 const size_t index = static_cast<size_t>(e);
173 return EnumNamesWifiScanType()[index];
174 }
175
176 /// All the various WiFi radio chain preferences that can be interacted with
177 /// inside the nanoapp. The values used here map directly to values from the
178 /// CHRE API.
179 enum class WifiRadioChain : uint8_t {
180 DEFAULT = 0,
181 LOW_LATENCY = 1,
182 LOW_POWER = 2,
183 HIGH_ACCURACY = 3,
184 MIN = DEFAULT,
185 MAX = HIGH_ACCURACY
186 };
187
EnumValuesWifiRadioChain()188 inline const WifiRadioChain (&EnumValuesWifiRadioChain())[4] {
189 static const WifiRadioChain values[] = {
190 WifiRadioChain::DEFAULT,
191 WifiRadioChain::LOW_LATENCY,
192 WifiRadioChain::LOW_POWER,
193 WifiRadioChain::HIGH_ACCURACY
194 };
195 return values;
196 }
197
EnumNamesWifiRadioChain()198 inline const char * const *EnumNamesWifiRadioChain() {
199 static const char * const names[5] = {
200 "DEFAULT",
201 "LOW_LATENCY",
202 "LOW_POWER",
203 "HIGH_ACCURACY",
204 nullptr
205 };
206 return names;
207 }
208
EnumNameWifiRadioChain(WifiRadioChain e)209 inline const char *EnumNameWifiRadioChain(WifiRadioChain e) {
210 if (flatbuffers::IsOutRange(e, WifiRadioChain::DEFAULT, WifiRadioChain::HIGH_ACCURACY)) return "";
211 const size_t index = static_cast<size_t>(e);
212 return EnumNamesWifiRadioChain()[index];
213 }
214
215 /// All the various WiFi channel sets that can be interacted with inside the
216 /// nanoapp. The values used here map directly to values from the CHRE API.
217 enum class WifiChannelSet : uint8_t {
218 NON_DFS = 0,
219 ALL = 1,
220 MIN = NON_DFS,
221 MAX = ALL
222 };
223
EnumValuesWifiChannelSet()224 inline const WifiChannelSet (&EnumValuesWifiChannelSet())[2] {
225 static const WifiChannelSet values[] = {
226 WifiChannelSet::NON_DFS,
227 WifiChannelSet::ALL
228 };
229 return values;
230 }
231
EnumNamesWifiChannelSet()232 inline const char * const *EnumNamesWifiChannelSet() {
233 static const char * const names[3] = {
234 "NON_DFS",
235 "ALL",
236 nullptr
237 };
238 return names;
239 }
240
EnumNameWifiChannelSet(WifiChannelSet e)241 inline const char *EnumNameWifiChannelSet(WifiChannelSet e) {
242 if (flatbuffers::IsOutRange(e, WifiChannelSet::NON_DFS, WifiChannelSet::ALL)) return "";
243 const size_t index = static_cast<size_t>(e);
244 return EnumNamesWifiChannelSet()[index];
245 }
246
247 /// All the various sensors that can be interacted with inside the nanoapp.
248 /// The values used here map directly to values from the CHRE API
249 enum class SensorType : uint8_t {
250 UNKNOWN = 0,
251 ACCELEROMETER = 1,
252 INSTANT_MOTION_DETECT = 2,
253 STATIONARY_DETECT = 3,
254 GYROSCOPE = 6,
255 UNCALIBRATED_GYROSCOPE = 7,
256 GEOMAGNETIC_FIELD = 8,
257 UNCALIBRATED_GEOMAGNETIC_FIELD = 9,
258 PRESSURE = 10,
259 LIGHT = 12,
260 PROXIMITY = 13,
261 STEP_DETECT = 23,
262 STEP_COUNTER = 24,
263 UNCALIBRATED_ACCELEROMETER = 55,
264 ACCELEROMETER_TEMPERATURE = 56,
265 GYROSCOPE_TEMPERATURE = 57,
266 GEOMAGNETIC_FIELD_TEMPERATURE = 58,
267 MIN = UNKNOWN,
268 MAX = GEOMAGNETIC_FIELD_TEMPERATURE
269 };
270
EnumValuesSensorType()271 inline const SensorType (&EnumValuesSensorType())[17] {
272 static const SensorType values[] = {
273 SensorType::UNKNOWN,
274 SensorType::ACCELEROMETER,
275 SensorType::INSTANT_MOTION_DETECT,
276 SensorType::STATIONARY_DETECT,
277 SensorType::GYROSCOPE,
278 SensorType::UNCALIBRATED_GYROSCOPE,
279 SensorType::GEOMAGNETIC_FIELD,
280 SensorType::UNCALIBRATED_GEOMAGNETIC_FIELD,
281 SensorType::PRESSURE,
282 SensorType::LIGHT,
283 SensorType::PROXIMITY,
284 SensorType::STEP_DETECT,
285 SensorType::STEP_COUNTER,
286 SensorType::UNCALIBRATED_ACCELEROMETER,
287 SensorType::ACCELEROMETER_TEMPERATURE,
288 SensorType::GYROSCOPE_TEMPERATURE,
289 SensorType::GEOMAGNETIC_FIELD_TEMPERATURE
290 };
291 return values;
292 }
293
EnumNamesSensorType()294 inline const char * const *EnumNamesSensorType() {
295 static const char * const names[60] = {
296 "UNKNOWN",
297 "ACCELEROMETER",
298 "INSTANT_MOTION_DETECT",
299 "STATIONARY_DETECT",
300 "",
301 "",
302 "GYROSCOPE",
303 "UNCALIBRATED_GYROSCOPE",
304 "GEOMAGNETIC_FIELD",
305 "UNCALIBRATED_GEOMAGNETIC_FIELD",
306 "PRESSURE",
307 "",
308 "LIGHT",
309 "PROXIMITY",
310 "",
311 "",
312 "",
313 "",
314 "",
315 "",
316 "",
317 "",
318 "",
319 "STEP_DETECT",
320 "STEP_COUNTER",
321 "",
322 "",
323 "",
324 "",
325 "",
326 "",
327 "",
328 "",
329 "",
330 "",
331 "",
332 "",
333 "",
334 "",
335 "",
336 "",
337 "",
338 "",
339 "",
340 "",
341 "",
342 "",
343 "",
344 "",
345 "",
346 "",
347 "",
348 "",
349 "",
350 "",
351 "UNCALIBRATED_ACCELEROMETER",
352 "ACCELEROMETER_TEMPERATURE",
353 "GYROSCOPE_TEMPERATURE",
354 "GEOMAGNETIC_FIELD_TEMPERATURE",
355 nullptr
356 };
357 return names;
358 }
359
EnumNameSensorType(SensorType e)360 inline const char *EnumNameSensorType(SensorType e) {
361 if (flatbuffers::IsOutRange(e, SensorType::UNKNOWN, SensorType::GEOMAGNETIC_FIELD_TEMPERATURE)) return "";
362 const size_t index = static_cast<size_t>(e);
363 return EnumNamesSensorType()[index];
364 }
365
366 struct TimerMessageT : public flatbuffers::NativeTable {
367 typedef TimerMessage TableType;
368 bool enable;
369 uint64_t wakeup_interval_ns;
TimerMessageTTimerMessageT370 TimerMessageT()
371 : enable(false),
372 wakeup_interval_ns(0) {
373 }
374 };
375
376 /// Represents a message to ask the nanoapp to create a timer that wakes up at
377 /// the given interval
378 struct TimerMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
379 typedef TimerMessageT NativeTableType;
380 typedef TimerMessageBuilder Builder;
381 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
382 VT_ENABLE = 4,
383 VT_WAKEUP_INTERVAL_NS = 6
384 };
enableFLATBUFFERS_FINAL_CLASS385 bool enable() const {
386 return GetField<uint8_t>(VT_ENABLE, 0) != 0;
387 }
mutate_enableFLATBUFFERS_FINAL_CLASS388 bool mutate_enable(bool _enable) {
389 return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
390 }
wakeup_interval_nsFLATBUFFERS_FINAL_CLASS391 uint64_t wakeup_interval_ns() const {
392 return GetField<uint64_t>(VT_WAKEUP_INTERVAL_NS, 0);
393 }
mutate_wakeup_interval_nsFLATBUFFERS_FINAL_CLASS394 bool mutate_wakeup_interval_ns(uint64_t _wakeup_interval_ns) {
395 return SetField<uint64_t>(VT_WAKEUP_INTERVAL_NS, _wakeup_interval_ns, 0);
396 }
VerifyFLATBUFFERS_FINAL_CLASS397 bool Verify(flatbuffers::Verifier &verifier) const {
398 return VerifyTableStart(verifier) &&
399 VerifyField<uint8_t>(verifier, VT_ENABLE) &&
400 VerifyField<uint64_t>(verifier, VT_WAKEUP_INTERVAL_NS) &&
401 verifier.EndTable();
402 }
403 TimerMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
404 void UnPackTo(TimerMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
405 static flatbuffers::Offset<TimerMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TimerMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
406 };
407
408 struct TimerMessageBuilder {
409 typedef TimerMessage Table;
410 flatbuffers::FlatBufferBuilder &fbb_;
411 flatbuffers::uoffset_t start_;
add_enableTimerMessageBuilder412 void add_enable(bool enable) {
413 fbb_.AddElement<uint8_t>(TimerMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
414 }
add_wakeup_interval_nsTimerMessageBuilder415 void add_wakeup_interval_ns(uint64_t wakeup_interval_ns) {
416 fbb_.AddElement<uint64_t>(TimerMessage::VT_WAKEUP_INTERVAL_NS, wakeup_interval_ns, 0);
417 }
TimerMessageBuilderTimerMessageBuilder418 explicit TimerMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
419 : fbb_(_fbb) {
420 start_ = fbb_.StartTable();
421 }
422 TimerMessageBuilder &operator=(const TimerMessageBuilder &);
FinishTimerMessageBuilder423 flatbuffers::Offset<TimerMessage> Finish() {
424 const auto end = fbb_.EndTable(start_);
425 auto o = flatbuffers::Offset<TimerMessage>(end);
426 return o;
427 }
428 };
429
430 inline flatbuffers::Offset<TimerMessage> CreateTimerMessage(
431 flatbuffers::FlatBufferBuilder &_fbb,
432 bool enable = false,
433 uint64_t wakeup_interval_ns = 0) {
434 TimerMessageBuilder builder_(_fbb);
435 builder_.add_wakeup_interval_ns(wakeup_interval_ns);
436 builder_.add_enable(enable);
437 return builder_.Finish();
438 }
439
440 flatbuffers::Offset<TimerMessage> CreateTimerMessage(flatbuffers::FlatBufferBuilder &_fbb, const TimerMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
441
442 struct WifiScanMessageT : public flatbuffers::NativeTable {
443 typedef WifiScanMessage TableType;
444 bool enable;
445 uint64_t scan_interval_ns;
446 chre::power_test::WifiScanType scan_type;
447 chre::power_test::WifiRadioChain radio_chain;
448 chre::power_test::WifiChannelSet channel_set;
WifiScanMessageTWifiScanMessageT449 WifiScanMessageT()
450 : enable(false),
451 scan_interval_ns(0),
452 scan_type(chre::power_test::WifiScanType::ACTIVE),
453 radio_chain(chre::power_test::WifiRadioChain::DEFAULT),
454 channel_set(chre::power_test::WifiChannelSet::NON_DFS) {
455 }
456 };
457
458 /// Represents a message to ask the nanoapp to start or stop WiFi scanning and
459 /// the scan interval to use if scanning is being started
460 struct WifiScanMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
461 typedef WifiScanMessageT NativeTableType;
462 typedef WifiScanMessageBuilder Builder;
463 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
464 VT_ENABLE = 4,
465 VT_SCAN_INTERVAL_NS = 6,
466 VT_SCAN_TYPE = 8,
467 VT_RADIO_CHAIN = 10,
468 VT_CHANNEL_SET = 12
469 };
enableFLATBUFFERS_FINAL_CLASS470 bool enable() const {
471 return GetField<uint8_t>(VT_ENABLE, 0) != 0;
472 }
mutate_enableFLATBUFFERS_FINAL_CLASS473 bool mutate_enable(bool _enable) {
474 return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
475 }
scan_interval_nsFLATBUFFERS_FINAL_CLASS476 uint64_t scan_interval_ns() const {
477 return GetField<uint64_t>(VT_SCAN_INTERVAL_NS, 0);
478 }
mutate_scan_interval_nsFLATBUFFERS_FINAL_CLASS479 bool mutate_scan_interval_ns(uint64_t _scan_interval_ns) {
480 return SetField<uint64_t>(VT_SCAN_INTERVAL_NS, _scan_interval_ns, 0);
481 }
scan_typeFLATBUFFERS_FINAL_CLASS482 chre::power_test::WifiScanType scan_type() const {
483 return static_cast<chre::power_test::WifiScanType>(GetField<uint8_t>(VT_SCAN_TYPE, 0));
484 }
mutate_scan_typeFLATBUFFERS_FINAL_CLASS485 bool mutate_scan_type(chre::power_test::WifiScanType _scan_type) {
486 return SetField<uint8_t>(VT_SCAN_TYPE, static_cast<uint8_t>(_scan_type), 0);
487 }
radio_chainFLATBUFFERS_FINAL_CLASS488 chre::power_test::WifiRadioChain radio_chain() const {
489 return static_cast<chre::power_test::WifiRadioChain>(GetField<uint8_t>(VT_RADIO_CHAIN, 0));
490 }
mutate_radio_chainFLATBUFFERS_FINAL_CLASS491 bool mutate_radio_chain(chre::power_test::WifiRadioChain _radio_chain) {
492 return SetField<uint8_t>(VT_RADIO_CHAIN, static_cast<uint8_t>(_radio_chain), 0);
493 }
channel_setFLATBUFFERS_FINAL_CLASS494 chre::power_test::WifiChannelSet channel_set() const {
495 return static_cast<chre::power_test::WifiChannelSet>(GetField<uint8_t>(VT_CHANNEL_SET, 0));
496 }
mutate_channel_setFLATBUFFERS_FINAL_CLASS497 bool mutate_channel_set(chre::power_test::WifiChannelSet _channel_set) {
498 return SetField<uint8_t>(VT_CHANNEL_SET, static_cast<uint8_t>(_channel_set), 0);
499 }
VerifyFLATBUFFERS_FINAL_CLASS500 bool Verify(flatbuffers::Verifier &verifier) const {
501 return VerifyTableStart(verifier) &&
502 VerifyField<uint8_t>(verifier, VT_ENABLE) &&
503 VerifyField<uint64_t>(verifier, VT_SCAN_INTERVAL_NS) &&
504 VerifyField<uint8_t>(verifier, VT_SCAN_TYPE) &&
505 VerifyField<uint8_t>(verifier, VT_RADIO_CHAIN) &&
506 VerifyField<uint8_t>(verifier, VT_CHANNEL_SET) &&
507 verifier.EndTable();
508 }
509 WifiScanMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
510 void UnPackTo(WifiScanMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
511 static flatbuffers::Offset<WifiScanMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiScanMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
512 };
513
514 struct WifiScanMessageBuilder {
515 typedef WifiScanMessage Table;
516 flatbuffers::FlatBufferBuilder &fbb_;
517 flatbuffers::uoffset_t start_;
add_enableWifiScanMessageBuilder518 void add_enable(bool enable) {
519 fbb_.AddElement<uint8_t>(WifiScanMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
520 }
add_scan_interval_nsWifiScanMessageBuilder521 void add_scan_interval_ns(uint64_t scan_interval_ns) {
522 fbb_.AddElement<uint64_t>(WifiScanMessage::VT_SCAN_INTERVAL_NS, scan_interval_ns, 0);
523 }
add_scan_typeWifiScanMessageBuilder524 void add_scan_type(chre::power_test::WifiScanType scan_type) {
525 fbb_.AddElement<uint8_t>(WifiScanMessage::VT_SCAN_TYPE, static_cast<uint8_t>(scan_type), 0);
526 }
add_radio_chainWifiScanMessageBuilder527 void add_radio_chain(chre::power_test::WifiRadioChain radio_chain) {
528 fbb_.AddElement<uint8_t>(WifiScanMessage::VT_RADIO_CHAIN, static_cast<uint8_t>(radio_chain), 0);
529 }
add_channel_setWifiScanMessageBuilder530 void add_channel_set(chre::power_test::WifiChannelSet channel_set) {
531 fbb_.AddElement<uint8_t>(WifiScanMessage::VT_CHANNEL_SET, static_cast<uint8_t>(channel_set), 0);
532 }
WifiScanMessageBuilderWifiScanMessageBuilder533 explicit WifiScanMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
534 : fbb_(_fbb) {
535 start_ = fbb_.StartTable();
536 }
537 WifiScanMessageBuilder &operator=(const WifiScanMessageBuilder &);
FinishWifiScanMessageBuilder538 flatbuffers::Offset<WifiScanMessage> Finish() {
539 const auto end = fbb_.EndTable(start_);
540 auto o = flatbuffers::Offset<WifiScanMessage>(end);
541 return o;
542 }
543 };
544
545 inline flatbuffers::Offset<WifiScanMessage> CreateWifiScanMessage(
546 flatbuffers::FlatBufferBuilder &_fbb,
547 bool enable = false,
548 uint64_t scan_interval_ns = 0,
549 chre::power_test::WifiScanType scan_type = chre::power_test::WifiScanType::ACTIVE,
550 chre::power_test::WifiRadioChain radio_chain = chre::power_test::WifiRadioChain::DEFAULT,
551 chre::power_test::WifiChannelSet channel_set = chre::power_test::WifiChannelSet::NON_DFS) {
552 WifiScanMessageBuilder builder_(_fbb);
553 builder_.add_scan_interval_ns(scan_interval_ns);
554 builder_.add_channel_set(channel_set);
555 builder_.add_radio_chain(radio_chain);
556 builder_.add_scan_type(scan_type);
557 builder_.add_enable(enable);
558 return builder_.Finish();
559 }
560
561 flatbuffers::Offset<WifiScanMessage> CreateWifiScanMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiScanMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
562
563 struct GnssLocationMessageT : public flatbuffers::NativeTable {
564 typedef GnssLocationMessage TableType;
565 bool enable;
566 uint32_t scan_interval_millis;
567 uint32_t min_time_to_next_fix_millis;
GnssLocationMessageTGnssLocationMessageT568 GnssLocationMessageT()
569 : enable(false),
570 scan_interval_millis(0),
571 min_time_to_next_fix_millis(0) {
572 }
573 };
574
575 /// Represents a message to ask the nanoapp to start or stop Gnss location
576 /// sampling at the requested interval
577 struct GnssLocationMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
578 typedef GnssLocationMessageT NativeTableType;
579 typedef GnssLocationMessageBuilder Builder;
580 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
581 VT_ENABLE = 4,
582 VT_SCAN_INTERVAL_MILLIS = 6,
583 VT_MIN_TIME_TO_NEXT_FIX_MILLIS = 8
584 };
enableFLATBUFFERS_FINAL_CLASS585 bool enable() const {
586 return GetField<uint8_t>(VT_ENABLE, 0) != 0;
587 }
mutate_enableFLATBUFFERS_FINAL_CLASS588 bool mutate_enable(bool _enable) {
589 return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
590 }
scan_interval_millisFLATBUFFERS_FINAL_CLASS591 uint32_t scan_interval_millis() const {
592 return GetField<uint32_t>(VT_SCAN_INTERVAL_MILLIS, 0);
593 }
mutate_scan_interval_millisFLATBUFFERS_FINAL_CLASS594 bool mutate_scan_interval_millis(uint32_t _scan_interval_millis) {
595 return SetField<uint32_t>(VT_SCAN_INTERVAL_MILLIS, _scan_interval_millis, 0);
596 }
min_time_to_next_fix_millisFLATBUFFERS_FINAL_CLASS597 uint32_t min_time_to_next_fix_millis() const {
598 return GetField<uint32_t>(VT_MIN_TIME_TO_NEXT_FIX_MILLIS, 0);
599 }
mutate_min_time_to_next_fix_millisFLATBUFFERS_FINAL_CLASS600 bool mutate_min_time_to_next_fix_millis(uint32_t _min_time_to_next_fix_millis) {
601 return SetField<uint32_t>(VT_MIN_TIME_TO_NEXT_FIX_MILLIS, _min_time_to_next_fix_millis, 0);
602 }
VerifyFLATBUFFERS_FINAL_CLASS603 bool Verify(flatbuffers::Verifier &verifier) const {
604 return VerifyTableStart(verifier) &&
605 VerifyField<uint8_t>(verifier, VT_ENABLE) &&
606 VerifyField<uint32_t>(verifier, VT_SCAN_INTERVAL_MILLIS) &&
607 VerifyField<uint32_t>(verifier, VT_MIN_TIME_TO_NEXT_FIX_MILLIS) &&
608 verifier.EndTable();
609 }
610 GnssLocationMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
611 void UnPackTo(GnssLocationMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
612 static flatbuffers::Offset<GnssLocationMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const GnssLocationMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
613 };
614
615 struct GnssLocationMessageBuilder {
616 typedef GnssLocationMessage Table;
617 flatbuffers::FlatBufferBuilder &fbb_;
618 flatbuffers::uoffset_t start_;
add_enableGnssLocationMessageBuilder619 void add_enable(bool enable) {
620 fbb_.AddElement<uint8_t>(GnssLocationMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
621 }
add_scan_interval_millisGnssLocationMessageBuilder622 void add_scan_interval_millis(uint32_t scan_interval_millis) {
623 fbb_.AddElement<uint32_t>(GnssLocationMessage::VT_SCAN_INTERVAL_MILLIS, scan_interval_millis, 0);
624 }
add_min_time_to_next_fix_millisGnssLocationMessageBuilder625 void add_min_time_to_next_fix_millis(uint32_t min_time_to_next_fix_millis) {
626 fbb_.AddElement<uint32_t>(GnssLocationMessage::VT_MIN_TIME_TO_NEXT_FIX_MILLIS, min_time_to_next_fix_millis, 0);
627 }
GnssLocationMessageBuilderGnssLocationMessageBuilder628 explicit GnssLocationMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
629 : fbb_(_fbb) {
630 start_ = fbb_.StartTable();
631 }
632 GnssLocationMessageBuilder &operator=(const GnssLocationMessageBuilder &);
FinishGnssLocationMessageBuilder633 flatbuffers::Offset<GnssLocationMessage> Finish() {
634 const auto end = fbb_.EndTable(start_);
635 auto o = flatbuffers::Offset<GnssLocationMessage>(end);
636 return o;
637 }
638 };
639
640 inline flatbuffers::Offset<GnssLocationMessage> CreateGnssLocationMessage(
641 flatbuffers::FlatBufferBuilder &_fbb,
642 bool enable = false,
643 uint32_t scan_interval_millis = 0,
644 uint32_t min_time_to_next_fix_millis = 0) {
645 GnssLocationMessageBuilder builder_(_fbb);
646 builder_.add_min_time_to_next_fix_millis(min_time_to_next_fix_millis);
647 builder_.add_scan_interval_millis(scan_interval_millis);
648 builder_.add_enable(enable);
649 return builder_.Finish();
650 }
651
652 flatbuffers::Offset<GnssLocationMessage> CreateGnssLocationMessage(flatbuffers::FlatBufferBuilder &_fbb, const GnssLocationMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
653
654 struct CellQueryMessageT : public flatbuffers::NativeTable {
655 typedef CellQueryMessage TableType;
656 bool enable;
657 uint64_t query_interval_ns;
CellQueryMessageTCellQueryMessageT658 CellQueryMessageT()
659 : enable(false),
660 query_interval_ns(0) {
661 }
662 };
663
664 /// Represents a message to ask the nanoapp to start or stop querying the cell
665 /// modem for the latest cell scan results on the given interval
666 struct CellQueryMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
667 typedef CellQueryMessageT NativeTableType;
668 typedef CellQueryMessageBuilder Builder;
669 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
670 VT_ENABLE = 4,
671 VT_QUERY_INTERVAL_NS = 6
672 };
enableFLATBUFFERS_FINAL_CLASS673 bool enable() const {
674 return GetField<uint8_t>(VT_ENABLE, 0) != 0;
675 }
mutate_enableFLATBUFFERS_FINAL_CLASS676 bool mutate_enable(bool _enable) {
677 return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
678 }
query_interval_nsFLATBUFFERS_FINAL_CLASS679 uint64_t query_interval_ns() const {
680 return GetField<uint64_t>(VT_QUERY_INTERVAL_NS, 0);
681 }
mutate_query_interval_nsFLATBUFFERS_FINAL_CLASS682 bool mutate_query_interval_ns(uint64_t _query_interval_ns) {
683 return SetField<uint64_t>(VT_QUERY_INTERVAL_NS, _query_interval_ns, 0);
684 }
VerifyFLATBUFFERS_FINAL_CLASS685 bool Verify(flatbuffers::Verifier &verifier) const {
686 return VerifyTableStart(verifier) &&
687 VerifyField<uint8_t>(verifier, VT_ENABLE) &&
688 VerifyField<uint64_t>(verifier, VT_QUERY_INTERVAL_NS) &&
689 verifier.EndTable();
690 }
691 CellQueryMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
692 void UnPackTo(CellQueryMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
693 static flatbuffers::Offset<CellQueryMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const CellQueryMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
694 };
695
696 struct CellQueryMessageBuilder {
697 typedef CellQueryMessage Table;
698 flatbuffers::FlatBufferBuilder &fbb_;
699 flatbuffers::uoffset_t start_;
add_enableCellQueryMessageBuilder700 void add_enable(bool enable) {
701 fbb_.AddElement<uint8_t>(CellQueryMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
702 }
add_query_interval_nsCellQueryMessageBuilder703 void add_query_interval_ns(uint64_t query_interval_ns) {
704 fbb_.AddElement<uint64_t>(CellQueryMessage::VT_QUERY_INTERVAL_NS, query_interval_ns, 0);
705 }
CellQueryMessageBuilderCellQueryMessageBuilder706 explicit CellQueryMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
707 : fbb_(_fbb) {
708 start_ = fbb_.StartTable();
709 }
710 CellQueryMessageBuilder &operator=(const CellQueryMessageBuilder &);
FinishCellQueryMessageBuilder711 flatbuffers::Offset<CellQueryMessage> Finish() {
712 const auto end = fbb_.EndTable(start_);
713 auto o = flatbuffers::Offset<CellQueryMessage>(end);
714 return o;
715 }
716 };
717
718 inline flatbuffers::Offset<CellQueryMessage> CreateCellQueryMessage(
719 flatbuffers::FlatBufferBuilder &_fbb,
720 bool enable = false,
721 uint64_t query_interval_ns = 0) {
722 CellQueryMessageBuilder builder_(_fbb);
723 builder_.add_query_interval_ns(query_interval_ns);
724 builder_.add_enable(enable);
725 return builder_.Finish();
726 }
727
728 flatbuffers::Offset<CellQueryMessage> CreateCellQueryMessage(flatbuffers::FlatBufferBuilder &_fbb, const CellQueryMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
729
730 struct AudioRequestMessageT : public flatbuffers::NativeTable {
731 typedef AudioRequestMessage TableType;
732 bool enable;
733 uint64_t buffer_duration_ns;
AudioRequestMessageTAudioRequestMessageT734 AudioRequestMessageT()
735 : enable(false),
736 buffer_duration_ns(0) {
737 }
738 };
739
740 /// Represents a message to ask the nanoapp to start / stop requesting Audio
741 /// data buffered at given interval. Note: If there is more than one audio
742 /// source, the nanoapp will only request audio from the first source.
743 struct AudioRequestMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
744 typedef AudioRequestMessageT NativeTableType;
745 typedef AudioRequestMessageBuilder Builder;
746 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
747 VT_ENABLE = 4,
748 VT_BUFFER_DURATION_NS = 6
749 };
enableFLATBUFFERS_FINAL_CLASS750 bool enable() const {
751 return GetField<uint8_t>(VT_ENABLE, 0) != 0;
752 }
mutate_enableFLATBUFFERS_FINAL_CLASS753 bool mutate_enable(bool _enable) {
754 return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
755 }
756 /// The buffer duration is also used as the interval for how often
757 /// the buffer should be delivered to the nanoapp.
buffer_duration_nsFLATBUFFERS_FINAL_CLASS758 uint64_t buffer_duration_ns() const {
759 return GetField<uint64_t>(VT_BUFFER_DURATION_NS, 0);
760 }
mutate_buffer_duration_nsFLATBUFFERS_FINAL_CLASS761 bool mutate_buffer_duration_ns(uint64_t _buffer_duration_ns) {
762 return SetField<uint64_t>(VT_BUFFER_DURATION_NS, _buffer_duration_ns, 0);
763 }
VerifyFLATBUFFERS_FINAL_CLASS764 bool Verify(flatbuffers::Verifier &verifier) const {
765 return VerifyTableStart(verifier) &&
766 VerifyField<uint8_t>(verifier, VT_ENABLE) &&
767 VerifyField<uint64_t>(verifier, VT_BUFFER_DURATION_NS) &&
768 verifier.EndTable();
769 }
770 AudioRequestMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
771 void UnPackTo(AudioRequestMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
772 static flatbuffers::Offset<AudioRequestMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const AudioRequestMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
773 };
774
775 struct AudioRequestMessageBuilder {
776 typedef AudioRequestMessage Table;
777 flatbuffers::FlatBufferBuilder &fbb_;
778 flatbuffers::uoffset_t start_;
add_enableAudioRequestMessageBuilder779 void add_enable(bool enable) {
780 fbb_.AddElement<uint8_t>(AudioRequestMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
781 }
add_buffer_duration_nsAudioRequestMessageBuilder782 void add_buffer_duration_ns(uint64_t buffer_duration_ns) {
783 fbb_.AddElement<uint64_t>(AudioRequestMessage::VT_BUFFER_DURATION_NS, buffer_duration_ns, 0);
784 }
AudioRequestMessageBuilderAudioRequestMessageBuilder785 explicit AudioRequestMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
786 : fbb_(_fbb) {
787 start_ = fbb_.StartTable();
788 }
789 AudioRequestMessageBuilder &operator=(const AudioRequestMessageBuilder &);
FinishAudioRequestMessageBuilder790 flatbuffers::Offset<AudioRequestMessage> Finish() {
791 const auto end = fbb_.EndTable(start_);
792 auto o = flatbuffers::Offset<AudioRequestMessage>(end);
793 return o;
794 }
795 };
796
797 inline flatbuffers::Offset<AudioRequestMessage> CreateAudioRequestMessage(
798 flatbuffers::FlatBufferBuilder &_fbb,
799 bool enable = false,
800 uint64_t buffer_duration_ns = 0) {
801 AudioRequestMessageBuilder builder_(_fbb);
802 builder_.add_buffer_duration_ns(buffer_duration_ns);
803 builder_.add_enable(enable);
804 return builder_.Finish();
805 }
806
807 flatbuffers::Offset<AudioRequestMessage> CreateAudioRequestMessage(flatbuffers::FlatBufferBuilder &_fbb, const AudioRequestMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
808
809 struct SensorRequestMessageT : public flatbuffers::NativeTable {
810 typedef SensorRequestMessage TableType;
811 bool enable;
812 chre::power_test::SensorType sensor;
813 uint64_t sampling_interval_ns;
814 uint64_t latency_ns;
SensorRequestMessageTSensorRequestMessageT815 SensorRequestMessageT()
816 : enable(false),
817 sensor(chre::power_test::SensorType::UNKNOWN),
818 sampling_interval_ns(0),
819 latency_ns(0) {
820 }
821 };
822
823 /// Represents a message to ask the nanoapp to start / stop sampling / batching
824 /// a given sensor
825 struct SensorRequestMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
826 typedef SensorRequestMessageT NativeTableType;
827 typedef SensorRequestMessageBuilder Builder;
828 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
829 VT_ENABLE = 4,
830 VT_SENSOR = 6,
831 VT_SAMPLING_INTERVAL_NS = 8,
832 VT_LATENCY_NS = 10
833 };
enableFLATBUFFERS_FINAL_CLASS834 bool enable() const {
835 return GetField<uint8_t>(VT_ENABLE, 0) != 0;
836 }
mutate_enableFLATBUFFERS_FINAL_CLASS837 bool mutate_enable(bool _enable) {
838 return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
839 }
sensorFLATBUFFERS_FINAL_CLASS840 chre::power_test::SensorType sensor() const {
841 return static_cast<chre::power_test::SensorType>(GetField<uint8_t>(VT_SENSOR, 0));
842 }
mutate_sensorFLATBUFFERS_FINAL_CLASS843 bool mutate_sensor(chre::power_test::SensorType _sensor) {
844 return SetField<uint8_t>(VT_SENSOR, static_cast<uint8_t>(_sensor), 0);
845 }
sampling_interval_nsFLATBUFFERS_FINAL_CLASS846 uint64_t sampling_interval_ns() const {
847 return GetField<uint64_t>(VT_SAMPLING_INTERVAL_NS, 0);
848 }
mutate_sampling_interval_nsFLATBUFFERS_FINAL_CLASS849 bool mutate_sampling_interval_ns(uint64_t _sampling_interval_ns) {
850 return SetField<uint64_t>(VT_SAMPLING_INTERVAL_NS, _sampling_interval_ns, 0);
851 }
latency_nsFLATBUFFERS_FINAL_CLASS852 uint64_t latency_ns() const {
853 return GetField<uint64_t>(VT_LATENCY_NS, 0);
854 }
mutate_latency_nsFLATBUFFERS_FINAL_CLASS855 bool mutate_latency_ns(uint64_t _latency_ns) {
856 return SetField<uint64_t>(VT_LATENCY_NS, _latency_ns, 0);
857 }
VerifyFLATBUFFERS_FINAL_CLASS858 bool Verify(flatbuffers::Verifier &verifier) const {
859 return VerifyTableStart(verifier) &&
860 VerifyField<uint8_t>(verifier, VT_ENABLE) &&
861 VerifyField<uint8_t>(verifier, VT_SENSOR) &&
862 VerifyField<uint64_t>(verifier, VT_SAMPLING_INTERVAL_NS) &&
863 VerifyField<uint64_t>(verifier, VT_LATENCY_NS) &&
864 verifier.EndTable();
865 }
866 SensorRequestMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
867 void UnPackTo(SensorRequestMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
868 static flatbuffers::Offset<SensorRequestMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const SensorRequestMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
869 };
870
871 struct SensorRequestMessageBuilder {
872 typedef SensorRequestMessage Table;
873 flatbuffers::FlatBufferBuilder &fbb_;
874 flatbuffers::uoffset_t start_;
add_enableSensorRequestMessageBuilder875 void add_enable(bool enable) {
876 fbb_.AddElement<uint8_t>(SensorRequestMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
877 }
add_sensorSensorRequestMessageBuilder878 void add_sensor(chre::power_test::SensorType sensor) {
879 fbb_.AddElement<uint8_t>(SensorRequestMessage::VT_SENSOR, static_cast<uint8_t>(sensor), 0);
880 }
add_sampling_interval_nsSensorRequestMessageBuilder881 void add_sampling_interval_ns(uint64_t sampling_interval_ns) {
882 fbb_.AddElement<uint64_t>(SensorRequestMessage::VT_SAMPLING_INTERVAL_NS, sampling_interval_ns, 0);
883 }
add_latency_nsSensorRequestMessageBuilder884 void add_latency_ns(uint64_t latency_ns) {
885 fbb_.AddElement<uint64_t>(SensorRequestMessage::VT_LATENCY_NS, latency_ns, 0);
886 }
SensorRequestMessageBuilderSensorRequestMessageBuilder887 explicit SensorRequestMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
888 : fbb_(_fbb) {
889 start_ = fbb_.StartTable();
890 }
891 SensorRequestMessageBuilder &operator=(const SensorRequestMessageBuilder &);
FinishSensorRequestMessageBuilder892 flatbuffers::Offset<SensorRequestMessage> Finish() {
893 const auto end = fbb_.EndTable(start_);
894 auto o = flatbuffers::Offset<SensorRequestMessage>(end);
895 return o;
896 }
897 };
898
899 inline flatbuffers::Offset<SensorRequestMessage> CreateSensorRequestMessage(
900 flatbuffers::FlatBufferBuilder &_fbb,
901 bool enable = false,
902 chre::power_test::SensorType sensor = chre::power_test::SensorType::UNKNOWN,
903 uint64_t sampling_interval_ns = 0,
904 uint64_t latency_ns = 0) {
905 SensorRequestMessageBuilder builder_(_fbb);
906 builder_.add_latency_ns(latency_ns);
907 builder_.add_sampling_interval_ns(sampling_interval_ns);
908 builder_.add_sensor(sensor);
909 builder_.add_enable(enable);
910 return builder_.Finish();
911 }
912
913 flatbuffers::Offset<SensorRequestMessage> CreateSensorRequestMessage(flatbuffers::FlatBufferBuilder &_fbb, const SensorRequestMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
914
915 struct BreakItMessageT : public flatbuffers::NativeTable {
916 typedef BreakItMessage TableType;
917 bool enable;
BreakItMessageTBreakItMessageT918 BreakItMessageT()
919 : enable(false) {
920 }
921 };
922
923 /// Represents a message to enable / disable break-it mode inside the nanoapp.
924 /// Break-it mode enables WiFi / GNSS / Cell to be queried every second and
925 /// enables all sensors at their fastest sampling rate.
926 struct BreakItMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
927 typedef BreakItMessageT NativeTableType;
928 typedef BreakItMessageBuilder Builder;
929 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
930 VT_ENABLE = 4
931 };
enableFLATBUFFERS_FINAL_CLASS932 bool enable() const {
933 return GetField<uint8_t>(VT_ENABLE, 0) != 0;
934 }
mutate_enableFLATBUFFERS_FINAL_CLASS935 bool mutate_enable(bool _enable) {
936 return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
937 }
VerifyFLATBUFFERS_FINAL_CLASS938 bool Verify(flatbuffers::Verifier &verifier) const {
939 return VerifyTableStart(verifier) &&
940 VerifyField<uint8_t>(verifier, VT_ENABLE) &&
941 verifier.EndTable();
942 }
943 BreakItMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
944 void UnPackTo(BreakItMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
945 static flatbuffers::Offset<BreakItMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const BreakItMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
946 };
947
948 struct BreakItMessageBuilder {
949 typedef BreakItMessage Table;
950 flatbuffers::FlatBufferBuilder &fbb_;
951 flatbuffers::uoffset_t start_;
add_enableBreakItMessageBuilder952 void add_enable(bool enable) {
953 fbb_.AddElement<uint8_t>(BreakItMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
954 }
BreakItMessageBuilderBreakItMessageBuilder955 explicit BreakItMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
956 : fbb_(_fbb) {
957 start_ = fbb_.StartTable();
958 }
959 BreakItMessageBuilder &operator=(const BreakItMessageBuilder &);
FinishBreakItMessageBuilder960 flatbuffers::Offset<BreakItMessage> Finish() {
961 const auto end = fbb_.EndTable(start_);
962 auto o = flatbuffers::Offset<BreakItMessage>(end);
963 return o;
964 }
965 };
966
967 inline flatbuffers::Offset<BreakItMessage> CreateBreakItMessage(
968 flatbuffers::FlatBufferBuilder &_fbb,
969 bool enable = false) {
970 BreakItMessageBuilder builder_(_fbb);
971 builder_.add_enable(enable);
972 return builder_.Finish();
973 }
974
975 flatbuffers::Offset<BreakItMessage> CreateBreakItMessage(flatbuffers::FlatBufferBuilder &_fbb, const BreakItMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
976
977 struct NanoappResponseMessageT : public flatbuffers::NativeTable {
978 typedef NanoappResponseMessage TableType;
979 bool success;
NanoappResponseMessageTNanoappResponseMessageT980 NanoappResponseMessageT()
981 : success(false) {
982 }
983 };
984
985 /// Indicates whether the nanoapp successfully performed the requested action.
986 /// Any failures will be printed to the logs.
987 struct NanoappResponseMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
988 typedef NanoappResponseMessageT NativeTableType;
989 typedef NanoappResponseMessageBuilder Builder;
990 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
991 VT_SUCCESS = 4
992 };
successFLATBUFFERS_FINAL_CLASS993 bool success() const {
994 return GetField<uint8_t>(VT_SUCCESS, 0) != 0;
995 }
mutate_successFLATBUFFERS_FINAL_CLASS996 bool mutate_success(bool _success) {
997 return SetField<uint8_t>(VT_SUCCESS, static_cast<uint8_t>(_success), 0);
998 }
VerifyFLATBUFFERS_FINAL_CLASS999 bool Verify(flatbuffers::Verifier &verifier) const {
1000 return VerifyTableStart(verifier) &&
1001 VerifyField<uint8_t>(verifier, VT_SUCCESS) &&
1002 verifier.EndTable();
1003 }
1004 NanoappResponseMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1005 void UnPackTo(NanoappResponseMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1006 static flatbuffers::Offset<NanoappResponseMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const NanoappResponseMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1007 };
1008
1009 struct NanoappResponseMessageBuilder {
1010 typedef NanoappResponseMessage Table;
1011 flatbuffers::FlatBufferBuilder &fbb_;
1012 flatbuffers::uoffset_t start_;
add_successNanoappResponseMessageBuilder1013 void add_success(bool success) {
1014 fbb_.AddElement<uint8_t>(NanoappResponseMessage::VT_SUCCESS, static_cast<uint8_t>(success), 0);
1015 }
NanoappResponseMessageBuilderNanoappResponseMessageBuilder1016 explicit NanoappResponseMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1017 : fbb_(_fbb) {
1018 start_ = fbb_.StartTable();
1019 }
1020 NanoappResponseMessageBuilder &operator=(const NanoappResponseMessageBuilder &);
FinishNanoappResponseMessageBuilder1021 flatbuffers::Offset<NanoappResponseMessage> Finish() {
1022 const auto end = fbb_.EndTable(start_);
1023 auto o = flatbuffers::Offset<NanoappResponseMessage>(end);
1024 return o;
1025 }
1026 };
1027
1028 inline flatbuffers::Offset<NanoappResponseMessage> CreateNanoappResponseMessage(
1029 flatbuffers::FlatBufferBuilder &_fbb,
1030 bool success = false) {
1031 NanoappResponseMessageBuilder builder_(_fbb);
1032 builder_.add_success(success);
1033 return builder_.Finish();
1034 }
1035
1036 flatbuffers::Offset<NanoappResponseMessage> CreateNanoappResponseMessage(flatbuffers::FlatBufferBuilder &_fbb, const NanoappResponseMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1037
1038 struct GnssMeasurementMessageT : public flatbuffers::NativeTable {
1039 typedef GnssMeasurementMessage TableType;
1040 bool enable;
1041 uint32_t min_interval_millis;
GnssMeasurementMessageTGnssMeasurementMessageT1042 GnssMeasurementMessageT()
1043 : enable(false),
1044 min_interval_millis(0) {
1045 }
1046 };
1047
1048 /// Represents a message to ask the nanoapp to start or stop Gnss measurement
1049 /// sampling at the requested interval
1050 struct GnssMeasurementMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1051 typedef GnssMeasurementMessageT NativeTableType;
1052 typedef GnssMeasurementMessageBuilder Builder;
1053 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1054 VT_ENABLE = 4,
1055 VT_MIN_INTERVAL_MILLIS = 6
1056 };
enableFLATBUFFERS_FINAL_CLASS1057 bool enable() const {
1058 return GetField<uint8_t>(VT_ENABLE, 0) != 0;
1059 }
mutate_enableFLATBUFFERS_FINAL_CLASS1060 bool mutate_enable(bool _enable) {
1061 return SetField<uint8_t>(VT_ENABLE, static_cast<uint8_t>(_enable), 0);
1062 }
min_interval_millisFLATBUFFERS_FINAL_CLASS1063 uint32_t min_interval_millis() const {
1064 return GetField<uint32_t>(VT_MIN_INTERVAL_MILLIS, 0);
1065 }
mutate_min_interval_millisFLATBUFFERS_FINAL_CLASS1066 bool mutate_min_interval_millis(uint32_t _min_interval_millis) {
1067 return SetField<uint32_t>(VT_MIN_INTERVAL_MILLIS, _min_interval_millis, 0);
1068 }
VerifyFLATBUFFERS_FINAL_CLASS1069 bool Verify(flatbuffers::Verifier &verifier) const {
1070 return VerifyTableStart(verifier) &&
1071 VerifyField<uint8_t>(verifier, VT_ENABLE) &&
1072 VerifyField<uint32_t>(verifier, VT_MIN_INTERVAL_MILLIS) &&
1073 verifier.EndTable();
1074 }
1075 GnssMeasurementMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1076 void UnPackTo(GnssMeasurementMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1077 static flatbuffers::Offset<GnssMeasurementMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const GnssMeasurementMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1078 };
1079
1080 struct GnssMeasurementMessageBuilder {
1081 typedef GnssMeasurementMessage Table;
1082 flatbuffers::FlatBufferBuilder &fbb_;
1083 flatbuffers::uoffset_t start_;
add_enableGnssMeasurementMessageBuilder1084 void add_enable(bool enable) {
1085 fbb_.AddElement<uint8_t>(GnssMeasurementMessage::VT_ENABLE, static_cast<uint8_t>(enable), 0);
1086 }
add_min_interval_millisGnssMeasurementMessageBuilder1087 void add_min_interval_millis(uint32_t min_interval_millis) {
1088 fbb_.AddElement<uint32_t>(GnssMeasurementMessage::VT_MIN_INTERVAL_MILLIS, min_interval_millis, 0);
1089 }
GnssMeasurementMessageBuilderGnssMeasurementMessageBuilder1090 explicit GnssMeasurementMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1091 : fbb_(_fbb) {
1092 start_ = fbb_.StartTable();
1093 }
1094 GnssMeasurementMessageBuilder &operator=(const GnssMeasurementMessageBuilder &);
FinishGnssMeasurementMessageBuilder1095 flatbuffers::Offset<GnssMeasurementMessage> Finish() {
1096 const auto end = fbb_.EndTable(start_);
1097 auto o = flatbuffers::Offset<GnssMeasurementMessage>(end);
1098 return o;
1099 }
1100 };
1101
1102 inline flatbuffers::Offset<GnssMeasurementMessage> CreateGnssMeasurementMessage(
1103 flatbuffers::FlatBufferBuilder &_fbb,
1104 bool enable = false,
1105 uint32_t min_interval_millis = 0) {
1106 GnssMeasurementMessageBuilder builder_(_fbb);
1107 builder_.add_min_interval_millis(min_interval_millis);
1108 builder_.add_enable(enable);
1109 return builder_.Finish();
1110 }
1111
1112 flatbuffers::Offset<GnssMeasurementMessage> CreateGnssMeasurementMessage(flatbuffers::FlatBufferBuilder &_fbb, const GnssMeasurementMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1113
1114 struct WifiNanSubMessageT : public flatbuffers::NativeTable {
1115 typedef WifiNanSubMessage TableType;
1116 uint8_t sub_type;
1117 std::vector<uint8_t> service_name;
1118 std::vector<uint8_t> service_specific_info;
1119 std::vector<uint8_t> match_filter;
WifiNanSubMessageTWifiNanSubMessageT1120 WifiNanSubMessageT()
1121 : sub_type(0) {
1122 }
1123 };
1124
1125 /// Represents a message to ask the nanoapp to start a NAN subscription session.
1126 /// See chreWifiNanSubscribeConfig for how to fill in this message.
1127 struct WifiNanSubMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1128 typedef WifiNanSubMessageT NativeTableType;
1129 typedef WifiNanSubMessageBuilder Builder;
1130 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1131 VT_SUB_TYPE = 4,
1132 VT_SERVICE_NAME = 6,
1133 VT_SERVICE_SPECIFIC_INFO = 8,
1134 VT_MATCH_FILTER = 10
1135 };
sub_typeFLATBUFFERS_FINAL_CLASS1136 uint8_t sub_type() const {
1137 return GetField<uint8_t>(VT_SUB_TYPE, 0);
1138 }
mutate_sub_typeFLATBUFFERS_FINAL_CLASS1139 bool mutate_sub_type(uint8_t _sub_type) {
1140 return SetField<uint8_t>(VT_SUB_TYPE, _sub_type, 0);
1141 }
service_nameFLATBUFFERS_FINAL_CLASS1142 const flatbuffers::Vector<uint8_t> *service_name() const {
1143 return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_SERVICE_NAME);
1144 }
mutable_service_nameFLATBUFFERS_FINAL_CLASS1145 flatbuffers::Vector<uint8_t> *mutable_service_name() {
1146 return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_SERVICE_NAME);
1147 }
service_specific_infoFLATBUFFERS_FINAL_CLASS1148 const flatbuffers::Vector<uint8_t> *service_specific_info() const {
1149 return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_SERVICE_SPECIFIC_INFO);
1150 }
mutable_service_specific_infoFLATBUFFERS_FINAL_CLASS1151 flatbuffers::Vector<uint8_t> *mutable_service_specific_info() {
1152 return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_SERVICE_SPECIFIC_INFO);
1153 }
match_filterFLATBUFFERS_FINAL_CLASS1154 const flatbuffers::Vector<uint8_t> *match_filter() const {
1155 return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_MATCH_FILTER);
1156 }
mutable_match_filterFLATBUFFERS_FINAL_CLASS1157 flatbuffers::Vector<uint8_t> *mutable_match_filter() {
1158 return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_MATCH_FILTER);
1159 }
VerifyFLATBUFFERS_FINAL_CLASS1160 bool Verify(flatbuffers::Verifier &verifier) const {
1161 return VerifyTableStart(verifier) &&
1162 VerifyField<uint8_t>(verifier, VT_SUB_TYPE) &&
1163 VerifyOffset(verifier, VT_SERVICE_NAME) &&
1164 verifier.VerifyVector(service_name()) &&
1165 VerifyOffset(verifier, VT_SERVICE_SPECIFIC_INFO) &&
1166 verifier.VerifyVector(service_specific_info()) &&
1167 VerifyOffset(verifier, VT_MATCH_FILTER) &&
1168 verifier.VerifyVector(match_filter()) &&
1169 verifier.EndTable();
1170 }
1171 WifiNanSubMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1172 void UnPackTo(WifiNanSubMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1173 static flatbuffers::Offset<WifiNanSubMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1174 };
1175
1176 struct WifiNanSubMessageBuilder {
1177 typedef WifiNanSubMessage Table;
1178 flatbuffers::FlatBufferBuilder &fbb_;
1179 flatbuffers::uoffset_t start_;
add_sub_typeWifiNanSubMessageBuilder1180 void add_sub_type(uint8_t sub_type) {
1181 fbb_.AddElement<uint8_t>(WifiNanSubMessage::VT_SUB_TYPE, sub_type, 0);
1182 }
add_service_nameWifiNanSubMessageBuilder1183 void add_service_name(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> service_name) {
1184 fbb_.AddOffset(WifiNanSubMessage::VT_SERVICE_NAME, service_name);
1185 }
add_service_specific_infoWifiNanSubMessageBuilder1186 void add_service_specific_info(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> service_specific_info) {
1187 fbb_.AddOffset(WifiNanSubMessage::VT_SERVICE_SPECIFIC_INFO, service_specific_info);
1188 }
add_match_filterWifiNanSubMessageBuilder1189 void add_match_filter(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> match_filter) {
1190 fbb_.AddOffset(WifiNanSubMessage::VT_MATCH_FILTER, match_filter);
1191 }
WifiNanSubMessageBuilderWifiNanSubMessageBuilder1192 explicit WifiNanSubMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1193 : fbb_(_fbb) {
1194 start_ = fbb_.StartTable();
1195 }
1196 WifiNanSubMessageBuilder &operator=(const WifiNanSubMessageBuilder &);
FinishWifiNanSubMessageBuilder1197 flatbuffers::Offset<WifiNanSubMessage> Finish() {
1198 const auto end = fbb_.EndTable(start_);
1199 auto o = flatbuffers::Offset<WifiNanSubMessage>(end);
1200 return o;
1201 }
1202 };
1203
1204 inline flatbuffers::Offset<WifiNanSubMessage> CreateWifiNanSubMessage(
1205 flatbuffers::FlatBufferBuilder &_fbb,
1206 uint8_t sub_type = 0,
1207 flatbuffers::Offset<flatbuffers::Vector<uint8_t>> service_name = 0,
1208 flatbuffers::Offset<flatbuffers::Vector<uint8_t>> service_specific_info = 0,
1209 flatbuffers::Offset<flatbuffers::Vector<uint8_t>> match_filter = 0) {
1210 WifiNanSubMessageBuilder builder_(_fbb);
1211 builder_.add_match_filter(match_filter);
1212 builder_.add_service_specific_info(service_specific_info);
1213 builder_.add_service_name(service_name);
1214 builder_.add_sub_type(sub_type);
1215 return builder_.Finish();
1216 }
1217
1218 inline flatbuffers::Offset<WifiNanSubMessage> CreateWifiNanSubMessageDirect(
1219 flatbuffers::FlatBufferBuilder &_fbb,
1220 uint8_t sub_type = 0,
1221 const std::vector<uint8_t> *service_name = nullptr,
1222 const std::vector<uint8_t> *service_specific_info = nullptr,
1223 const std::vector<uint8_t> *match_filter = nullptr) {
1224 auto service_name__ = service_name ? _fbb.CreateVector<uint8_t>(*service_name) : 0;
1225 auto service_specific_info__ = service_specific_info ? _fbb.CreateVector<uint8_t>(*service_specific_info) : 0;
1226 auto match_filter__ = match_filter ? _fbb.CreateVector<uint8_t>(*match_filter) : 0;
1227 return chre::power_test::CreateWifiNanSubMessage(
1228 _fbb,
1229 sub_type,
1230 service_name__,
1231 service_specific_info__,
1232 match_filter__);
1233 }
1234
1235 flatbuffers::Offset<WifiNanSubMessage> CreateWifiNanSubMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1236
1237 struct WifiNanSubCancelMessageT : public flatbuffers::NativeTable {
1238 typedef WifiNanSubCancelMessage TableType;
1239 uint32_t subscription_id;
WifiNanSubCancelMessageTWifiNanSubCancelMessageT1240 WifiNanSubCancelMessageT()
1241 : subscription_id(0) {
1242 }
1243 };
1244
1245 /// Represents a messages to ask the nanoapp to cancel an ongoing subscription
1246 struct WifiNanSubCancelMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1247 typedef WifiNanSubCancelMessageT NativeTableType;
1248 typedef WifiNanSubCancelMessageBuilder Builder;
1249 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1250 VT_SUBSCRIPTION_ID = 4
1251 };
subscription_idFLATBUFFERS_FINAL_CLASS1252 uint32_t subscription_id() const {
1253 return GetField<uint32_t>(VT_SUBSCRIPTION_ID, 0);
1254 }
mutate_subscription_idFLATBUFFERS_FINAL_CLASS1255 bool mutate_subscription_id(uint32_t _subscription_id) {
1256 return SetField<uint32_t>(VT_SUBSCRIPTION_ID, _subscription_id, 0);
1257 }
VerifyFLATBUFFERS_FINAL_CLASS1258 bool Verify(flatbuffers::Verifier &verifier) const {
1259 return VerifyTableStart(verifier) &&
1260 VerifyField<uint32_t>(verifier, VT_SUBSCRIPTION_ID) &&
1261 verifier.EndTable();
1262 }
1263 WifiNanSubCancelMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1264 void UnPackTo(WifiNanSubCancelMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1265 static flatbuffers::Offset<WifiNanSubCancelMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubCancelMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1266 };
1267
1268 struct WifiNanSubCancelMessageBuilder {
1269 typedef WifiNanSubCancelMessage Table;
1270 flatbuffers::FlatBufferBuilder &fbb_;
1271 flatbuffers::uoffset_t start_;
add_subscription_idWifiNanSubCancelMessageBuilder1272 void add_subscription_id(uint32_t subscription_id) {
1273 fbb_.AddElement<uint32_t>(WifiNanSubCancelMessage::VT_SUBSCRIPTION_ID, subscription_id, 0);
1274 }
WifiNanSubCancelMessageBuilderWifiNanSubCancelMessageBuilder1275 explicit WifiNanSubCancelMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1276 : fbb_(_fbb) {
1277 start_ = fbb_.StartTable();
1278 }
1279 WifiNanSubCancelMessageBuilder &operator=(const WifiNanSubCancelMessageBuilder &);
FinishWifiNanSubCancelMessageBuilder1280 flatbuffers::Offset<WifiNanSubCancelMessage> Finish() {
1281 const auto end = fbb_.EndTable(start_);
1282 auto o = flatbuffers::Offset<WifiNanSubCancelMessage>(end);
1283 return o;
1284 }
1285 };
1286
1287 inline flatbuffers::Offset<WifiNanSubCancelMessage> CreateWifiNanSubCancelMessage(
1288 flatbuffers::FlatBufferBuilder &_fbb,
1289 uint32_t subscription_id = 0) {
1290 WifiNanSubCancelMessageBuilder builder_(_fbb);
1291 builder_.add_subscription_id(subscription_id);
1292 return builder_.Finish();
1293 }
1294
1295 flatbuffers::Offset<WifiNanSubCancelMessage> CreateWifiNanSubCancelMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubCancelMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1296
1297 struct WifiNanSubResponseMessageT : public flatbuffers::NativeTable {
1298 typedef WifiNanSubResponseMessage TableType;
1299 bool success;
1300 uint32_t subscription_id;
WifiNanSubResponseMessageTWifiNanSubResponseMessageT1301 WifiNanSubResponseMessageT()
1302 : success(false),
1303 subscription_id(0) {
1304 }
1305 };
1306
1307 /// Represents a message from the nanoapp indicating whether a subscription
1308 /// request succeeded
1309 struct WifiNanSubResponseMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1310 typedef WifiNanSubResponseMessageT NativeTableType;
1311 typedef WifiNanSubResponseMessageBuilder Builder;
1312 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1313 VT_SUCCESS = 4,
1314 VT_SUBSCRIPTION_ID = 6
1315 };
successFLATBUFFERS_FINAL_CLASS1316 bool success() const {
1317 return GetField<uint8_t>(VT_SUCCESS, 0) != 0;
1318 }
mutate_successFLATBUFFERS_FINAL_CLASS1319 bool mutate_success(bool _success) {
1320 return SetField<uint8_t>(VT_SUCCESS, static_cast<uint8_t>(_success), 0);
1321 }
subscription_idFLATBUFFERS_FINAL_CLASS1322 uint32_t subscription_id() const {
1323 return GetField<uint32_t>(VT_SUBSCRIPTION_ID, 0);
1324 }
mutate_subscription_idFLATBUFFERS_FINAL_CLASS1325 bool mutate_subscription_id(uint32_t _subscription_id) {
1326 return SetField<uint32_t>(VT_SUBSCRIPTION_ID, _subscription_id, 0);
1327 }
VerifyFLATBUFFERS_FINAL_CLASS1328 bool Verify(flatbuffers::Verifier &verifier) const {
1329 return VerifyTableStart(verifier) &&
1330 VerifyField<uint8_t>(verifier, VT_SUCCESS) &&
1331 VerifyField<uint32_t>(verifier, VT_SUBSCRIPTION_ID) &&
1332 verifier.EndTable();
1333 }
1334 WifiNanSubResponseMessageT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1335 void UnPackTo(WifiNanSubResponseMessageT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1336 static flatbuffers::Offset<WifiNanSubResponseMessage> Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubResponseMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1337 };
1338
1339 struct WifiNanSubResponseMessageBuilder {
1340 typedef WifiNanSubResponseMessage Table;
1341 flatbuffers::FlatBufferBuilder &fbb_;
1342 flatbuffers::uoffset_t start_;
add_successWifiNanSubResponseMessageBuilder1343 void add_success(bool success) {
1344 fbb_.AddElement<uint8_t>(WifiNanSubResponseMessage::VT_SUCCESS, static_cast<uint8_t>(success), 0);
1345 }
add_subscription_idWifiNanSubResponseMessageBuilder1346 void add_subscription_id(uint32_t subscription_id) {
1347 fbb_.AddElement<uint32_t>(WifiNanSubResponseMessage::VT_SUBSCRIPTION_ID, subscription_id, 0);
1348 }
WifiNanSubResponseMessageBuilderWifiNanSubResponseMessageBuilder1349 explicit WifiNanSubResponseMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1350 : fbb_(_fbb) {
1351 start_ = fbb_.StartTable();
1352 }
1353 WifiNanSubResponseMessageBuilder &operator=(const WifiNanSubResponseMessageBuilder &);
FinishWifiNanSubResponseMessageBuilder1354 flatbuffers::Offset<WifiNanSubResponseMessage> Finish() {
1355 const auto end = fbb_.EndTable(start_);
1356 auto o = flatbuffers::Offset<WifiNanSubResponseMessage>(end);
1357 return o;
1358 }
1359 };
1360
1361 inline flatbuffers::Offset<WifiNanSubResponseMessage> CreateWifiNanSubResponseMessage(
1362 flatbuffers::FlatBufferBuilder &_fbb,
1363 bool success = false,
1364 uint32_t subscription_id = 0) {
1365 WifiNanSubResponseMessageBuilder builder_(_fbb);
1366 builder_.add_subscription_id(subscription_id);
1367 builder_.add_success(success);
1368 return builder_.Finish();
1369 }
1370
1371 flatbuffers::Offset<WifiNanSubResponseMessage> CreateWifiNanSubResponseMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubResponseMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1372
UnPack(const flatbuffers::resolver_function_t * _resolver)1373 inline TimerMessageT *TimerMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1374 std::unique_ptr<chre::power_test::TimerMessageT> _o = std::unique_ptr<chre::power_test::TimerMessageT>(new TimerMessageT());
1375 UnPackTo(_o.get(), _resolver);
1376 return _o.release();
1377 }
1378
UnPackTo(TimerMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1379 inline void TimerMessage::UnPackTo(TimerMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1380 (void)_o;
1381 (void)_resolver;
1382 { auto _e = enable(); _o->enable = _e; }
1383 { auto _e = wakeup_interval_ns(); _o->wakeup_interval_ns = _e; }
1384 }
1385
Pack(flatbuffers::FlatBufferBuilder & _fbb,const TimerMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1386 inline flatbuffers::Offset<TimerMessage> TimerMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TimerMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1387 return CreateTimerMessage(_fbb, _o, _rehasher);
1388 }
1389
CreateTimerMessage(flatbuffers::FlatBufferBuilder & _fbb,const TimerMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1390 inline flatbuffers::Offset<TimerMessage> CreateTimerMessage(flatbuffers::FlatBufferBuilder &_fbb, const TimerMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1391 (void)_rehasher;
1392 (void)_o;
1393 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TimerMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1394 auto _enable = _o->enable;
1395 auto _wakeup_interval_ns = _o->wakeup_interval_ns;
1396 return chre::power_test::CreateTimerMessage(
1397 _fbb,
1398 _enable,
1399 _wakeup_interval_ns);
1400 }
1401
UnPack(const flatbuffers::resolver_function_t * _resolver)1402 inline WifiScanMessageT *WifiScanMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1403 std::unique_ptr<chre::power_test::WifiScanMessageT> _o = std::unique_ptr<chre::power_test::WifiScanMessageT>(new WifiScanMessageT());
1404 UnPackTo(_o.get(), _resolver);
1405 return _o.release();
1406 }
1407
UnPackTo(WifiScanMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1408 inline void WifiScanMessage::UnPackTo(WifiScanMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1409 (void)_o;
1410 (void)_resolver;
1411 { auto _e = enable(); _o->enable = _e; }
1412 { auto _e = scan_interval_ns(); _o->scan_interval_ns = _e; }
1413 { auto _e = scan_type(); _o->scan_type = _e; }
1414 { auto _e = radio_chain(); _o->radio_chain = _e; }
1415 { auto _e = channel_set(); _o->channel_set = _e; }
1416 }
1417
Pack(flatbuffers::FlatBufferBuilder & _fbb,const WifiScanMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1418 inline flatbuffers::Offset<WifiScanMessage> WifiScanMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiScanMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1419 return CreateWifiScanMessage(_fbb, _o, _rehasher);
1420 }
1421
CreateWifiScanMessage(flatbuffers::FlatBufferBuilder & _fbb,const WifiScanMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1422 inline flatbuffers::Offset<WifiScanMessage> CreateWifiScanMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiScanMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1423 (void)_rehasher;
1424 (void)_o;
1425 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WifiScanMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1426 auto _enable = _o->enable;
1427 auto _scan_interval_ns = _o->scan_interval_ns;
1428 auto _scan_type = _o->scan_type;
1429 auto _radio_chain = _o->radio_chain;
1430 auto _channel_set = _o->channel_set;
1431 return chre::power_test::CreateWifiScanMessage(
1432 _fbb,
1433 _enable,
1434 _scan_interval_ns,
1435 _scan_type,
1436 _radio_chain,
1437 _channel_set);
1438 }
1439
UnPack(const flatbuffers::resolver_function_t * _resolver)1440 inline GnssLocationMessageT *GnssLocationMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1441 std::unique_ptr<chre::power_test::GnssLocationMessageT> _o = std::unique_ptr<chre::power_test::GnssLocationMessageT>(new GnssLocationMessageT());
1442 UnPackTo(_o.get(), _resolver);
1443 return _o.release();
1444 }
1445
UnPackTo(GnssLocationMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1446 inline void GnssLocationMessage::UnPackTo(GnssLocationMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1447 (void)_o;
1448 (void)_resolver;
1449 { auto _e = enable(); _o->enable = _e; }
1450 { auto _e = scan_interval_millis(); _o->scan_interval_millis = _e; }
1451 { auto _e = min_time_to_next_fix_millis(); _o->min_time_to_next_fix_millis = _e; }
1452 }
1453
Pack(flatbuffers::FlatBufferBuilder & _fbb,const GnssLocationMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1454 inline flatbuffers::Offset<GnssLocationMessage> GnssLocationMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GnssLocationMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1455 return CreateGnssLocationMessage(_fbb, _o, _rehasher);
1456 }
1457
CreateGnssLocationMessage(flatbuffers::FlatBufferBuilder & _fbb,const GnssLocationMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1458 inline flatbuffers::Offset<GnssLocationMessage> CreateGnssLocationMessage(flatbuffers::FlatBufferBuilder &_fbb, const GnssLocationMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1459 (void)_rehasher;
1460 (void)_o;
1461 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GnssLocationMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1462 auto _enable = _o->enable;
1463 auto _scan_interval_millis = _o->scan_interval_millis;
1464 auto _min_time_to_next_fix_millis = _o->min_time_to_next_fix_millis;
1465 return chre::power_test::CreateGnssLocationMessage(
1466 _fbb,
1467 _enable,
1468 _scan_interval_millis,
1469 _min_time_to_next_fix_millis);
1470 }
1471
UnPack(const flatbuffers::resolver_function_t * _resolver)1472 inline CellQueryMessageT *CellQueryMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1473 std::unique_ptr<chre::power_test::CellQueryMessageT> _o = std::unique_ptr<chre::power_test::CellQueryMessageT>(new CellQueryMessageT());
1474 UnPackTo(_o.get(), _resolver);
1475 return _o.release();
1476 }
1477
UnPackTo(CellQueryMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1478 inline void CellQueryMessage::UnPackTo(CellQueryMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1479 (void)_o;
1480 (void)_resolver;
1481 { auto _e = enable(); _o->enable = _e; }
1482 { auto _e = query_interval_ns(); _o->query_interval_ns = _e; }
1483 }
1484
Pack(flatbuffers::FlatBufferBuilder & _fbb,const CellQueryMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1485 inline flatbuffers::Offset<CellQueryMessage> CellQueryMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CellQueryMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1486 return CreateCellQueryMessage(_fbb, _o, _rehasher);
1487 }
1488
CreateCellQueryMessage(flatbuffers::FlatBufferBuilder & _fbb,const CellQueryMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1489 inline flatbuffers::Offset<CellQueryMessage> CreateCellQueryMessage(flatbuffers::FlatBufferBuilder &_fbb, const CellQueryMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1490 (void)_rehasher;
1491 (void)_o;
1492 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const CellQueryMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1493 auto _enable = _o->enable;
1494 auto _query_interval_ns = _o->query_interval_ns;
1495 return chre::power_test::CreateCellQueryMessage(
1496 _fbb,
1497 _enable,
1498 _query_interval_ns);
1499 }
1500
UnPack(const flatbuffers::resolver_function_t * _resolver)1501 inline AudioRequestMessageT *AudioRequestMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1502 std::unique_ptr<chre::power_test::AudioRequestMessageT> _o = std::unique_ptr<chre::power_test::AudioRequestMessageT>(new AudioRequestMessageT());
1503 UnPackTo(_o.get(), _resolver);
1504 return _o.release();
1505 }
1506
UnPackTo(AudioRequestMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1507 inline void AudioRequestMessage::UnPackTo(AudioRequestMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1508 (void)_o;
1509 (void)_resolver;
1510 { auto _e = enable(); _o->enable = _e; }
1511 { auto _e = buffer_duration_ns(); _o->buffer_duration_ns = _e; }
1512 }
1513
Pack(flatbuffers::FlatBufferBuilder & _fbb,const AudioRequestMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1514 inline flatbuffers::Offset<AudioRequestMessage> AudioRequestMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AudioRequestMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1515 return CreateAudioRequestMessage(_fbb, _o, _rehasher);
1516 }
1517
CreateAudioRequestMessage(flatbuffers::FlatBufferBuilder & _fbb,const AudioRequestMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1518 inline flatbuffers::Offset<AudioRequestMessage> CreateAudioRequestMessage(flatbuffers::FlatBufferBuilder &_fbb, const AudioRequestMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1519 (void)_rehasher;
1520 (void)_o;
1521 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const AudioRequestMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1522 auto _enable = _o->enable;
1523 auto _buffer_duration_ns = _o->buffer_duration_ns;
1524 return chre::power_test::CreateAudioRequestMessage(
1525 _fbb,
1526 _enable,
1527 _buffer_duration_ns);
1528 }
1529
UnPack(const flatbuffers::resolver_function_t * _resolver)1530 inline SensorRequestMessageT *SensorRequestMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1531 std::unique_ptr<chre::power_test::SensorRequestMessageT> _o = std::unique_ptr<chre::power_test::SensorRequestMessageT>(new SensorRequestMessageT());
1532 UnPackTo(_o.get(), _resolver);
1533 return _o.release();
1534 }
1535
UnPackTo(SensorRequestMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1536 inline void SensorRequestMessage::UnPackTo(SensorRequestMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1537 (void)_o;
1538 (void)_resolver;
1539 { auto _e = enable(); _o->enable = _e; }
1540 { auto _e = sensor(); _o->sensor = _e; }
1541 { auto _e = sampling_interval_ns(); _o->sampling_interval_ns = _e; }
1542 { auto _e = latency_ns(); _o->latency_ns = _e; }
1543 }
1544
Pack(flatbuffers::FlatBufferBuilder & _fbb,const SensorRequestMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1545 inline flatbuffers::Offset<SensorRequestMessage> SensorRequestMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SensorRequestMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1546 return CreateSensorRequestMessage(_fbb, _o, _rehasher);
1547 }
1548
CreateSensorRequestMessage(flatbuffers::FlatBufferBuilder & _fbb,const SensorRequestMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1549 inline flatbuffers::Offset<SensorRequestMessage> CreateSensorRequestMessage(flatbuffers::FlatBufferBuilder &_fbb, const SensorRequestMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1550 (void)_rehasher;
1551 (void)_o;
1552 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SensorRequestMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1553 auto _enable = _o->enable;
1554 auto _sensor = _o->sensor;
1555 auto _sampling_interval_ns = _o->sampling_interval_ns;
1556 auto _latency_ns = _o->latency_ns;
1557 return chre::power_test::CreateSensorRequestMessage(
1558 _fbb,
1559 _enable,
1560 _sensor,
1561 _sampling_interval_ns,
1562 _latency_ns);
1563 }
1564
UnPack(const flatbuffers::resolver_function_t * _resolver)1565 inline BreakItMessageT *BreakItMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1566 std::unique_ptr<chre::power_test::BreakItMessageT> _o = std::unique_ptr<chre::power_test::BreakItMessageT>(new BreakItMessageT());
1567 UnPackTo(_o.get(), _resolver);
1568 return _o.release();
1569 }
1570
UnPackTo(BreakItMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1571 inline void BreakItMessage::UnPackTo(BreakItMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1572 (void)_o;
1573 (void)_resolver;
1574 { auto _e = enable(); _o->enable = _e; }
1575 }
1576
Pack(flatbuffers::FlatBufferBuilder & _fbb,const BreakItMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1577 inline flatbuffers::Offset<BreakItMessage> BreakItMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BreakItMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1578 return CreateBreakItMessage(_fbb, _o, _rehasher);
1579 }
1580
CreateBreakItMessage(flatbuffers::FlatBufferBuilder & _fbb,const BreakItMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1581 inline flatbuffers::Offset<BreakItMessage> CreateBreakItMessage(flatbuffers::FlatBufferBuilder &_fbb, const BreakItMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1582 (void)_rehasher;
1583 (void)_o;
1584 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BreakItMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1585 auto _enable = _o->enable;
1586 return chre::power_test::CreateBreakItMessage(
1587 _fbb,
1588 _enable);
1589 }
1590
UnPack(const flatbuffers::resolver_function_t * _resolver)1591 inline NanoappResponseMessageT *NanoappResponseMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1592 std::unique_ptr<chre::power_test::NanoappResponseMessageT> _o = std::unique_ptr<chre::power_test::NanoappResponseMessageT>(new NanoappResponseMessageT());
1593 UnPackTo(_o.get(), _resolver);
1594 return _o.release();
1595 }
1596
UnPackTo(NanoappResponseMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1597 inline void NanoappResponseMessage::UnPackTo(NanoappResponseMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1598 (void)_o;
1599 (void)_resolver;
1600 { auto _e = success(); _o->success = _e; }
1601 }
1602
Pack(flatbuffers::FlatBufferBuilder & _fbb,const NanoappResponseMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1603 inline flatbuffers::Offset<NanoappResponseMessage> NanoappResponseMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NanoappResponseMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1604 return CreateNanoappResponseMessage(_fbb, _o, _rehasher);
1605 }
1606
CreateNanoappResponseMessage(flatbuffers::FlatBufferBuilder & _fbb,const NanoappResponseMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1607 inline flatbuffers::Offset<NanoappResponseMessage> CreateNanoappResponseMessage(flatbuffers::FlatBufferBuilder &_fbb, const NanoappResponseMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1608 (void)_rehasher;
1609 (void)_o;
1610 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NanoappResponseMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1611 auto _success = _o->success;
1612 return chre::power_test::CreateNanoappResponseMessage(
1613 _fbb,
1614 _success);
1615 }
1616
UnPack(const flatbuffers::resolver_function_t * _resolver)1617 inline GnssMeasurementMessageT *GnssMeasurementMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1618 std::unique_ptr<chre::power_test::GnssMeasurementMessageT> _o = std::unique_ptr<chre::power_test::GnssMeasurementMessageT>(new GnssMeasurementMessageT());
1619 UnPackTo(_o.get(), _resolver);
1620 return _o.release();
1621 }
1622
UnPackTo(GnssMeasurementMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1623 inline void GnssMeasurementMessage::UnPackTo(GnssMeasurementMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1624 (void)_o;
1625 (void)_resolver;
1626 { auto _e = enable(); _o->enable = _e; }
1627 { auto _e = min_interval_millis(); _o->min_interval_millis = _e; }
1628 }
1629
Pack(flatbuffers::FlatBufferBuilder & _fbb,const GnssMeasurementMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1630 inline flatbuffers::Offset<GnssMeasurementMessage> GnssMeasurementMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GnssMeasurementMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1631 return CreateGnssMeasurementMessage(_fbb, _o, _rehasher);
1632 }
1633
CreateGnssMeasurementMessage(flatbuffers::FlatBufferBuilder & _fbb,const GnssMeasurementMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1634 inline flatbuffers::Offset<GnssMeasurementMessage> CreateGnssMeasurementMessage(flatbuffers::FlatBufferBuilder &_fbb, const GnssMeasurementMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1635 (void)_rehasher;
1636 (void)_o;
1637 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GnssMeasurementMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1638 auto _enable = _o->enable;
1639 auto _min_interval_millis = _o->min_interval_millis;
1640 return chre::power_test::CreateGnssMeasurementMessage(
1641 _fbb,
1642 _enable,
1643 _min_interval_millis);
1644 }
1645
UnPack(const flatbuffers::resolver_function_t * _resolver)1646 inline WifiNanSubMessageT *WifiNanSubMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1647 std::unique_ptr<chre::power_test::WifiNanSubMessageT> _o = std::unique_ptr<chre::power_test::WifiNanSubMessageT>(new WifiNanSubMessageT());
1648 UnPackTo(_o.get(), _resolver);
1649 return _o.release();
1650 }
1651
UnPackTo(WifiNanSubMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1652 inline void WifiNanSubMessage::UnPackTo(WifiNanSubMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1653 (void)_o;
1654 (void)_resolver;
1655 { auto _e = sub_type(); _o->sub_type = _e; }
1656 { auto _e = service_name(); if (_e) { _o->service_name.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->service_name[_i] = _e->Get(_i); } } }
1657 { auto _e = service_specific_info(); if (_e) { _o->service_specific_info.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->service_specific_info[_i] = _e->Get(_i); } } }
1658 { auto _e = match_filter(); if (_e) { _o->match_filter.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->match_filter[_i] = _e->Get(_i); } } }
1659 }
1660
Pack(flatbuffers::FlatBufferBuilder & _fbb,const WifiNanSubMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1661 inline flatbuffers::Offset<WifiNanSubMessage> WifiNanSubMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1662 return CreateWifiNanSubMessage(_fbb, _o, _rehasher);
1663 }
1664
CreateWifiNanSubMessage(flatbuffers::FlatBufferBuilder & _fbb,const WifiNanSubMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1665 inline flatbuffers::Offset<WifiNanSubMessage> CreateWifiNanSubMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1666 (void)_rehasher;
1667 (void)_o;
1668 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WifiNanSubMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1669 auto _sub_type = _o->sub_type;
1670 auto _service_name = _o->service_name.size() ? _fbb.CreateVector(_o->service_name) : 0;
1671 auto _service_specific_info = _o->service_specific_info.size() ? _fbb.CreateVector(_o->service_specific_info) : 0;
1672 auto _match_filter = _o->match_filter.size() ? _fbb.CreateVector(_o->match_filter) : 0;
1673 return chre::power_test::CreateWifiNanSubMessage(
1674 _fbb,
1675 _sub_type,
1676 _service_name,
1677 _service_specific_info,
1678 _match_filter);
1679 }
1680
UnPack(const flatbuffers::resolver_function_t * _resolver)1681 inline WifiNanSubCancelMessageT *WifiNanSubCancelMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1682 std::unique_ptr<chre::power_test::WifiNanSubCancelMessageT> _o = std::unique_ptr<chre::power_test::WifiNanSubCancelMessageT>(new WifiNanSubCancelMessageT());
1683 UnPackTo(_o.get(), _resolver);
1684 return _o.release();
1685 }
1686
UnPackTo(WifiNanSubCancelMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1687 inline void WifiNanSubCancelMessage::UnPackTo(WifiNanSubCancelMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1688 (void)_o;
1689 (void)_resolver;
1690 { auto _e = subscription_id(); _o->subscription_id = _e; }
1691 }
1692
Pack(flatbuffers::FlatBufferBuilder & _fbb,const WifiNanSubCancelMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1693 inline flatbuffers::Offset<WifiNanSubCancelMessage> WifiNanSubCancelMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubCancelMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1694 return CreateWifiNanSubCancelMessage(_fbb, _o, _rehasher);
1695 }
1696
CreateWifiNanSubCancelMessage(flatbuffers::FlatBufferBuilder & _fbb,const WifiNanSubCancelMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1697 inline flatbuffers::Offset<WifiNanSubCancelMessage> CreateWifiNanSubCancelMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubCancelMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1698 (void)_rehasher;
1699 (void)_o;
1700 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WifiNanSubCancelMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1701 auto _subscription_id = _o->subscription_id;
1702 return chre::power_test::CreateWifiNanSubCancelMessage(
1703 _fbb,
1704 _subscription_id);
1705 }
1706
UnPack(const flatbuffers::resolver_function_t * _resolver)1707 inline WifiNanSubResponseMessageT *WifiNanSubResponseMessage::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
1708 std::unique_ptr<chre::power_test::WifiNanSubResponseMessageT> _o = std::unique_ptr<chre::power_test::WifiNanSubResponseMessageT>(new WifiNanSubResponseMessageT());
1709 UnPackTo(_o.get(), _resolver);
1710 return _o.release();
1711 }
1712
UnPackTo(WifiNanSubResponseMessageT * _o,const flatbuffers::resolver_function_t * _resolver)1713 inline void WifiNanSubResponseMessage::UnPackTo(WifiNanSubResponseMessageT *_o, const flatbuffers::resolver_function_t *_resolver) const {
1714 (void)_o;
1715 (void)_resolver;
1716 { auto _e = success(); _o->success = _e; }
1717 { auto _e = subscription_id(); _o->subscription_id = _e; }
1718 }
1719
Pack(flatbuffers::FlatBufferBuilder & _fbb,const WifiNanSubResponseMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1720 inline flatbuffers::Offset<WifiNanSubResponseMessage> WifiNanSubResponseMessage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubResponseMessageT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
1721 return CreateWifiNanSubResponseMessage(_fbb, _o, _rehasher);
1722 }
1723
CreateWifiNanSubResponseMessage(flatbuffers::FlatBufferBuilder & _fbb,const WifiNanSubResponseMessageT * _o,const flatbuffers::rehasher_function_t * _rehasher)1724 inline flatbuffers::Offset<WifiNanSubResponseMessage> CreateWifiNanSubResponseMessage(flatbuffers::FlatBufferBuilder &_fbb, const WifiNanSubResponseMessageT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
1725 (void)_rehasher;
1726 (void)_o;
1727 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WifiNanSubResponseMessageT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
1728 auto _success = _o->success;
1729 auto _subscription_id = _o->subscription_id;
1730 return chre::power_test::CreateWifiNanSubResponseMessage(
1731 _fbb,
1732 _success,
1733 _subscription_id);
1734 }
1735
1736 } // namespace power_test
1737 } // namespace chre
1738
1739 #endif // FLATBUFFERS_GENERATED_CHREPOWERTEST_CHRE_POWER_TEST_H_
1740