forked from Consti10/wifibroadcast
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor out wifibroadcast::WifiCard
- Loading branch information
Showing
8 changed files
with
54 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Created by consti10 on 13.09.23. | ||
// | ||
|
||
#ifndef WIFIBROADCAST_WIFICARD_H | ||
#define WIFIBROADCAST_WIFICARD_H | ||
|
||
#include <string> | ||
#include <sstream> | ||
#include <vector> | ||
|
||
namespace wifibroadcast{ | ||
// In OpenHD, we have a quite extensive WiFiCard abstraction - | ||
// in wifibroadcast, we are a bit simpler | ||
// (But we require info for quirks) | ||
// RTL8812AU driver requires a quirk regarding rssi | ||
static constexpr auto WIFI_CARD_TYPE_UNKNOWN=0; | ||
static constexpr auto WIFI_CARD_TYPE_RTL8812AU=1; | ||
struct WifiCard{ | ||
std::string name; | ||
int type; | ||
}; | ||
static std::vector<std::string> get_wifi_card_names(const std::vector<WifiCard>& cards){ | ||
std::vector<std::string> ret; | ||
for(const auto& card:cards){ | ||
ret.push_back(card.name); | ||
} | ||
return ret; | ||
} | ||
} | ||
|
||
#endif // WIFIBROADCAST_WIFICARD_H |