mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Provides an implementation of a XRP-specific plugin that sends binary messages over UDP (to account for the less performant hardware on the XRP). This plugin leverages the work already done for the WebSocket protocol and does a translation to/from JSON/binary.
32 lines
787 B
C++
32 lines
787 B
C++
// Copyright (c) FIRST and other WPILib contributors.
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include <WSProviderContainer.h>
|
|
#include <WSProvider_SimDevice.h>
|
|
#include <wpinet/EventLoopRunner.h>
|
|
|
|
#include "HALSimXRP.h"
|
|
|
|
namespace wpilibxrp {
|
|
|
|
class HALSimXRPClient {
|
|
public:
|
|
HALSimXRPClient() = default;
|
|
HALSimXRPClient(const HALSimXRPClient&) = delete;
|
|
HALSimXRPClient& operator=(const HALSimXRPClient&) = delete;
|
|
|
|
bool Initialize();
|
|
|
|
wpilibws::ProviderContainer providers;
|
|
wpilibws::HALSimWSProviderSimDevices simDevices{providers};
|
|
wpi::EventLoopRunner runner;
|
|
std::shared_ptr<HALSimXRP> simxrp;
|
|
};
|
|
|
|
} // namespace wpilibxrp
|