-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
370 additions
and
307 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 was deleted.
Oops, something went wrong.
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,37 @@ | ||
/* | ||
* Copyright (c) 2024, Open Control Systems authors | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
namespace ocs { | ||
namespace net { | ||
|
||
class IApNetwork { | ||
public: | ||
struct Info { | ||
//! WiFi channel. | ||
uint8_t channel { 0 }; | ||
|
||
//! Current number of STA connections to the AP. | ||
uint8_t cur_connection { 0 }; | ||
|
||
//! Maximum number of simultaneous STA connections to the AP. | ||
uint8_t max_connection { 0 }; | ||
}; | ||
|
||
//! Destroy. | ||
virtual ~IApNetwork() = default; | ||
|
||
//! Return various network characteristics. | ||
virtual Info get_info() = 0; | ||
}; | ||
|
||
} // namespace net | ||
} // namespace ocs |
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,39 @@ | ||
/* | ||
* Copyright (c) 2024, Open Control Systems authors | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <string> | ||
|
||
#include "lwip/ip_addr.h" | ||
|
||
namespace ocs { | ||
namespace net { | ||
|
||
class IStaNetwork { | ||
public: | ||
struct Info { | ||
//! AP SSID to which STA is connected. | ||
std::string ssid; | ||
|
||
//! Signal strength of the AP. | ||
int8_t rssi { 0 }; | ||
|
||
ip_addr_t ip_addr; | ||
}; | ||
|
||
//! Destroy. | ||
virtual ~IStaNetwork() = default; | ||
|
||
//! Return various network characteristics. | ||
virtual Info get_info() = 0; | ||
}; | ||
|
||
} // namespace net | ||
} // namespace ocs |
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
Oops, something went wrong.