#pragma once #include #include #include #include "EnumFlags.hpp" namespace pipedal { enum class SecondaryChannelLocation { None, Above, Below }; enum class WifiMode { IEEE80211G, IEEE80211A, IEEE80211B, IEEE80211AD, IEEE80211AX, IEEE80211ANY, }; enum class WifiBandwidth { BW20, BW40MINUS, // g and a. BW40PLUS, BW40, // wifi 6 only. Must come after BW40PLUS, BW40MINUS. BW80, BW160, BW80P80, BW2160, BW4320, BW6480, BW8640 }; enum class DfsRegion { Unset = 0, Fcc = 1, Etsi = 2, Japan = 3 }; // sync with flags) != 0; } }; struct WifiRegulations { std::string reg_alpha2; DfsRegion dfs_region; std::vector rules; const WifiRule*GetRule(int32_t frequencyMhz) const; }; struct WifiChannelInfo { int channelNumber = -1; WifiMode hardwareMode; int mhz = 0; bool disabled = false; bool ir = true; bool radarDetection = false; std::vector bitrates; bool indoorOnly = false; bool outdoorsOnly = false; bool noHt40Minus = false; bool noHt40Plus = false; bool no10MHz = false; bool no20MHz = false; bool no80MHz = false; bool no160MHz = false; int32_t maxAntennaGain = 0; int32_t maxEirp = 0; WifiBandwidth bandwidth; int32_t regDomain = -1; }; struct WifiP2PChannelInfo : public WifiChannelInfo { }; struct WifiInfo { std::string reg_alpha2; std::vector supportedIfTypes; DfsRegion dfsRegion; std::vector channels; const WifiChannelInfo *getChannelInfo(int channel) const; }; } ENABLE_ENUM_FLAGS(pipedal::RegRuleFlags)