mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[hal] WS Simulation: Add message filtering capability (#5395)
This commit is contained in:
@@ -7,10 +7,12 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <WSBaseProvider.h>
|
||||
#include <WSProviderContainer.h>
|
||||
#include <WSProvider_SimDevice.h>
|
||||
#include <wpi/StringMap.h>
|
||||
#include <wpinet/uv/Async.h>
|
||||
#include <wpinet/uv/Loop.h>
|
||||
#include <wpinet/uv/Tcp.h>
|
||||
@@ -41,6 +43,8 @@ class HALSimWeb : public std::enable_shared_from_this<HALSimWeb> {
|
||||
// network -> sim
|
||||
void OnNetValueChanged(const wpi::json& msg);
|
||||
|
||||
bool CanSendMessage(std::string_view type);
|
||||
|
||||
const std::string& GetWebrootSys() const { return m_webroot_sys; }
|
||||
const std::string& GetWebrootUser() const { return m_webroot_user; }
|
||||
const std::string& GetServerUri() const { return m_uri; }
|
||||
@@ -69,6 +73,9 @@ class HALSimWeb : public std::enable_shared_from_this<HALSimWeb> {
|
||||
|
||||
std::string m_uri;
|
||||
int m_port;
|
||||
|
||||
bool m_useMsgFiltering;
|
||||
wpi::StringMap<bool> m_msgFilters;
|
||||
};
|
||||
|
||||
} // namespace wpilibws
|
||||
|
||||
Reference in New Issue
Block a user