mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Also clean up some other implementation aspects for cleaner shutdown and reduce peak memory allocation.
35 lines
1.0 KiB
C++
35 lines
1.0 KiB
C++
/*----------------------------------------------------------------------------*/
|
|
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
/* the project. */
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include <WSProviderContainer.h>
|
|
#include <WSProvider_SimDevice.h>
|
|
#include <wpi/EventLoopRunner.h>
|
|
|
|
#include "HALSimWeb.h"
|
|
|
|
namespace wpilibws {
|
|
|
|
class HALSimWSServer {
|
|
public:
|
|
HALSimWSServer() = default;
|
|
HALSimWSServer(const HALSimWSServer&) = delete;
|
|
HALSimWSServer& operator=(const HALSimWSServer&) = delete;
|
|
|
|
bool Initialize();
|
|
|
|
ProviderContainer providers;
|
|
HALSimWSProviderSimDevices simDevices{providers};
|
|
wpi::EventLoopRunner runner;
|
|
std::shared_ptr<HALSimWeb> simWeb;
|
|
};
|
|
|
|
} // namespace wpilibws
|