WPILibC++ 2023.4.3-108-ge5452e3
DriverStationModeThread.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <atomic>
8#include <thread>
9
10namespace frc::internal {
12 public:
15
19 delete;
21
22 void InAutonomous(bool entering);
23 void InDisabled(bool entering);
24 void InTeleop(bool entering);
25 void InTest(bool entering);
26
27 private:
28 std::atomic_bool m_keepAlive{false};
29 std::thread m_thread;
30 void Run();
31 bool m_userInDisabled{false};
32 bool m_userInAutonomous{false};
33 bool m_userInTeleop{false};
34 bool m_userInTest{false};
35};
36} // namespace frc::internal
Definition: DriverStationModeThread.h:11
DriverStationModeThread(DriverStationModeThread &&other)=delete
DriverStationModeThread & operator=(DriverStationModeThread &&other)=delete
DriverStationModeThread & operator=(const DriverStationModeThread &other)=delete
DriverStationModeThread(const DriverStationModeThread &other)=delete
Definition: DriverStationModeThread.h:10