14 #ifndef DYNAMIC_CAMERA_SERVER
15 #include <cscore_oo.h>
20 typedef int CS_Handle;
21 typedef CS_Handle CS_Source;
24 #include "frc/smartdashboard/Sendable.h"
25 #include "frc/smartdashboard/SendableHelper.h"
29 class SendableCameraWrapper;
32 constexpr
const char* kProtocol =
"camera_server://";
33 std::shared_ptr<SendableCameraWrapper>& GetSendableCameraWrapper(
35 void AddToSendableRegistry(Sendable* sendable, std::string name);
44 struct private_init {};
72 #ifndef DYNAMIC_CAMERA_SERVER
75 : m_uri(detail::kProtocol) {
77 auto name = cs::GetSourceName(source, &status);
78 detail::AddToSendableRegistry(
this, name);
84 return Wrap(source.GetHandle());
88 auto& wrapper = detail::GetSendableCameraWrapper(source);
90 wrapper = std::make_shared<SendableCameraWrapper>(source, private_init{});
SendableCameraWrapper(CS_Source source, const private_init &)
Creates a new sendable wrapper.
Definition: SendableCameraWrapper.h:73
A wrapper to make video sources sendable and usable from Shuffleboard.
Definition: SendableCameraWrapper.h:41
CameraServer (cscore) namespace.
Definition: cscore_cpp.h:35
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
Interface for Sendable objects.
Definition: Sendable.h:17
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
A source for video that provides a sequence of frames.
Definition: cscore_oo.h:97
static SendableCameraWrapper & Wrap(const cs::VideoSource &source)
Gets a sendable wrapper object for the given video source, creating the wrapper if one does not alrea...
Definition: SendableCameraWrapper.h:82
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:28
Definition: SendableBuilder.h:23