• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 // automatically generated by the FlatBuffers compiler, do not modify
18 
19 #ifndef FLATBUFFERS_GENERATED_FLATBUFFERSTYPES_WIFI_OFFLOAD_FBS_H_
20 #define FLATBUFFERS_GENERATED_FLATBUFFERSTYPES_WIFI_OFFLOAD_FBS_H_
21 
22 #include "flatbuffers/flatbuffers.h"
23 
24 namespace wifi_offload {
25 namespace fbs {
26 
27 struct Ssid;
28 
29 struct PreferredNetwork;
30 
31 struct ScanResult;
32 
33 struct ScanResultMessage;
34 
35 struct ScanParams;
36 
37 struct ScanFilter;
38 
39 struct ScanConfig;
40 
41 struct ScanRecord;
42 
43 struct RpcLogRecord;
44 
45 struct ScanStats;
46 
47 struct Ssid FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
48   enum { VT_SSID = 4 };
ssidFLATBUFFERS_FINAL_CLASS49   const flatbuffers::Vector<uint8_t> *ssid() const {
50     return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_SSID);
51   }
VerifyFLATBUFFERS_FINAL_CLASS52   bool Verify(flatbuffers::Verifier &verifier) const {
53     return VerifyTableStart(verifier) &&
54            VerifyField<flatbuffers::uoffset_t>(verifier, VT_SSID) &&
55            verifier.Verify(ssid()) && verifier.EndTable();
56   }
57 };
58 
59 struct SsidBuilder {
60   flatbuffers::FlatBufferBuilder &fbb_;
61   flatbuffers::uoffset_t start_;
add_ssidSsidBuilder62   void add_ssid(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> ssid) {
63     fbb_.AddOffset(Ssid::VT_SSID, ssid);
64   }
SsidBuilderSsidBuilder65   SsidBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
66     start_ = fbb_.StartTable();
67   }
68   SsidBuilder &operator=(const SsidBuilder &);
FinishSsidBuilder69   flatbuffers::Offset<Ssid> Finish() {
70     const auto end = fbb_.EndTable(start_, 1);
71     auto o = flatbuffers::Offset<Ssid>(end);
72     return o;
73   }
74 };
75 
76 inline flatbuffers::Offset<Ssid> CreateSsid(
77     flatbuffers::FlatBufferBuilder &_fbb,
78     flatbuffers::Offset<flatbuffers::Vector<uint8_t>> ssid = 0) {
79   SsidBuilder builder_(_fbb);
80   builder_.add_ssid(ssid);
81   return builder_.Finish();
82 }
83 
84 inline flatbuffers::Offset<Ssid> CreateSsidDirect(
85     flatbuffers::FlatBufferBuilder &_fbb,
86     const std::vector<uint8_t> *ssid = nullptr) {
87   return wifi_offload::fbs::CreateSsid(
88       _fbb, ssid ? _fbb.CreateVector<uint8_t>(*ssid) : 0);
89 }
90 
91 struct PreferredNetwork FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
92   enum { VT_SSID = 4, VT_SECURITY_MODES = 6 };
ssidFLATBUFFERS_FINAL_CLASS93   const Ssid *ssid() const { return GetPointer<const Ssid *>(VT_SSID); }
security_modesFLATBUFFERS_FINAL_CLASS94   uint8_t security_modes() const {
95     return GetField<uint8_t>(VT_SECURITY_MODES, 0);
96   }
VerifyFLATBUFFERS_FINAL_CLASS97   bool Verify(flatbuffers::Verifier &verifier) const {
98     return VerifyTableStart(verifier) &&
99            VerifyField<flatbuffers::uoffset_t>(verifier, VT_SSID) &&
100            verifier.VerifyTable(ssid()) &&
101            VerifyField<uint8_t>(verifier, VT_SECURITY_MODES) &&
102            verifier.EndTable();
103   }
104 };
105 
106 struct PreferredNetworkBuilder {
107   flatbuffers::FlatBufferBuilder &fbb_;
108   flatbuffers::uoffset_t start_;
add_ssidPreferredNetworkBuilder109   void add_ssid(flatbuffers::Offset<Ssid> ssid) {
110     fbb_.AddOffset(PreferredNetwork::VT_SSID, ssid);
111   }
add_security_modesPreferredNetworkBuilder112   void add_security_modes(uint8_t security_modes) {
113     fbb_.AddElement<uint8_t>(PreferredNetwork::VT_SECURITY_MODES,
114                              security_modes, 0);
115   }
PreferredNetworkBuilderPreferredNetworkBuilder116   PreferredNetworkBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
117     start_ = fbb_.StartTable();
118   }
119   PreferredNetworkBuilder &operator=(const PreferredNetworkBuilder &);
FinishPreferredNetworkBuilder120   flatbuffers::Offset<PreferredNetwork> Finish() {
121     const auto end = fbb_.EndTable(start_, 2);
122     auto o = flatbuffers::Offset<PreferredNetwork>(end);
123     return o;
124   }
125 };
126 
127 inline flatbuffers::Offset<PreferredNetwork> CreatePreferredNetwork(
128     flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset<Ssid> ssid = 0,
129     uint8_t security_modes = 0) {
130   PreferredNetworkBuilder builder_(_fbb);
131   builder_.add_ssid(ssid);
132   builder_.add_security_modes(security_modes);
133   return builder_.Finish();
134 }
135 
136 struct ScanResult FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
137   enum {
138     VT_SSID = 4,
139     VT_SECURITY_MODES = 6,
140     VT_BSSID = 8,
141     VT_CAPABILITY = 10,
142     VT_FREQUENCY_SCANNED_MHZ = 12,
143     VT_RSSI_DBM = 14,
144     VT_TSF = 16
145   };
ssidFLATBUFFERS_FINAL_CLASS146   const Ssid *ssid() const { return GetPointer<const Ssid *>(VT_SSID); }
security_modesFLATBUFFERS_FINAL_CLASS147   uint8_t security_modes() const {
148     return GetField<uint8_t>(VT_SECURITY_MODES, 0);
149   }
bssidFLATBUFFERS_FINAL_CLASS150   const flatbuffers::Vector<uint8_t> *bssid() const {
151     return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_BSSID);
152   }
capabilityFLATBUFFERS_FINAL_CLASS153   uint16_t capability() const { return GetField<uint16_t>(VT_CAPABILITY, 0); }
frequency_scanned_mhzFLATBUFFERS_FINAL_CLASS154   uint32_t frequency_scanned_mhz() const {
155     return GetField<uint32_t>(VT_FREQUENCY_SCANNED_MHZ, 0);
156   }
rssi_dbmFLATBUFFERS_FINAL_CLASS157   int8_t rssi_dbm() const { return GetField<int8_t>(VT_RSSI_DBM, 0); }
tsfFLATBUFFERS_FINAL_CLASS158   uint64_t tsf() const { return GetField<uint64_t>(VT_TSF, 0); }
VerifyFLATBUFFERS_FINAL_CLASS159   bool Verify(flatbuffers::Verifier &verifier) const {
160     return VerifyTableStart(verifier) &&
161            VerifyField<flatbuffers::uoffset_t>(verifier, VT_SSID) &&
162            verifier.VerifyTable(ssid()) &&
163            VerifyField<uint8_t>(verifier, VT_SECURITY_MODES) &&
164            VerifyField<flatbuffers::uoffset_t>(verifier, VT_BSSID) &&
165            verifier.Verify(bssid()) &&
166            VerifyField<uint16_t>(verifier, VT_CAPABILITY) &&
167            VerifyField<uint32_t>(verifier, VT_FREQUENCY_SCANNED_MHZ) &&
168            VerifyField<int8_t>(verifier, VT_RSSI_DBM) &&
169            VerifyField<uint64_t>(verifier, VT_TSF) && verifier.EndTable();
170   }
171 };
172 
173 struct ScanResultBuilder {
174   flatbuffers::FlatBufferBuilder &fbb_;
175   flatbuffers::uoffset_t start_;
add_ssidScanResultBuilder176   void add_ssid(flatbuffers::Offset<Ssid> ssid) {
177     fbb_.AddOffset(ScanResult::VT_SSID, ssid);
178   }
add_security_modesScanResultBuilder179   void add_security_modes(uint8_t security_modes) {
180     fbb_.AddElement<uint8_t>(ScanResult::VT_SECURITY_MODES, security_modes, 0);
181   }
add_bssidScanResultBuilder182   void add_bssid(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> bssid) {
183     fbb_.AddOffset(ScanResult::VT_BSSID, bssid);
184   }
add_capabilityScanResultBuilder185   void add_capability(uint16_t capability) {
186     fbb_.AddElement<uint16_t>(ScanResult::VT_CAPABILITY, capability, 0);
187   }
add_frequency_scanned_mhzScanResultBuilder188   void add_frequency_scanned_mhz(uint32_t frequency_scanned_mhz) {
189     fbb_.AddElement<uint32_t>(ScanResult::VT_FREQUENCY_SCANNED_MHZ,
190                               frequency_scanned_mhz, 0);
191   }
add_rssi_dbmScanResultBuilder192   void add_rssi_dbm(int8_t rssi_dbm) {
193     fbb_.AddElement<int8_t>(ScanResult::VT_RSSI_DBM, rssi_dbm, 0);
194   }
add_tsfScanResultBuilder195   void add_tsf(uint64_t tsf) {
196     fbb_.AddElement<uint64_t>(ScanResult::VT_TSF, tsf, 0);
197   }
ScanResultBuilderScanResultBuilder198   ScanResultBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
199     start_ = fbb_.StartTable();
200   }
201   ScanResultBuilder &operator=(const ScanResultBuilder &);
FinishScanResultBuilder202   flatbuffers::Offset<ScanResult> Finish() {
203     const auto end = fbb_.EndTable(start_, 7);
204     auto o = flatbuffers::Offset<ScanResult>(end);
205     return o;
206   }
207 };
208 
209 inline flatbuffers::Offset<ScanResult> CreateScanResult(
210     flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset<Ssid> ssid = 0,
211     uint8_t security_modes = 0,
212     flatbuffers::Offset<flatbuffers::Vector<uint8_t>> bssid = 0,
213     uint16_t capability = 0, uint32_t frequency_scanned_mhz = 0,
214     int8_t rssi_dbm = 0, uint64_t tsf = 0) {
215   ScanResultBuilder builder_(_fbb);
216   builder_.add_tsf(tsf);
217   builder_.add_frequency_scanned_mhz(frequency_scanned_mhz);
218   builder_.add_bssid(bssid);
219   builder_.add_ssid(ssid);
220   builder_.add_capability(capability);
221   builder_.add_rssi_dbm(rssi_dbm);
222   builder_.add_security_modes(security_modes);
223   return builder_.Finish();
224 }
225 
226 inline flatbuffers::Offset<ScanResult> CreateScanResultDirect(
227     flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset<Ssid> ssid = 0,
228     uint8_t security_modes = 0, const std::vector<uint8_t> *bssid = nullptr,
229     uint16_t capability = 0, uint32_t frequency_scanned_mhz = 0,
230     int8_t rssi_dbm = 0, uint64_t tsf = 0) {
231   return wifi_offload::fbs::CreateScanResult(
232       _fbb, ssid, security_modes,
233       bssid ? _fbb.CreateVector<uint8_t>(*bssid) : 0, capability,
234       frequency_scanned_mhz, rssi_dbm, tsf);
235 }
236 
237 struct ScanResultMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
238   enum { VT_SCAN_RESULTS = 4 };
scan_resultsFLATBUFFERS_FINAL_CLASS239   const flatbuffers::Vector<flatbuffers::Offset<ScanResult>> *scan_results()
240       const {
241     return GetPointer<
242         const flatbuffers::Vector<flatbuffers::Offset<ScanResult>> *>(
243         VT_SCAN_RESULTS);
244   }
VerifyFLATBUFFERS_FINAL_CLASS245   bool Verify(flatbuffers::Verifier &verifier) const {
246     return VerifyTableStart(verifier) &&
247            VerifyField<flatbuffers::uoffset_t>(verifier, VT_SCAN_RESULTS) &&
248            verifier.Verify(scan_results()) &&
249            verifier.VerifyVectorOfTables(scan_results()) && verifier.EndTable();
250   }
251 };
252 
253 struct ScanResultMessageBuilder {
254   flatbuffers::FlatBufferBuilder &fbb_;
255   flatbuffers::uoffset_t start_;
add_scan_resultsScanResultMessageBuilder256   void add_scan_results(
257       flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<ScanResult>>>
258           scan_results) {
259     fbb_.AddOffset(ScanResultMessage::VT_SCAN_RESULTS, scan_results);
260   }
ScanResultMessageBuilderScanResultMessageBuilder261   ScanResultMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
262     start_ = fbb_.StartTable();
263   }
264   ScanResultMessageBuilder &operator=(const ScanResultMessageBuilder &);
FinishScanResultMessageBuilder265   flatbuffers::Offset<ScanResultMessage> Finish() {
266     const auto end = fbb_.EndTable(start_, 1);
267     auto o = flatbuffers::Offset<ScanResultMessage>(end);
268     return o;
269   }
270 };
271 
272 inline flatbuffers::Offset<ScanResultMessage> CreateScanResultMessage(
273     flatbuffers::FlatBufferBuilder &_fbb,
274     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<ScanResult>>>
275         scan_results = 0) {
276   ScanResultMessageBuilder builder_(_fbb);
277   builder_.add_scan_results(scan_results);
278   return builder_.Finish();
279 }
280 
281 inline flatbuffers::Offset<ScanResultMessage> CreateScanResultMessageDirect(
282     flatbuffers::FlatBufferBuilder &_fbb,
283     const std::vector<flatbuffers::Offset<ScanResult>> *scan_results =
284         nullptr) {
285   return wifi_offload::fbs::CreateScanResultMessage(
286       _fbb,
287       scan_results
288           ? _fbb.CreateVector<flatbuffers::Offset<ScanResult>>(*scan_results)
289           : 0);
290 }
291 
292 struct ScanParams FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
293   enum {
294     VT_SSIDS_TO_SCAN = 4,
295     VT_FREQUENCIES_TO_SCAN_MHZ = 6,
296     VT_DISCONNECTED_MODE_SCAN_INTERVAL_MS = 8
297   };
ssids_to_scanFLATBUFFERS_FINAL_CLASS298   const flatbuffers::Vector<flatbuffers::Offset<Ssid>> *ssids_to_scan() const {
299     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<Ssid>> *>(
300         VT_SSIDS_TO_SCAN);
301   }
frequencies_to_scan_mhzFLATBUFFERS_FINAL_CLASS302   const flatbuffers::Vector<uint32_t> *frequencies_to_scan_mhz() const {
303     return GetPointer<const flatbuffers::Vector<uint32_t> *>(
304         VT_FREQUENCIES_TO_SCAN_MHZ);
305   }
disconnected_mode_scan_interval_msFLATBUFFERS_FINAL_CLASS306   uint32_t disconnected_mode_scan_interval_ms() const {
307     return GetField<uint32_t>(VT_DISCONNECTED_MODE_SCAN_INTERVAL_MS, 0);
308   }
VerifyFLATBUFFERS_FINAL_CLASS309   bool Verify(flatbuffers::Verifier &verifier) const {
310     return VerifyTableStart(verifier) &&
311            VerifyField<flatbuffers::uoffset_t>(verifier, VT_SSIDS_TO_SCAN) &&
312            verifier.Verify(ssids_to_scan()) &&
313            verifier.VerifyVectorOfTables(ssids_to_scan()) &&
314            VerifyField<flatbuffers::uoffset_t>(verifier,
315                                                VT_FREQUENCIES_TO_SCAN_MHZ) &&
316            verifier.Verify(frequencies_to_scan_mhz()) &&
317            VerifyField<uint32_t>(verifier,
318                                  VT_DISCONNECTED_MODE_SCAN_INTERVAL_MS) &&
319            verifier.EndTable();
320   }
321 };
322 
323 struct ScanParamsBuilder {
324   flatbuffers::FlatBufferBuilder &fbb_;
325   flatbuffers::uoffset_t start_;
add_ssids_to_scanScanParamsBuilder326   void add_ssids_to_scan(
327       flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Ssid>>>
328           ssids_to_scan) {
329     fbb_.AddOffset(ScanParams::VT_SSIDS_TO_SCAN, ssids_to_scan);
330   }
add_frequencies_to_scan_mhzScanParamsBuilder331   void add_frequencies_to_scan_mhz(
332       flatbuffers::Offset<flatbuffers::Vector<uint32_t>>
333           frequencies_to_scan_mhz) {
334     fbb_.AddOffset(ScanParams::VT_FREQUENCIES_TO_SCAN_MHZ,
335                    frequencies_to_scan_mhz);
336   }
add_disconnected_mode_scan_interval_msScanParamsBuilder337   void add_disconnected_mode_scan_interval_ms(
338       uint32_t disconnected_mode_scan_interval_ms) {
339     fbb_.AddElement<uint32_t>(ScanParams::VT_DISCONNECTED_MODE_SCAN_INTERVAL_MS,
340                               disconnected_mode_scan_interval_ms, 0);
341   }
ScanParamsBuilderScanParamsBuilder342   ScanParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
343     start_ = fbb_.StartTable();
344   }
345   ScanParamsBuilder &operator=(const ScanParamsBuilder &);
FinishScanParamsBuilder346   flatbuffers::Offset<ScanParams> Finish() {
347     const auto end = fbb_.EndTable(start_, 3);
348     auto o = flatbuffers::Offset<ScanParams>(end);
349     return o;
350   }
351 };
352 
353 inline flatbuffers::Offset<ScanParams> CreateScanParams(
354     flatbuffers::FlatBufferBuilder &_fbb,
355     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Ssid>>>
356         ssids_to_scan = 0,
357     flatbuffers::Offset<flatbuffers::Vector<uint32_t>> frequencies_to_scan_mhz =
358         0,
359     uint32_t disconnected_mode_scan_interval_ms = 0) {
360   ScanParamsBuilder builder_(_fbb);
361   builder_.add_disconnected_mode_scan_interval_ms(
362       disconnected_mode_scan_interval_ms);
363   builder_.add_frequencies_to_scan_mhz(frequencies_to_scan_mhz);
364   builder_.add_ssids_to_scan(ssids_to_scan);
365   return builder_.Finish();
366 }
367 
368 inline flatbuffers::Offset<ScanParams> CreateScanParamsDirect(
369     flatbuffers::FlatBufferBuilder &_fbb,
370     const std::vector<flatbuffers::Offset<Ssid>> *ssids_to_scan = nullptr,
371     const std::vector<uint32_t> *frequencies_to_scan_mhz = nullptr,
372     uint32_t disconnected_mode_scan_interval_ms = 0) {
373   return wifi_offload::fbs::CreateScanParams(
374       _fbb,
375       ssids_to_scan
376           ? _fbb.CreateVector<flatbuffers::Offset<Ssid>>(*ssids_to_scan)
377           : 0,
378       frequencies_to_scan_mhz
379           ? _fbb.CreateVector<uint32_t>(*frequencies_to_scan_mhz)
380           : 0,
381       disconnected_mode_scan_interval_ms);
382 }
383 
384 struct ScanFilter FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
385   enum { VT_NETWORKS_TO_MATCH = 4, VT_MIN_RSSI_THRESHOLD_DBM = 6 };
386   const flatbuffers::Vector<flatbuffers::Offset<PreferredNetwork>>
networks_to_matchFLATBUFFERS_FINAL_CLASS387       *networks_to_match() const {
388     return GetPointer<
389         const flatbuffers::Vector<flatbuffers::Offset<PreferredNetwork>> *>(
390         VT_NETWORKS_TO_MATCH);
391   }
min_rssi_threshold_dbmFLATBUFFERS_FINAL_CLASS392   int8_t min_rssi_threshold_dbm() const {
393     return GetField<int8_t>(VT_MIN_RSSI_THRESHOLD_DBM, 0);
394   }
VerifyFLATBUFFERS_FINAL_CLASS395   bool Verify(flatbuffers::Verifier &verifier) const {
396     return VerifyTableStart(verifier) && VerifyField<flatbuffers::uoffset_t>(
397                                              verifier, VT_NETWORKS_TO_MATCH) &&
398            verifier.Verify(networks_to_match()) &&
399            verifier.VerifyVectorOfTables(networks_to_match()) &&
400            VerifyField<int8_t>(verifier, VT_MIN_RSSI_THRESHOLD_DBM) &&
401            verifier.EndTable();
402   }
403 };
404 
405 struct ScanFilterBuilder {
406   flatbuffers::FlatBufferBuilder &fbb_;
407   flatbuffers::uoffset_t start_;
add_networks_to_matchScanFilterBuilder408   void add_networks_to_match(
409       flatbuffers::Offset<
410           flatbuffers::Vector<flatbuffers::Offset<PreferredNetwork>>>
411           networks_to_match) {
412     fbb_.AddOffset(ScanFilter::VT_NETWORKS_TO_MATCH, networks_to_match);
413   }
add_min_rssi_threshold_dbmScanFilterBuilder414   void add_min_rssi_threshold_dbm(int8_t min_rssi_threshold_dbm) {
415     fbb_.AddElement<int8_t>(ScanFilter::VT_MIN_RSSI_THRESHOLD_DBM,
416                             min_rssi_threshold_dbm, 0);
417   }
ScanFilterBuilderScanFilterBuilder418   ScanFilterBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
419     start_ = fbb_.StartTable();
420   }
421   ScanFilterBuilder &operator=(const ScanFilterBuilder &);
FinishScanFilterBuilder422   flatbuffers::Offset<ScanFilter> Finish() {
423     const auto end = fbb_.EndTable(start_, 2);
424     auto o = flatbuffers::Offset<ScanFilter>(end);
425     return o;
426   }
427 };
428 
429 inline flatbuffers::Offset<ScanFilter> CreateScanFilter(
430     flatbuffers::FlatBufferBuilder &_fbb,
431     flatbuffers::Offset<
432         flatbuffers::Vector<flatbuffers::Offset<PreferredNetwork>>>
433         networks_to_match = 0,
434     int8_t min_rssi_threshold_dbm = 0) {
435   ScanFilterBuilder builder_(_fbb);
436   builder_.add_networks_to_match(networks_to_match);
437   builder_.add_min_rssi_threshold_dbm(min_rssi_threshold_dbm);
438   return builder_.Finish();
439 }
440 
441 inline flatbuffers::Offset<ScanFilter> CreateScanFilterDirect(
442     flatbuffers::FlatBufferBuilder &_fbb,
443     const std::vector<flatbuffers::Offset<PreferredNetwork>>
444         *networks_to_match = nullptr,
445     int8_t min_rssi_threshold_dbm = 0) {
446   return wifi_offload::fbs::CreateScanFilter(
447       _fbb,
448       networks_to_match
449           ? _fbb.CreateVector<flatbuffers::Offset<PreferredNetwork>>(
450                 *networks_to_match)
451           : 0,
452       min_rssi_threshold_dbm);
453 }
454 
455 struct ScanConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
456   enum { VT_SCAN_PARAMS = 4, VT_SCAN_FILTER = 6 };
scan_paramsFLATBUFFERS_FINAL_CLASS457   const ScanParams *scan_params() const {
458     return GetPointer<const ScanParams *>(VT_SCAN_PARAMS);
459   }
scan_filterFLATBUFFERS_FINAL_CLASS460   const ScanFilter *scan_filter() const {
461     return GetPointer<const ScanFilter *>(VT_SCAN_FILTER);
462   }
VerifyFLATBUFFERS_FINAL_CLASS463   bool Verify(flatbuffers::Verifier &verifier) const {
464     return VerifyTableStart(verifier) &&
465            VerifyField<flatbuffers::uoffset_t>(verifier, VT_SCAN_PARAMS) &&
466            verifier.VerifyTable(scan_params()) &&
467            VerifyField<flatbuffers::uoffset_t>(verifier, VT_SCAN_FILTER) &&
468            verifier.VerifyTable(scan_filter()) && verifier.EndTable();
469   }
470 };
471 
472 struct ScanConfigBuilder {
473   flatbuffers::FlatBufferBuilder &fbb_;
474   flatbuffers::uoffset_t start_;
add_scan_paramsScanConfigBuilder475   void add_scan_params(flatbuffers::Offset<ScanParams> scan_params) {
476     fbb_.AddOffset(ScanConfig::VT_SCAN_PARAMS, scan_params);
477   }
add_scan_filterScanConfigBuilder478   void add_scan_filter(flatbuffers::Offset<ScanFilter> scan_filter) {
479     fbb_.AddOffset(ScanConfig::VT_SCAN_FILTER, scan_filter);
480   }
ScanConfigBuilderScanConfigBuilder481   ScanConfigBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
482     start_ = fbb_.StartTable();
483   }
484   ScanConfigBuilder &operator=(const ScanConfigBuilder &);
FinishScanConfigBuilder485   flatbuffers::Offset<ScanConfig> Finish() {
486     const auto end = fbb_.EndTable(start_, 2);
487     auto o = flatbuffers::Offset<ScanConfig>(end);
488     return o;
489   }
490 };
491 
492 inline flatbuffers::Offset<ScanConfig> CreateScanConfig(
493     flatbuffers::FlatBufferBuilder &_fbb,
494     flatbuffers::Offset<ScanParams> scan_params = 0,
495     flatbuffers::Offset<ScanFilter> scan_filter = 0) {
496   ScanConfigBuilder builder_(_fbb);
497   builder_.add_scan_filter(scan_filter);
498   builder_.add_scan_params(scan_params);
499   return builder_.Finish();
500 }
501 
502 struct ScanRecord FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
503   enum {
504     VT_TIME_SPENT_SCANNING_MS = 4,
505     VT_NUM_CHANNELS_SCANNED = 6,
506     VT_NUM_ENTRIES_AGGREGATED = 8
507   };
time_spent_scanning_msFLATBUFFERS_FINAL_CLASS508   uint32_t time_spent_scanning_ms() const {
509     return GetField<uint32_t>(VT_TIME_SPENT_SCANNING_MS, 0);
510   }
num_channels_scannedFLATBUFFERS_FINAL_CLASS511   uint32_t num_channels_scanned() const {
512     return GetField<uint32_t>(VT_NUM_CHANNELS_SCANNED, 0);
513   }
num_entries_aggregatedFLATBUFFERS_FINAL_CLASS514   uint32_t num_entries_aggregated() const {
515     return GetField<uint32_t>(VT_NUM_ENTRIES_AGGREGATED, 0);
516   }
VerifyFLATBUFFERS_FINAL_CLASS517   bool Verify(flatbuffers::Verifier &verifier) const {
518     return VerifyTableStart(verifier) &&
519            VerifyField<uint32_t>(verifier, VT_TIME_SPENT_SCANNING_MS) &&
520            VerifyField<uint32_t>(verifier, VT_NUM_CHANNELS_SCANNED) &&
521            VerifyField<uint32_t>(verifier, VT_NUM_ENTRIES_AGGREGATED) &&
522            verifier.EndTable();
523   }
524 };
525 
526 struct ScanRecordBuilder {
527   flatbuffers::FlatBufferBuilder &fbb_;
528   flatbuffers::uoffset_t start_;
add_time_spent_scanning_msScanRecordBuilder529   void add_time_spent_scanning_ms(uint32_t time_spent_scanning_ms) {
530     fbb_.AddElement<uint32_t>(ScanRecord::VT_TIME_SPENT_SCANNING_MS,
531                               time_spent_scanning_ms, 0);
532   }
add_num_channels_scannedScanRecordBuilder533   void add_num_channels_scanned(uint32_t num_channels_scanned) {
534     fbb_.AddElement<uint32_t>(ScanRecord::VT_NUM_CHANNELS_SCANNED,
535                               num_channels_scanned, 0);
536   }
add_num_entries_aggregatedScanRecordBuilder537   void add_num_entries_aggregated(uint32_t num_entries_aggregated) {
538     fbb_.AddElement<uint32_t>(ScanRecord::VT_NUM_ENTRIES_AGGREGATED,
539                               num_entries_aggregated, 0);
540   }
ScanRecordBuilderScanRecordBuilder541   ScanRecordBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
542     start_ = fbb_.StartTable();
543   }
544   ScanRecordBuilder &operator=(const ScanRecordBuilder &);
FinishScanRecordBuilder545   flatbuffers::Offset<ScanRecord> Finish() {
546     const auto end = fbb_.EndTable(start_, 3);
547     auto o = flatbuffers::Offset<ScanRecord>(end);
548     return o;
549   }
550 };
551 
552 inline flatbuffers::Offset<ScanRecord> CreateScanRecord(
553     flatbuffers::FlatBufferBuilder &_fbb, uint32_t time_spent_scanning_ms = 0,
554     uint32_t num_channels_scanned = 0, uint32_t num_entries_aggregated = 0) {
555   ScanRecordBuilder builder_(_fbb);
556   builder_.add_num_entries_aggregated(num_entries_aggregated);
557   builder_.add_num_channels_scanned(num_channels_scanned);
558   builder_.add_time_spent_scanning_ms(time_spent_scanning_ms);
559   return builder_.Finish();
560 }
561 
562 struct RpcLogRecord FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
563   enum { VT_RECORD_TYPE = 4, VT_TIMESTAMP_CHRE_MS = 6 };
record_typeFLATBUFFERS_FINAL_CLASS564   uint8_t record_type() const { return GetField<uint8_t>(VT_RECORD_TYPE, 0); }
timestamp_chre_msFLATBUFFERS_FINAL_CLASS565   uint32_t timestamp_chre_ms() const {
566     return GetField<uint32_t>(VT_TIMESTAMP_CHRE_MS, 0);
567   }
VerifyFLATBUFFERS_FINAL_CLASS568   bool Verify(flatbuffers::Verifier &verifier) const {
569     return VerifyTableStart(verifier) &&
570            VerifyField<uint8_t>(verifier, VT_RECORD_TYPE) &&
571            VerifyField<uint32_t>(verifier, VT_TIMESTAMP_CHRE_MS) &&
572            verifier.EndTable();
573   }
574 };
575 
576 struct RpcLogRecordBuilder {
577   flatbuffers::FlatBufferBuilder &fbb_;
578   flatbuffers::uoffset_t start_;
add_record_typeRpcLogRecordBuilder579   void add_record_type(uint8_t record_type) {
580     fbb_.AddElement<uint8_t>(RpcLogRecord::VT_RECORD_TYPE, record_type, 0);
581   }
add_timestamp_chre_msRpcLogRecordBuilder582   void add_timestamp_chre_ms(uint32_t timestamp_chre_ms) {
583     fbb_.AddElement<uint32_t>(RpcLogRecord::VT_TIMESTAMP_CHRE_MS,
584                               timestamp_chre_ms, 0);
585   }
RpcLogRecordBuilderRpcLogRecordBuilder586   RpcLogRecordBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
587     start_ = fbb_.StartTable();
588   }
589   RpcLogRecordBuilder &operator=(const RpcLogRecordBuilder &);
FinishRpcLogRecordBuilder590   flatbuffers::Offset<RpcLogRecord> Finish() {
591     const auto end = fbb_.EndTable(start_, 2);
592     auto o = flatbuffers::Offset<RpcLogRecord>(end);
593     return o;
594   }
595 };
596 
597 inline flatbuffers::Offset<RpcLogRecord> CreateRpcLogRecord(
598     flatbuffers::FlatBufferBuilder &_fbb, uint8_t record_type = 0,
599     uint32_t timestamp_chre_ms = 0) {
600   RpcLogRecordBuilder builder_(_fbb);
601   builder_.add_timestamp_chre_ms(timestamp_chre_ms);
602   builder_.add_record_type(record_type);
603   return builder_.Finish();
604 }
605 
606 struct ScanStats FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
607   enum {
608     VT_NUM_SCANS_REQUESTED_BY_NANOAPP = 4,
609     VT_NUM_SCANS_SERVICED_BY_HARDWARE = 6,
610     VT_NUM_SCANS_SERVICED_BY_CACHE = 8,
611     VT_UPDATED_AT_CHRE_MS = 10,
612     VT_SENT_AT_CHRE_MS = 12,
613     VT_LAST_SUBSCRIPTION_DURATION_MS = 14,
614     VT_CHANNEL_SCAN_COUNT = 16,
615     VT_SCAN_RECORDS = 18,
616     VT_RPC_LOG_RECORDS = 20
617   };
num_scans_requested_by_nanoappFLATBUFFERS_FINAL_CLASS618   uint32_t num_scans_requested_by_nanoapp() const {
619     return GetField<uint32_t>(VT_NUM_SCANS_REQUESTED_BY_NANOAPP, 0);
620   }
num_scans_serviced_by_hardwareFLATBUFFERS_FINAL_CLASS621   uint32_t num_scans_serviced_by_hardware() const {
622     return GetField<uint32_t>(VT_NUM_SCANS_SERVICED_BY_HARDWARE, 0);
623   }
num_scans_serviced_by_cacheFLATBUFFERS_FINAL_CLASS624   uint32_t num_scans_serviced_by_cache() const {
625     return GetField<uint32_t>(VT_NUM_SCANS_SERVICED_BY_CACHE, 0);
626   }
updated_at_chre_msFLATBUFFERS_FINAL_CLASS627   uint32_t updated_at_chre_ms() const {
628     return GetField<uint32_t>(VT_UPDATED_AT_CHRE_MS, 0);
629   }
sent_at_chre_msFLATBUFFERS_FINAL_CLASS630   uint32_t sent_at_chre_ms() const {
631     return GetField<uint32_t>(VT_SENT_AT_CHRE_MS, 0);
632   }
last_subscription_duration_msFLATBUFFERS_FINAL_CLASS633   uint32_t last_subscription_duration_ms() const {
634     return GetField<uint32_t>(VT_LAST_SUBSCRIPTION_DURATION_MS, 0);
635   }
channel_scan_countFLATBUFFERS_FINAL_CLASS636   const flatbuffers::Vector<uint8_t> *channel_scan_count() const {
637     return GetPointer<const flatbuffers::Vector<uint8_t> *>(
638         VT_CHANNEL_SCAN_COUNT);
639   }
scan_recordsFLATBUFFERS_FINAL_CLASS640   const flatbuffers::Vector<flatbuffers::Offset<ScanRecord>> *scan_records()
641       const {
642     return GetPointer<
643         const flatbuffers::Vector<flatbuffers::Offset<ScanRecord>> *>(
644         VT_SCAN_RECORDS);
645   }
646   const flatbuffers::Vector<flatbuffers::Offset<RpcLogRecord>>
rpc_log_recordsFLATBUFFERS_FINAL_CLASS647       *rpc_log_records() const {
648     return GetPointer<
649         const flatbuffers::Vector<flatbuffers::Offset<RpcLogRecord>> *>(
650         VT_RPC_LOG_RECORDS);
651   }
VerifyFLATBUFFERS_FINAL_CLASS652   bool Verify(flatbuffers::Verifier &verifier) const {
653     return VerifyTableStart(verifier) &&
654            VerifyField<uint32_t>(verifier, VT_NUM_SCANS_REQUESTED_BY_NANOAPP) &&
655            VerifyField<uint32_t>(verifier, VT_NUM_SCANS_SERVICED_BY_HARDWARE) &&
656            VerifyField<uint32_t>(verifier, VT_NUM_SCANS_SERVICED_BY_CACHE) &&
657            VerifyField<uint32_t>(verifier, VT_UPDATED_AT_CHRE_MS) &&
658            VerifyField<uint32_t>(verifier, VT_SENT_AT_CHRE_MS) &&
659            VerifyField<uint32_t>(verifier, VT_LAST_SUBSCRIPTION_DURATION_MS) &&
660            VerifyField<flatbuffers::uoffset_t>(verifier,
661                                                VT_CHANNEL_SCAN_COUNT) &&
662            verifier.Verify(channel_scan_count()) &&
663            VerifyField<flatbuffers::uoffset_t>(verifier, VT_SCAN_RECORDS) &&
664            verifier.Verify(scan_records()) &&
665            verifier.VerifyVectorOfTables(scan_records()) &&
666            VerifyField<flatbuffers::uoffset_t>(verifier, VT_RPC_LOG_RECORDS) &&
667            verifier.Verify(rpc_log_records()) &&
668            verifier.VerifyVectorOfTables(rpc_log_records()) &&
669            verifier.EndTable();
670   }
671 };
672 
673 struct ScanStatsBuilder {
674   flatbuffers::FlatBufferBuilder &fbb_;
675   flatbuffers::uoffset_t start_;
add_num_scans_requested_by_nanoappScanStatsBuilder676   void add_num_scans_requested_by_nanoapp(
677       uint32_t num_scans_requested_by_nanoapp) {
678     fbb_.AddElement<uint32_t>(ScanStats::VT_NUM_SCANS_REQUESTED_BY_NANOAPP,
679                               num_scans_requested_by_nanoapp, 0);
680   }
add_num_scans_serviced_by_hardwareScanStatsBuilder681   void add_num_scans_serviced_by_hardware(
682       uint32_t num_scans_serviced_by_hardware) {
683     fbb_.AddElement<uint32_t>(ScanStats::VT_NUM_SCANS_SERVICED_BY_HARDWARE,
684                               num_scans_serviced_by_hardware, 0);
685   }
add_num_scans_serviced_by_cacheScanStatsBuilder686   void add_num_scans_serviced_by_cache(uint32_t num_scans_serviced_by_cache) {
687     fbb_.AddElement<uint32_t>(ScanStats::VT_NUM_SCANS_SERVICED_BY_CACHE,
688                               num_scans_serviced_by_cache, 0);
689   }
add_updated_at_chre_msScanStatsBuilder690   void add_updated_at_chre_ms(uint32_t updated_at_chre_ms) {
691     fbb_.AddElement<uint32_t>(ScanStats::VT_UPDATED_AT_CHRE_MS,
692                               updated_at_chre_ms, 0);
693   }
add_sent_at_chre_msScanStatsBuilder694   void add_sent_at_chre_ms(uint32_t sent_at_chre_ms) {
695     fbb_.AddElement<uint32_t>(ScanStats::VT_SENT_AT_CHRE_MS, sent_at_chre_ms,
696                               0);
697   }
add_last_subscription_duration_msScanStatsBuilder698   void add_last_subscription_duration_ms(
699       uint32_t last_subscription_duration_ms) {
700     fbb_.AddElement<uint32_t>(ScanStats::VT_LAST_SUBSCRIPTION_DURATION_MS,
701                               last_subscription_duration_ms, 0);
702   }
add_channel_scan_countScanStatsBuilder703   void add_channel_scan_count(
704       flatbuffers::Offset<flatbuffers::Vector<uint8_t>> channel_scan_count) {
705     fbb_.AddOffset(ScanStats::VT_CHANNEL_SCAN_COUNT, channel_scan_count);
706   }
add_scan_recordsScanStatsBuilder707   void add_scan_records(
708       flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<ScanRecord>>>
709           scan_records) {
710     fbb_.AddOffset(ScanStats::VT_SCAN_RECORDS, scan_records);
711   }
add_rpc_log_recordsScanStatsBuilder712   void add_rpc_log_records(
713       flatbuffers::Offset<
714           flatbuffers::Vector<flatbuffers::Offset<RpcLogRecord>>>
715           rpc_log_records) {
716     fbb_.AddOffset(ScanStats::VT_RPC_LOG_RECORDS, rpc_log_records);
717   }
ScanStatsBuilderScanStatsBuilder718   ScanStatsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
719     start_ = fbb_.StartTable();
720   }
721   ScanStatsBuilder &operator=(const ScanStatsBuilder &);
FinishScanStatsBuilder722   flatbuffers::Offset<ScanStats> Finish() {
723     const auto end = fbb_.EndTable(start_, 9);
724     auto o = flatbuffers::Offset<ScanStats>(end);
725     return o;
726   }
727 };
728 
729 inline flatbuffers::Offset<ScanStats> CreateScanStats(
730     flatbuffers::FlatBufferBuilder &_fbb,
731     uint32_t num_scans_requested_by_nanoapp = 0,
732     uint32_t num_scans_serviced_by_hardware = 0,
733     uint32_t num_scans_serviced_by_cache = 0, uint32_t updated_at_chre_ms = 0,
734     uint32_t sent_at_chre_ms = 0, uint32_t last_subscription_duration_ms = 0,
735     flatbuffers::Offset<flatbuffers::Vector<uint8_t>> channel_scan_count = 0,
736     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<ScanRecord>>>
737         scan_records = 0,
738     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<RpcLogRecord>>>
739         rpc_log_records = 0) {
740   ScanStatsBuilder builder_(_fbb);
741   builder_.add_rpc_log_records(rpc_log_records);
742   builder_.add_scan_records(scan_records);
743   builder_.add_channel_scan_count(channel_scan_count);
744   builder_.add_last_subscription_duration_ms(last_subscription_duration_ms);
745   builder_.add_sent_at_chre_ms(sent_at_chre_ms);
746   builder_.add_updated_at_chre_ms(updated_at_chre_ms);
747   builder_.add_num_scans_serviced_by_cache(num_scans_serviced_by_cache);
748   builder_.add_num_scans_serviced_by_hardware(num_scans_serviced_by_hardware);
749   builder_.add_num_scans_requested_by_nanoapp(num_scans_requested_by_nanoapp);
750   return builder_.Finish();
751 }
752 
753 inline flatbuffers::Offset<ScanStats> CreateScanStatsDirect(
754     flatbuffers::FlatBufferBuilder &_fbb,
755     uint32_t num_scans_requested_by_nanoapp = 0,
756     uint32_t num_scans_serviced_by_hardware = 0,
757     uint32_t num_scans_serviced_by_cache = 0, uint32_t updated_at_chre_ms = 0,
758     uint32_t sent_at_chre_ms = 0, uint32_t last_subscription_duration_ms = 0,
759     const std::vector<uint8_t> *channel_scan_count = nullptr,
760     const std::vector<flatbuffers::Offset<ScanRecord>> *scan_records = nullptr,
761     const std::vector<flatbuffers::Offset<RpcLogRecord>> *rpc_log_records =
762         nullptr) {
763   return wifi_offload::fbs::CreateScanStats(
764       _fbb, num_scans_requested_by_nanoapp, num_scans_serviced_by_hardware,
765       num_scans_serviced_by_cache, updated_at_chre_ms, sent_at_chre_ms,
766       last_subscription_duration_ms,
767       channel_scan_count ? _fbb.CreateVector<uint8_t>(*channel_scan_count) : 0,
768       scan_records
769           ? _fbb.CreateVector<flatbuffers::Offset<ScanRecord>>(*scan_records)
770           : 0,
771       rpc_log_records
772           ? _fbb.CreateVector<flatbuffers::Offset<RpcLogRecord>>(
773                 *rpc_log_records)
774           : 0);
775 }
776 
777 }  // namespace fbs
778 }  // namespace wifi_offload
779 
780 #endif  // FLATBUFFERS_GENERATED_FLATBUFFERSTYPES_WIFI_OFFLOAD_FBS_H_
781