1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 4 #ifndef FLATBUFFERS_GENERATED_FLATBUFFERSTYPES_WIFI_OFFLOAD_FBS_H_ 5 #define FLATBUFFERS_GENERATED_FLATBUFFERSTYPES_WIFI_OFFLOAD_FBS_H_ 6 7 #include "flatbuffers/flatbuffers.h" 8 9 namespace wifi_offload { 10 namespace fbs { 11 12 struct Ssid; 13 struct SsidBuilder; 14 15 struct PreferredNetwork; 16 struct PreferredNetworkBuilder; 17 18 struct ScanResult; 19 struct ScanResultBuilder; 20 21 struct ScanResultMessage; 22 struct ScanResultMessageBuilder; 23 24 struct ScanParams; 25 struct ScanParamsBuilder; 26 27 struct ScanFilter; 28 struct ScanFilterBuilder; 29 30 struct ScanConfig; 31 struct ScanConfigBuilder; 32 33 struct ScanRecord; 34 struct ScanRecordBuilder; 35 36 struct RpcLogRecord; 37 struct RpcLogRecordBuilder; 38 39 struct ScanStats; 40 struct ScanStatsBuilder; 41 42 struct Ssid FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 43 typedef SsidBuilder Builder; 44 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 45 VT_SSID = 4 46 }; ssidFLATBUFFERS_FINAL_CLASS47 const flatbuffers::Vector<uint8_t> *ssid() const { 48 return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_SSID); 49 } VerifyFLATBUFFERS_FINAL_CLASS50 bool Verify(flatbuffers::Verifier &verifier) const { 51 return VerifyTableStart(verifier) && 52 VerifyOffset(verifier, VT_SSID) && 53 verifier.VerifyVector(ssid()) && 54 verifier.EndTable(); 55 } 56 }; 57 58 struct SsidBuilder { 59 typedef Ssid Table; 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 explicit SsidBuilder(flatbuffers::FlatBufferBuilder &_fbb) 66 : fbb_(_fbb) { 67 start_ = fbb_.StartTable(); 68 } 69 SsidBuilder &operator=(const SsidBuilder &); FinishSsidBuilder70 flatbuffers::Offset<Ssid> Finish() { 71 const auto end = fbb_.EndTable(start_); 72 auto o = flatbuffers::Offset<Ssid>(end); 73 return o; 74 } 75 }; 76 77 inline flatbuffers::Offset<Ssid> CreateSsid( 78 flatbuffers::FlatBufferBuilder &_fbb, 79 flatbuffers::Offset<flatbuffers::Vector<uint8_t>> ssid = 0) { 80 SsidBuilder builder_(_fbb); 81 builder_.add_ssid(ssid); 82 return builder_.Finish(); 83 } 84 85 inline flatbuffers::Offset<Ssid> CreateSsidDirect( 86 flatbuffers::FlatBufferBuilder &_fbb, 87 const std::vector<uint8_t> *ssid = nullptr) { 88 auto ssid__ = ssid ? _fbb.CreateVector<uint8_t>(*ssid) : 0; 89 return wifi_offload::fbs::CreateSsid( 90 _fbb, 91 ssid__); 92 } 93 94 struct PreferredNetwork FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 95 typedef PreferredNetworkBuilder Builder; 96 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 97 VT_SSID = 4, 98 VT_SECURITY_MODES = 6 99 }; ssidFLATBUFFERS_FINAL_CLASS100 const wifi_offload::fbs::Ssid *ssid() const { 101 return GetPointer<const wifi_offload::fbs::Ssid *>(VT_SSID); 102 } security_modesFLATBUFFERS_FINAL_CLASS103 uint8_t security_modes() const { 104 return GetField<uint8_t>(VT_SECURITY_MODES, 0); 105 } VerifyFLATBUFFERS_FINAL_CLASS106 bool Verify(flatbuffers::Verifier &verifier) const { 107 return VerifyTableStart(verifier) && 108 VerifyOffset(verifier, VT_SSID) && 109 verifier.VerifyTable(ssid()) && 110 VerifyField<uint8_t>(verifier, VT_SECURITY_MODES) && 111 verifier.EndTable(); 112 } 113 }; 114 115 struct PreferredNetworkBuilder { 116 typedef PreferredNetwork Table; 117 flatbuffers::FlatBufferBuilder &fbb_; 118 flatbuffers::uoffset_t start_; add_ssidPreferredNetworkBuilder119 void add_ssid(flatbuffers::Offset<wifi_offload::fbs::Ssid> ssid) { 120 fbb_.AddOffset(PreferredNetwork::VT_SSID, ssid); 121 } add_security_modesPreferredNetworkBuilder122 void add_security_modes(uint8_t security_modes) { 123 fbb_.AddElement<uint8_t>(PreferredNetwork::VT_SECURITY_MODES, security_modes, 0); 124 } PreferredNetworkBuilderPreferredNetworkBuilder125 explicit PreferredNetworkBuilder(flatbuffers::FlatBufferBuilder &_fbb) 126 : fbb_(_fbb) { 127 start_ = fbb_.StartTable(); 128 } 129 PreferredNetworkBuilder &operator=(const PreferredNetworkBuilder &); FinishPreferredNetworkBuilder130 flatbuffers::Offset<PreferredNetwork> Finish() { 131 const auto end = fbb_.EndTable(start_); 132 auto o = flatbuffers::Offset<PreferredNetwork>(end); 133 return o; 134 } 135 }; 136 137 inline flatbuffers::Offset<PreferredNetwork> CreatePreferredNetwork( 138 flatbuffers::FlatBufferBuilder &_fbb, 139 flatbuffers::Offset<wifi_offload::fbs::Ssid> ssid = 0, 140 uint8_t security_modes = 0) { 141 PreferredNetworkBuilder builder_(_fbb); 142 builder_.add_ssid(ssid); 143 builder_.add_security_modes(security_modes); 144 return builder_.Finish(); 145 } 146 147 struct ScanResult FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 148 typedef ScanResultBuilder Builder; 149 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 150 VT_SSID = 4, 151 VT_SECURITY_MODES = 6, 152 VT_BSSID = 8, 153 VT_CAPABILITY = 10, 154 VT_FREQUENCY_SCANNED_MHZ = 12, 155 VT_RSSI_DBM = 14, 156 VT_TSF = 16 157 }; ssidFLATBUFFERS_FINAL_CLASS158 const wifi_offload::fbs::Ssid *ssid() const { 159 return GetPointer<const wifi_offload::fbs::Ssid *>(VT_SSID); 160 } security_modesFLATBUFFERS_FINAL_CLASS161 uint8_t security_modes() const { 162 return GetField<uint8_t>(VT_SECURITY_MODES, 0); 163 } bssidFLATBUFFERS_FINAL_CLASS164 const flatbuffers::Vector<uint8_t> *bssid() const { 165 return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_BSSID); 166 } capabilityFLATBUFFERS_FINAL_CLASS167 uint16_t capability() const { 168 return GetField<uint16_t>(VT_CAPABILITY, 0); 169 } frequency_scanned_mhzFLATBUFFERS_FINAL_CLASS170 uint32_t frequency_scanned_mhz() const { 171 return GetField<uint32_t>(VT_FREQUENCY_SCANNED_MHZ, 0); 172 } rssi_dbmFLATBUFFERS_FINAL_CLASS173 int8_t rssi_dbm() const { 174 return GetField<int8_t>(VT_RSSI_DBM, 0); 175 } tsfFLATBUFFERS_FINAL_CLASS176 uint64_t tsf() const { 177 return GetField<uint64_t>(VT_TSF, 0); 178 } VerifyFLATBUFFERS_FINAL_CLASS179 bool Verify(flatbuffers::Verifier &verifier) const { 180 return VerifyTableStart(verifier) && 181 VerifyOffset(verifier, VT_SSID) && 182 verifier.VerifyTable(ssid()) && 183 VerifyField<uint8_t>(verifier, VT_SECURITY_MODES) && 184 VerifyOffset(verifier, VT_BSSID) && 185 verifier.VerifyVector(bssid()) && 186 VerifyField<uint16_t>(verifier, VT_CAPABILITY) && 187 VerifyField<uint32_t>(verifier, VT_FREQUENCY_SCANNED_MHZ) && 188 VerifyField<int8_t>(verifier, VT_RSSI_DBM) && 189 VerifyField<uint64_t>(verifier, VT_TSF) && 190 verifier.EndTable(); 191 } 192 }; 193 194 struct ScanResultBuilder { 195 typedef ScanResult Table; 196 flatbuffers::FlatBufferBuilder &fbb_; 197 flatbuffers::uoffset_t start_; add_ssidScanResultBuilder198 void add_ssid(flatbuffers::Offset<wifi_offload::fbs::Ssid> ssid) { 199 fbb_.AddOffset(ScanResult::VT_SSID, ssid); 200 } add_security_modesScanResultBuilder201 void add_security_modes(uint8_t security_modes) { 202 fbb_.AddElement<uint8_t>(ScanResult::VT_SECURITY_MODES, security_modes, 0); 203 } add_bssidScanResultBuilder204 void add_bssid(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> bssid) { 205 fbb_.AddOffset(ScanResult::VT_BSSID, bssid); 206 } add_capabilityScanResultBuilder207 void add_capability(uint16_t capability) { 208 fbb_.AddElement<uint16_t>(ScanResult::VT_CAPABILITY, capability, 0); 209 } add_frequency_scanned_mhzScanResultBuilder210 void add_frequency_scanned_mhz(uint32_t frequency_scanned_mhz) { 211 fbb_.AddElement<uint32_t>(ScanResult::VT_FREQUENCY_SCANNED_MHZ, frequency_scanned_mhz, 0); 212 } add_rssi_dbmScanResultBuilder213 void add_rssi_dbm(int8_t rssi_dbm) { 214 fbb_.AddElement<int8_t>(ScanResult::VT_RSSI_DBM, rssi_dbm, 0); 215 } add_tsfScanResultBuilder216 void add_tsf(uint64_t tsf) { 217 fbb_.AddElement<uint64_t>(ScanResult::VT_TSF, tsf, 0); 218 } ScanResultBuilderScanResultBuilder219 explicit ScanResultBuilder(flatbuffers::FlatBufferBuilder &_fbb) 220 : fbb_(_fbb) { 221 start_ = fbb_.StartTable(); 222 } 223 ScanResultBuilder &operator=(const ScanResultBuilder &); FinishScanResultBuilder224 flatbuffers::Offset<ScanResult> Finish() { 225 const auto end = fbb_.EndTable(start_); 226 auto o = flatbuffers::Offset<ScanResult>(end); 227 return o; 228 } 229 }; 230 231 inline flatbuffers::Offset<ScanResult> CreateScanResult( 232 flatbuffers::FlatBufferBuilder &_fbb, 233 flatbuffers::Offset<wifi_offload::fbs::Ssid> ssid = 0, 234 uint8_t security_modes = 0, 235 flatbuffers::Offset<flatbuffers::Vector<uint8_t>> bssid = 0, 236 uint16_t capability = 0, 237 uint32_t frequency_scanned_mhz = 0, 238 int8_t rssi_dbm = 0, 239 uint64_t tsf = 0) { 240 ScanResultBuilder builder_(_fbb); 241 builder_.add_tsf(tsf); 242 builder_.add_frequency_scanned_mhz(frequency_scanned_mhz); 243 builder_.add_bssid(bssid); 244 builder_.add_ssid(ssid); 245 builder_.add_capability(capability); 246 builder_.add_rssi_dbm(rssi_dbm); 247 builder_.add_security_modes(security_modes); 248 return builder_.Finish(); 249 } 250 251 inline flatbuffers::Offset<ScanResult> CreateScanResultDirect( 252 flatbuffers::FlatBufferBuilder &_fbb, 253 flatbuffers::Offset<wifi_offload::fbs::Ssid> ssid = 0, 254 uint8_t security_modes = 0, 255 const std::vector<uint8_t> *bssid = nullptr, 256 uint16_t capability = 0, 257 uint32_t frequency_scanned_mhz = 0, 258 int8_t rssi_dbm = 0, 259 uint64_t tsf = 0) { 260 auto bssid__ = bssid ? _fbb.CreateVector<uint8_t>(*bssid) : 0; 261 return wifi_offload::fbs::CreateScanResult( 262 _fbb, 263 ssid, 264 security_modes, 265 bssid__, 266 capability, 267 frequency_scanned_mhz, 268 rssi_dbm, 269 tsf); 270 } 271 272 struct ScanResultMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 273 typedef ScanResultMessageBuilder Builder; 274 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 275 VT_SCAN_RESULTS = 4 276 }; scan_resultsFLATBUFFERS_FINAL_CLASS277 const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::ScanResult>> *scan_results() const { 278 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::ScanResult>> *>(VT_SCAN_RESULTS); 279 } VerifyFLATBUFFERS_FINAL_CLASS280 bool Verify(flatbuffers::Verifier &verifier) const { 281 return VerifyTableStart(verifier) && 282 VerifyOffset(verifier, VT_SCAN_RESULTS) && 283 verifier.VerifyVector(scan_results()) && 284 verifier.VerifyVectorOfTables(scan_results()) && 285 verifier.EndTable(); 286 } 287 }; 288 289 struct ScanResultMessageBuilder { 290 typedef ScanResultMessage Table; 291 flatbuffers::FlatBufferBuilder &fbb_; 292 flatbuffers::uoffset_t start_; add_scan_resultsScanResultMessageBuilder293 void add_scan_results(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::ScanResult>>> scan_results) { 294 fbb_.AddOffset(ScanResultMessage::VT_SCAN_RESULTS, scan_results); 295 } ScanResultMessageBuilderScanResultMessageBuilder296 explicit ScanResultMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb) 297 : fbb_(_fbb) { 298 start_ = fbb_.StartTable(); 299 } 300 ScanResultMessageBuilder &operator=(const ScanResultMessageBuilder &); FinishScanResultMessageBuilder301 flatbuffers::Offset<ScanResultMessage> Finish() { 302 const auto end = fbb_.EndTable(start_); 303 auto o = flatbuffers::Offset<ScanResultMessage>(end); 304 return o; 305 } 306 }; 307 308 inline flatbuffers::Offset<ScanResultMessage> CreateScanResultMessage( 309 flatbuffers::FlatBufferBuilder &_fbb, 310 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::ScanResult>>> scan_results = 0) { 311 ScanResultMessageBuilder builder_(_fbb); 312 builder_.add_scan_results(scan_results); 313 return builder_.Finish(); 314 } 315 316 inline flatbuffers::Offset<ScanResultMessage> CreateScanResultMessageDirect( 317 flatbuffers::FlatBufferBuilder &_fbb, 318 const std::vector<flatbuffers::Offset<wifi_offload::fbs::ScanResult>> *scan_results = nullptr) { 319 auto scan_results__ = scan_results ? _fbb.CreateVector<flatbuffers::Offset<wifi_offload::fbs::ScanResult>>(*scan_results) : 0; 320 return wifi_offload::fbs::CreateScanResultMessage( 321 _fbb, 322 scan_results__); 323 } 324 325 struct ScanParams FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 326 typedef ScanParamsBuilder Builder; 327 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 328 VT_SSIDS_TO_SCAN = 4, 329 VT_FREQUENCIES_TO_SCAN_MHZ = 6, 330 VT_DISCONNECTED_MODE_SCAN_INTERVAL_MS = 8 331 }; ssids_to_scanFLATBUFFERS_FINAL_CLASS332 const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::Ssid>> *ssids_to_scan() const { 333 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::Ssid>> *>(VT_SSIDS_TO_SCAN); 334 } frequencies_to_scan_mhzFLATBUFFERS_FINAL_CLASS335 const flatbuffers::Vector<uint32_t> *frequencies_to_scan_mhz() const { 336 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_FREQUENCIES_TO_SCAN_MHZ); 337 } disconnected_mode_scan_interval_msFLATBUFFERS_FINAL_CLASS338 uint32_t disconnected_mode_scan_interval_ms() const { 339 return GetField<uint32_t>(VT_DISCONNECTED_MODE_SCAN_INTERVAL_MS, 0); 340 } VerifyFLATBUFFERS_FINAL_CLASS341 bool Verify(flatbuffers::Verifier &verifier) const { 342 return VerifyTableStart(verifier) && 343 VerifyOffset(verifier, VT_SSIDS_TO_SCAN) && 344 verifier.VerifyVector(ssids_to_scan()) && 345 verifier.VerifyVectorOfTables(ssids_to_scan()) && 346 VerifyOffset(verifier, VT_FREQUENCIES_TO_SCAN_MHZ) && 347 verifier.VerifyVector(frequencies_to_scan_mhz()) && 348 VerifyField<uint32_t>(verifier, VT_DISCONNECTED_MODE_SCAN_INTERVAL_MS) && 349 verifier.EndTable(); 350 } 351 }; 352 353 struct ScanParamsBuilder { 354 typedef ScanParams Table; 355 flatbuffers::FlatBufferBuilder &fbb_; 356 flatbuffers::uoffset_t start_; add_ssids_to_scanScanParamsBuilder357 void add_ssids_to_scan(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::Ssid>>> ssids_to_scan) { 358 fbb_.AddOffset(ScanParams::VT_SSIDS_TO_SCAN, ssids_to_scan); 359 } add_frequencies_to_scan_mhzScanParamsBuilder360 void add_frequencies_to_scan_mhz(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> frequencies_to_scan_mhz) { 361 fbb_.AddOffset(ScanParams::VT_FREQUENCIES_TO_SCAN_MHZ, frequencies_to_scan_mhz); 362 } add_disconnected_mode_scan_interval_msScanParamsBuilder363 void add_disconnected_mode_scan_interval_ms(uint32_t disconnected_mode_scan_interval_ms) { 364 fbb_.AddElement<uint32_t>(ScanParams::VT_DISCONNECTED_MODE_SCAN_INTERVAL_MS, disconnected_mode_scan_interval_ms, 0); 365 } ScanParamsBuilderScanParamsBuilder366 explicit ScanParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb) 367 : fbb_(_fbb) { 368 start_ = fbb_.StartTable(); 369 } 370 ScanParamsBuilder &operator=(const ScanParamsBuilder &); FinishScanParamsBuilder371 flatbuffers::Offset<ScanParams> Finish() { 372 const auto end = fbb_.EndTable(start_); 373 auto o = flatbuffers::Offset<ScanParams>(end); 374 return o; 375 } 376 }; 377 378 inline flatbuffers::Offset<ScanParams> CreateScanParams( 379 flatbuffers::FlatBufferBuilder &_fbb, 380 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::Ssid>>> ssids_to_scan = 0, 381 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> frequencies_to_scan_mhz = 0, 382 uint32_t disconnected_mode_scan_interval_ms = 0) { 383 ScanParamsBuilder builder_(_fbb); 384 builder_.add_disconnected_mode_scan_interval_ms(disconnected_mode_scan_interval_ms); 385 builder_.add_frequencies_to_scan_mhz(frequencies_to_scan_mhz); 386 builder_.add_ssids_to_scan(ssids_to_scan); 387 return builder_.Finish(); 388 } 389 390 inline flatbuffers::Offset<ScanParams> CreateScanParamsDirect( 391 flatbuffers::FlatBufferBuilder &_fbb, 392 const std::vector<flatbuffers::Offset<wifi_offload::fbs::Ssid>> *ssids_to_scan = nullptr, 393 const std::vector<uint32_t> *frequencies_to_scan_mhz = nullptr, 394 uint32_t disconnected_mode_scan_interval_ms = 0) { 395 auto ssids_to_scan__ = ssids_to_scan ? _fbb.CreateVector<flatbuffers::Offset<wifi_offload::fbs::Ssid>>(*ssids_to_scan) : 0; 396 auto frequencies_to_scan_mhz__ = frequencies_to_scan_mhz ? _fbb.CreateVector<uint32_t>(*frequencies_to_scan_mhz) : 0; 397 return wifi_offload::fbs::CreateScanParams( 398 _fbb, 399 ssids_to_scan__, 400 frequencies_to_scan_mhz__, 401 disconnected_mode_scan_interval_ms); 402 } 403 404 struct ScanFilter FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 405 typedef ScanFilterBuilder Builder; 406 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 407 VT_NETWORKS_TO_MATCH = 4, 408 VT_MIN_RSSI_THRESHOLD_DBM = 6 409 }; networks_to_matchFLATBUFFERS_FINAL_CLASS410 const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::PreferredNetwork>> *networks_to_match() const { 411 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::PreferredNetwork>> *>(VT_NETWORKS_TO_MATCH); 412 } min_rssi_threshold_dbmFLATBUFFERS_FINAL_CLASS413 int8_t min_rssi_threshold_dbm() const { 414 return GetField<int8_t>(VT_MIN_RSSI_THRESHOLD_DBM, 0); 415 } VerifyFLATBUFFERS_FINAL_CLASS416 bool Verify(flatbuffers::Verifier &verifier) const { 417 return VerifyTableStart(verifier) && 418 VerifyOffset(verifier, VT_NETWORKS_TO_MATCH) && 419 verifier.VerifyVector(networks_to_match()) && 420 verifier.VerifyVectorOfTables(networks_to_match()) && 421 VerifyField<int8_t>(verifier, VT_MIN_RSSI_THRESHOLD_DBM) && 422 verifier.EndTable(); 423 } 424 }; 425 426 struct ScanFilterBuilder { 427 typedef ScanFilter Table; 428 flatbuffers::FlatBufferBuilder &fbb_; 429 flatbuffers::uoffset_t start_; add_networks_to_matchScanFilterBuilder430 void add_networks_to_match(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::PreferredNetwork>>> networks_to_match) { 431 fbb_.AddOffset(ScanFilter::VT_NETWORKS_TO_MATCH, networks_to_match); 432 } add_min_rssi_threshold_dbmScanFilterBuilder433 void add_min_rssi_threshold_dbm(int8_t min_rssi_threshold_dbm) { 434 fbb_.AddElement<int8_t>(ScanFilter::VT_MIN_RSSI_THRESHOLD_DBM, min_rssi_threshold_dbm, 0); 435 } ScanFilterBuilderScanFilterBuilder436 explicit ScanFilterBuilder(flatbuffers::FlatBufferBuilder &_fbb) 437 : fbb_(_fbb) { 438 start_ = fbb_.StartTable(); 439 } 440 ScanFilterBuilder &operator=(const ScanFilterBuilder &); FinishScanFilterBuilder441 flatbuffers::Offset<ScanFilter> Finish() { 442 const auto end = fbb_.EndTable(start_); 443 auto o = flatbuffers::Offset<ScanFilter>(end); 444 return o; 445 } 446 }; 447 448 inline flatbuffers::Offset<ScanFilter> CreateScanFilter( 449 flatbuffers::FlatBufferBuilder &_fbb, 450 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::PreferredNetwork>>> networks_to_match = 0, 451 int8_t min_rssi_threshold_dbm = 0) { 452 ScanFilterBuilder builder_(_fbb); 453 builder_.add_networks_to_match(networks_to_match); 454 builder_.add_min_rssi_threshold_dbm(min_rssi_threshold_dbm); 455 return builder_.Finish(); 456 } 457 458 inline flatbuffers::Offset<ScanFilter> CreateScanFilterDirect( 459 flatbuffers::FlatBufferBuilder &_fbb, 460 const std::vector<flatbuffers::Offset<wifi_offload::fbs::PreferredNetwork>> *networks_to_match = nullptr, 461 int8_t min_rssi_threshold_dbm = 0) { 462 auto networks_to_match__ = networks_to_match ? _fbb.CreateVector<flatbuffers::Offset<wifi_offload::fbs::PreferredNetwork>>(*networks_to_match) : 0; 463 return wifi_offload::fbs::CreateScanFilter( 464 _fbb, 465 networks_to_match__, 466 min_rssi_threshold_dbm); 467 } 468 469 struct ScanConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 470 typedef ScanConfigBuilder Builder; 471 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 472 VT_SCAN_PARAMS = 4, 473 VT_SCAN_FILTER = 6 474 }; scan_paramsFLATBUFFERS_FINAL_CLASS475 const wifi_offload::fbs::ScanParams *scan_params() const { 476 return GetPointer<const wifi_offload::fbs::ScanParams *>(VT_SCAN_PARAMS); 477 } scan_filterFLATBUFFERS_FINAL_CLASS478 const wifi_offload::fbs::ScanFilter *scan_filter() const { 479 return GetPointer<const wifi_offload::fbs::ScanFilter *>(VT_SCAN_FILTER); 480 } VerifyFLATBUFFERS_FINAL_CLASS481 bool Verify(flatbuffers::Verifier &verifier) const { 482 return VerifyTableStart(verifier) && 483 VerifyOffset(verifier, VT_SCAN_PARAMS) && 484 verifier.VerifyTable(scan_params()) && 485 VerifyOffset(verifier, VT_SCAN_FILTER) && 486 verifier.VerifyTable(scan_filter()) && 487 verifier.EndTable(); 488 } 489 }; 490 491 struct ScanConfigBuilder { 492 typedef ScanConfig Table; 493 flatbuffers::FlatBufferBuilder &fbb_; 494 flatbuffers::uoffset_t start_; add_scan_paramsScanConfigBuilder495 void add_scan_params(flatbuffers::Offset<wifi_offload::fbs::ScanParams> scan_params) { 496 fbb_.AddOffset(ScanConfig::VT_SCAN_PARAMS, scan_params); 497 } add_scan_filterScanConfigBuilder498 void add_scan_filter(flatbuffers::Offset<wifi_offload::fbs::ScanFilter> scan_filter) { 499 fbb_.AddOffset(ScanConfig::VT_SCAN_FILTER, scan_filter); 500 } ScanConfigBuilderScanConfigBuilder501 explicit ScanConfigBuilder(flatbuffers::FlatBufferBuilder &_fbb) 502 : fbb_(_fbb) { 503 start_ = fbb_.StartTable(); 504 } 505 ScanConfigBuilder &operator=(const ScanConfigBuilder &); FinishScanConfigBuilder506 flatbuffers::Offset<ScanConfig> Finish() { 507 const auto end = fbb_.EndTable(start_); 508 auto o = flatbuffers::Offset<ScanConfig>(end); 509 return o; 510 } 511 }; 512 513 inline flatbuffers::Offset<ScanConfig> CreateScanConfig( 514 flatbuffers::FlatBufferBuilder &_fbb, 515 flatbuffers::Offset<wifi_offload::fbs::ScanParams> scan_params = 0, 516 flatbuffers::Offset<wifi_offload::fbs::ScanFilter> scan_filter = 0) { 517 ScanConfigBuilder builder_(_fbb); 518 builder_.add_scan_filter(scan_filter); 519 builder_.add_scan_params(scan_params); 520 return builder_.Finish(); 521 } 522 523 struct ScanRecord FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 524 typedef ScanRecordBuilder Builder; 525 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 526 VT_TIME_SPENT_SCANNING_MS = 4, 527 VT_NUM_CHANNELS_SCANNED = 6, 528 VT_NUM_ENTRIES_AGGREGATED = 8 529 }; time_spent_scanning_msFLATBUFFERS_FINAL_CLASS530 uint32_t time_spent_scanning_ms() const { 531 return GetField<uint32_t>(VT_TIME_SPENT_SCANNING_MS, 0); 532 } num_channels_scannedFLATBUFFERS_FINAL_CLASS533 uint32_t num_channels_scanned() const { 534 return GetField<uint32_t>(VT_NUM_CHANNELS_SCANNED, 0); 535 } num_entries_aggregatedFLATBUFFERS_FINAL_CLASS536 uint32_t num_entries_aggregated() const { 537 return GetField<uint32_t>(VT_NUM_ENTRIES_AGGREGATED, 0); 538 } VerifyFLATBUFFERS_FINAL_CLASS539 bool Verify(flatbuffers::Verifier &verifier) const { 540 return VerifyTableStart(verifier) && 541 VerifyField<uint32_t>(verifier, VT_TIME_SPENT_SCANNING_MS) && 542 VerifyField<uint32_t>(verifier, VT_NUM_CHANNELS_SCANNED) && 543 VerifyField<uint32_t>(verifier, VT_NUM_ENTRIES_AGGREGATED) && 544 verifier.EndTable(); 545 } 546 }; 547 548 struct ScanRecordBuilder { 549 typedef ScanRecord Table; 550 flatbuffers::FlatBufferBuilder &fbb_; 551 flatbuffers::uoffset_t start_; add_time_spent_scanning_msScanRecordBuilder552 void add_time_spent_scanning_ms(uint32_t time_spent_scanning_ms) { 553 fbb_.AddElement<uint32_t>(ScanRecord::VT_TIME_SPENT_SCANNING_MS, time_spent_scanning_ms, 0); 554 } add_num_channels_scannedScanRecordBuilder555 void add_num_channels_scanned(uint32_t num_channels_scanned) { 556 fbb_.AddElement<uint32_t>(ScanRecord::VT_NUM_CHANNELS_SCANNED, num_channels_scanned, 0); 557 } add_num_entries_aggregatedScanRecordBuilder558 void add_num_entries_aggregated(uint32_t num_entries_aggregated) { 559 fbb_.AddElement<uint32_t>(ScanRecord::VT_NUM_ENTRIES_AGGREGATED, num_entries_aggregated, 0); 560 } ScanRecordBuilderScanRecordBuilder561 explicit ScanRecordBuilder(flatbuffers::FlatBufferBuilder &_fbb) 562 : fbb_(_fbb) { 563 start_ = fbb_.StartTable(); 564 } 565 ScanRecordBuilder &operator=(const ScanRecordBuilder &); FinishScanRecordBuilder566 flatbuffers::Offset<ScanRecord> Finish() { 567 const auto end = fbb_.EndTable(start_); 568 auto o = flatbuffers::Offset<ScanRecord>(end); 569 return o; 570 } 571 }; 572 573 inline flatbuffers::Offset<ScanRecord> CreateScanRecord( 574 flatbuffers::FlatBufferBuilder &_fbb, 575 uint32_t time_spent_scanning_ms = 0, 576 uint32_t num_channels_scanned = 0, 577 uint32_t num_entries_aggregated = 0) { 578 ScanRecordBuilder builder_(_fbb); 579 builder_.add_num_entries_aggregated(num_entries_aggregated); 580 builder_.add_num_channels_scanned(num_channels_scanned); 581 builder_.add_time_spent_scanning_ms(time_spent_scanning_ms); 582 return builder_.Finish(); 583 } 584 585 struct RpcLogRecord FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 586 typedef RpcLogRecordBuilder Builder; 587 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 588 VT_RECORD_TYPE = 4, 589 VT_TIMESTAMP_CHRE_MS = 6 590 }; record_typeFLATBUFFERS_FINAL_CLASS591 uint8_t record_type() const { 592 return GetField<uint8_t>(VT_RECORD_TYPE, 0); 593 } timestamp_chre_msFLATBUFFERS_FINAL_CLASS594 uint32_t timestamp_chre_ms() const { 595 return GetField<uint32_t>(VT_TIMESTAMP_CHRE_MS, 0); 596 } VerifyFLATBUFFERS_FINAL_CLASS597 bool Verify(flatbuffers::Verifier &verifier) const { 598 return VerifyTableStart(verifier) && 599 VerifyField<uint8_t>(verifier, VT_RECORD_TYPE) && 600 VerifyField<uint32_t>(verifier, VT_TIMESTAMP_CHRE_MS) && 601 verifier.EndTable(); 602 } 603 }; 604 605 struct RpcLogRecordBuilder { 606 typedef RpcLogRecord Table; 607 flatbuffers::FlatBufferBuilder &fbb_; 608 flatbuffers::uoffset_t start_; add_record_typeRpcLogRecordBuilder609 void add_record_type(uint8_t record_type) { 610 fbb_.AddElement<uint8_t>(RpcLogRecord::VT_RECORD_TYPE, record_type, 0); 611 } add_timestamp_chre_msRpcLogRecordBuilder612 void add_timestamp_chre_ms(uint32_t timestamp_chre_ms) { 613 fbb_.AddElement<uint32_t>(RpcLogRecord::VT_TIMESTAMP_CHRE_MS, timestamp_chre_ms, 0); 614 } RpcLogRecordBuilderRpcLogRecordBuilder615 explicit RpcLogRecordBuilder(flatbuffers::FlatBufferBuilder &_fbb) 616 : fbb_(_fbb) { 617 start_ = fbb_.StartTable(); 618 } 619 RpcLogRecordBuilder &operator=(const RpcLogRecordBuilder &); FinishRpcLogRecordBuilder620 flatbuffers::Offset<RpcLogRecord> Finish() { 621 const auto end = fbb_.EndTable(start_); 622 auto o = flatbuffers::Offset<RpcLogRecord>(end); 623 return o; 624 } 625 }; 626 627 inline flatbuffers::Offset<RpcLogRecord> CreateRpcLogRecord( 628 flatbuffers::FlatBufferBuilder &_fbb, 629 uint8_t record_type = 0, 630 uint32_t timestamp_chre_ms = 0) { 631 RpcLogRecordBuilder builder_(_fbb); 632 builder_.add_timestamp_chre_ms(timestamp_chre_ms); 633 builder_.add_record_type(record_type); 634 return builder_.Finish(); 635 } 636 637 struct ScanStats FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { 638 typedef ScanStatsBuilder Builder; 639 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { 640 VT_NUM_SCANS_REQUESTED_BY_NANOAPP = 4, 641 VT_NUM_SCANS_SERVICED_BY_HARDWARE = 6, 642 VT_NUM_SCANS_SERVICED_BY_CACHE = 8, 643 VT_UPDATED_AT_CHRE_MS = 10, 644 VT_SENT_AT_CHRE_MS = 12, 645 VT_LAST_SUBSCRIPTION_DURATION_MS = 14, 646 VT_CHANNEL_SCAN_COUNT = 16, 647 VT_SCAN_RECORDS = 18, 648 VT_RPC_LOG_RECORDS = 20 649 }; num_scans_requested_by_nanoappFLATBUFFERS_FINAL_CLASS650 uint32_t num_scans_requested_by_nanoapp() const { 651 return GetField<uint32_t>(VT_NUM_SCANS_REQUESTED_BY_NANOAPP, 0); 652 } num_scans_serviced_by_hardwareFLATBUFFERS_FINAL_CLASS653 uint32_t num_scans_serviced_by_hardware() const { 654 return GetField<uint32_t>(VT_NUM_SCANS_SERVICED_BY_HARDWARE, 0); 655 } num_scans_serviced_by_cacheFLATBUFFERS_FINAL_CLASS656 uint32_t num_scans_serviced_by_cache() const { 657 return GetField<uint32_t>(VT_NUM_SCANS_SERVICED_BY_CACHE, 0); 658 } updated_at_chre_msFLATBUFFERS_FINAL_CLASS659 uint32_t updated_at_chre_ms() const { 660 return GetField<uint32_t>(VT_UPDATED_AT_CHRE_MS, 0); 661 } sent_at_chre_msFLATBUFFERS_FINAL_CLASS662 uint32_t sent_at_chre_ms() const { 663 return GetField<uint32_t>(VT_SENT_AT_CHRE_MS, 0); 664 } last_subscription_duration_msFLATBUFFERS_FINAL_CLASS665 uint32_t last_subscription_duration_ms() const { 666 return GetField<uint32_t>(VT_LAST_SUBSCRIPTION_DURATION_MS, 0); 667 } channel_scan_countFLATBUFFERS_FINAL_CLASS668 const flatbuffers::Vector<uint8_t> *channel_scan_count() const { 669 return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_CHANNEL_SCAN_COUNT); 670 } scan_recordsFLATBUFFERS_FINAL_CLASS671 const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::ScanRecord>> *scan_records() const { 672 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::ScanRecord>> *>(VT_SCAN_RECORDS); 673 } rpc_log_recordsFLATBUFFERS_FINAL_CLASS674 const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::RpcLogRecord>> *rpc_log_records() const { 675 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::RpcLogRecord>> *>(VT_RPC_LOG_RECORDS); 676 } VerifyFLATBUFFERS_FINAL_CLASS677 bool Verify(flatbuffers::Verifier &verifier) const { 678 return VerifyTableStart(verifier) && 679 VerifyField<uint32_t>(verifier, VT_NUM_SCANS_REQUESTED_BY_NANOAPP) && 680 VerifyField<uint32_t>(verifier, VT_NUM_SCANS_SERVICED_BY_HARDWARE) && 681 VerifyField<uint32_t>(verifier, VT_NUM_SCANS_SERVICED_BY_CACHE) && 682 VerifyField<uint32_t>(verifier, VT_UPDATED_AT_CHRE_MS) && 683 VerifyField<uint32_t>(verifier, VT_SENT_AT_CHRE_MS) && 684 VerifyField<uint32_t>(verifier, VT_LAST_SUBSCRIPTION_DURATION_MS) && 685 VerifyOffset(verifier, VT_CHANNEL_SCAN_COUNT) && 686 verifier.VerifyVector(channel_scan_count()) && 687 VerifyOffset(verifier, VT_SCAN_RECORDS) && 688 verifier.VerifyVector(scan_records()) && 689 verifier.VerifyVectorOfTables(scan_records()) && 690 VerifyOffset(verifier, VT_RPC_LOG_RECORDS) && 691 verifier.VerifyVector(rpc_log_records()) && 692 verifier.VerifyVectorOfTables(rpc_log_records()) && 693 verifier.EndTable(); 694 } 695 }; 696 697 struct ScanStatsBuilder { 698 typedef ScanStats Table; 699 flatbuffers::FlatBufferBuilder &fbb_; 700 flatbuffers::uoffset_t start_; add_num_scans_requested_by_nanoappScanStatsBuilder701 void add_num_scans_requested_by_nanoapp(uint32_t num_scans_requested_by_nanoapp) { 702 fbb_.AddElement<uint32_t>(ScanStats::VT_NUM_SCANS_REQUESTED_BY_NANOAPP, num_scans_requested_by_nanoapp, 0); 703 } add_num_scans_serviced_by_hardwareScanStatsBuilder704 void add_num_scans_serviced_by_hardware(uint32_t num_scans_serviced_by_hardware) { 705 fbb_.AddElement<uint32_t>(ScanStats::VT_NUM_SCANS_SERVICED_BY_HARDWARE, num_scans_serviced_by_hardware, 0); 706 } add_num_scans_serviced_by_cacheScanStatsBuilder707 void add_num_scans_serviced_by_cache(uint32_t num_scans_serviced_by_cache) { 708 fbb_.AddElement<uint32_t>(ScanStats::VT_NUM_SCANS_SERVICED_BY_CACHE, num_scans_serviced_by_cache, 0); 709 } add_updated_at_chre_msScanStatsBuilder710 void add_updated_at_chre_ms(uint32_t updated_at_chre_ms) { 711 fbb_.AddElement<uint32_t>(ScanStats::VT_UPDATED_AT_CHRE_MS, updated_at_chre_ms, 0); 712 } add_sent_at_chre_msScanStatsBuilder713 void add_sent_at_chre_ms(uint32_t sent_at_chre_ms) { 714 fbb_.AddElement<uint32_t>(ScanStats::VT_SENT_AT_CHRE_MS, sent_at_chre_ms, 0); 715 } add_last_subscription_duration_msScanStatsBuilder716 void add_last_subscription_duration_ms(uint32_t last_subscription_duration_ms) { 717 fbb_.AddElement<uint32_t>(ScanStats::VT_LAST_SUBSCRIPTION_DURATION_MS, last_subscription_duration_ms, 0); 718 } add_channel_scan_countScanStatsBuilder719 void add_channel_scan_count(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> channel_scan_count) { 720 fbb_.AddOffset(ScanStats::VT_CHANNEL_SCAN_COUNT, channel_scan_count); 721 } add_scan_recordsScanStatsBuilder722 void add_scan_records(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::ScanRecord>>> scan_records) { 723 fbb_.AddOffset(ScanStats::VT_SCAN_RECORDS, scan_records); 724 } add_rpc_log_recordsScanStatsBuilder725 void add_rpc_log_records(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::RpcLogRecord>>> rpc_log_records) { 726 fbb_.AddOffset(ScanStats::VT_RPC_LOG_RECORDS, rpc_log_records); 727 } ScanStatsBuilderScanStatsBuilder728 explicit ScanStatsBuilder(flatbuffers::FlatBufferBuilder &_fbb) 729 : fbb_(_fbb) { 730 start_ = fbb_.StartTable(); 731 } 732 ScanStatsBuilder &operator=(const ScanStatsBuilder &); FinishScanStatsBuilder733 flatbuffers::Offset<ScanStats> Finish() { 734 const auto end = fbb_.EndTable(start_); 735 auto o = flatbuffers::Offset<ScanStats>(end); 736 return o; 737 } 738 }; 739 740 inline flatbuffers::Offset<ScanStats> CreateScanStats( 741 flatbuffers::FlatBufferBuilder &_fbb, 742 uint32_t num_scans_requested_by_nanoapp = 0, 743 uint32_t num_scans_serviced_by_hardware = 0, 744 uint32_t num_scans_serviced_by_cache = 0, 745 uint32_t updated_at_chre_ms = 0, 746 uint32_t sent_at_chre_ms = 0, 747 uint32_t last_subscription_duration_ms = 0, 748 flatbuffers::Offset<flatbuffers::Vector<uint8_t>> channel_scan_count = 0, 749 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::ScanRecord>>> scan_records = 0, 750 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<wifi_offload::fbs::RpcLogRecord>>> rpc_log_records = 0) { 751 ScanStatsBuilder builder_(_fbb); 752 builder_.add_rpc_log_records(rpc_log_records); 753 builder_.add_scan_records(scan_records); 754 builder_.add_channel_scan_count(channel_scan_count); 755 builder_.add_last_subscription_duration_ms(last_subscription_duration_ms); 756 builder_.add_sent_at_chre_ms(sent_at_chre_ms); 757 builder_.add_updated_at_chre_ms(updated_at_chre_ms); 758 builder_.add_num_scans_serviced_by_cache(num_scans_serviced_by_cache); 759 builder_.add_num_scans_serviced_by_hardware(num_scans_serviced_by_hardware); 760 builder_.add_num_scans_requested_by_nanoapp(num_scans_requested_by_nanoapp); 761 return builder_.Finish(); 762 } 763 764 inline flatbuffers::Offset<ScanStats> CreateScanStatsDirect( 765 flatbuffers::FlatBufferBuilder &_fbb, 766 uint32_t num_scans_requested_by_nanoapp = 0, 767 uint32_t num_scans_serviced_by_hardware = 0, 768 uint32_t num_scans_serviced_by_cache = 0, 769 uint32_t updated_at_chre_ms = 0, 770 uint32_t sent_at_chre_ms = 0, 771 uint32_t last_subscription_duration_ms = 0, 772 const std::vector<uint8_t> *channel_scan_count = nullptr, 773 const std::vector<flatbuffers::Offset<wifi_offload::fbs::ScanRecord>> *scan_records = nullptr, 774 const std::vector<flatbuffers::Offset<wifi_offload::fbs::RpcLogRecord>> *rpc_log_records = nullptr) { 775 auto channel_scan_count__ = channel_scan_count ? _fbb.CreateVector<uint8_t>(*channel_scan_count) : 0; 776 auto scan_records__ = scan_records ? _fbb.CreateVector<flatbuffers::Offset<wifi_offload::fbs::ScanRecord>>(*scan_records) : 0; 777 auto rpc_log_records__ = rpc_log_records ? _fbb.CreateVector<flatbuffers::Offset<wifi_offload::fbs::RpcLogRecord>>(*rpc_log_records) : 0; 778 return wifi_offload::fbs::CreateScanStats( 779 _fbb, 780 num_scans_requested_by_nanoapp, 781 num_scans_serviced_by_hardware, 782 num_scans_serviced_by_cache, 783 updated_at_chre_ms, 784 sent_at_chre_ms, 785 last_subscription_duration_ms, 786 channel_scan_count__, 787 scan_records__, 788 rpc_log_records__); 789 } 790 791 } // namespace fbs 792 } // namespace wifi_offload 793 794 #endif // FLATBUFFERS_GENERATED_FLATBUFFERSTYPES_WIFI_OFFLOAD_FBS_H_ 795