WPILibC++  2020.3.2
CameraServerShared.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include <memory>
11 #include <thread>
12 #include <utility>
13 
14 #include <wpi/Twine.h>
15 
16 namespace frc {
18  public:
19  virtual ~CameraServerShared() = default;
20  virtual void ReportUsbCamera(int id) = 0;
21  virtual void ReportAxisCamera(int id) = 0;
22  virtual void ReportVideoServer(int id) = 0;
23  virtual void SetCameraServerError(const wpi::Twine& error) = 0;
24  virtual void SetVisionRunnerError(const wpi::Twine& error) = 0;
25  virtual void ReportDriverStationError(const wpi::Twine& error) = 0;
26  virtual std::pair<std::thread::id, bool> GetRobotMainThreadId() const = 0;
27 };
28 
29 CameraServerShared* GetCameraServerShared();
30 } // namespace frc
31 
32 extern "C" {
33 // Takes ownership
34 void CameraServer_SetCameraServerShared(frc::CameraServerShared* shared);
35 } // extern "C"
frc::CameraServerShared
Definition: CameraServerShared.h:17
frc
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
wpi::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:85