mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[hal] WS Simulation: Add message filtering capability (#5395)
This commit is contained in:
@@ -7,9 +7,11 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#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 HALSimWS : public std::enable_shared_from_this<HALSimWS> {
|
||||
|
||||
void OnNetValueChanged(const wpi::json& msg);
|
||||
|
||||
bool CanSendMessage(std::string_view type);
|
||||
|
||||
const std::string& GetTargetHost() const { return m_host; }
|
||||
const std::string& GetTargetUri() const { return m_uri; }
|
||||
int GetTargetPort() const { return m_port; }
|
||||
@@ -67,6 +71,9 @@ class HALSimWS : public std::enable_shared_from_this<HALSimWS> {
|
||||
std::string m_host;
|
||||
std::string m_uri;
|
||||
int m_port;
|
||||
|
||||
bool m_useMsgFiltering;
|
||||
wpi::StringMap<bool> m_msgFilters;
|
||||
};
|
||||
|
||||
} // namespace wpilibws
|
||||
|
||||
Reference in New Issue
Block a user