WPILibC++  2019.1.1-beta-4-28-g80f87ff
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
SendableCameraWrapper.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2018 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 <string>
11 
12 #include <cscore_c.h>
13 
14 #include "frc/smartdashboard/SendableBase.h"
15 
16 namespace cs {
17 class VideoSource;
18 } // namespace cs
19 
20 namespace frc {
21 
26  private:
27  struct private_init {};
28 
29  public:
36  SendableCameraWrapper(CS_Source source, const private_init&);
37 
46  static SendableCameraWrapper& Wrap(const cs::VideoSource& source);
47  static SendableCameraWrapper& Wrap(CS_Source source);
48 
49  void InitSendable(SendableBuilder& builder) override;
50 
51  private:
52  std::string m_uri;
53 };
54 
55 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
CameraServer (cscore) namespace.
Definition: cscore_oo.inl:11
A source for video that provides a sequence of frames.
Definition: cscore_oo.h:97
SendableCameraWrapper(CS_Source source, const private_init &)
Creates a new sendable wrapper.
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
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: SendableBase.h:19
Definition: SendableBuilder.h:23
A wrapper to make video sources sendable and usable from Shuffleboard.
Definition: SendableCameraWrapper.h:25