WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
CameraServer Class Reference
Inheritance diagram for CameraServer:
ErrorBase

Classes

struct  Request
 

Public Member Functions

void SetImage (Image const *image)
 
void StartAutomaticCapture (char const *cameraName=USBCamera::kDefaultCameraName)
 
void StartAutomaticCapture (std::shared_ptr< USBCamera > camera)
 Start automatically capturing images to send to the dashboard. More...
 
bool IsAutoCaptureStarted ()
 
void SetQuality (unsigned int quality)
 
unsigned int GetQuality ()
 
void SetSize (unsigned int size)
 
- Public Member Functions inherited from ErrorBase
 ErrorBase (const ErrorBase &)=delete
 
ErrorBaseoperator= (const ErrorBase &)=delete
 
virtual ErrorGetError ()
 Retrieve the current error. More...
 
virtual const ErrorGetError () const
 
virtual void SetErrnoError (llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set error information associated with a C library call that set an error to the "errno" global variable. More...
 
virtual void SetImaqError (int success, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set the current error information associated from the nivision Imaq API. More...
 
virtual void SetError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void SetWPIError (llvm::StringRef errorMessage, Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void CloneError (const ErrorBase &rhs) const
 
virtual void ClearError () const
 Clear the current error information associated with this sensor.
 
virtual bool StatusIsFatal () const
 Check if the current error code represents a fatal error. More...
 

Static Public Member Functions

static CameraServerGetInstance ()
 
- Static Public Member Functions inherited from ErrorBase
static void SetGlobalError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber)
 
static void SetGlobalWPIError (llvm::StringRef errorMessage, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber)
 
static ErrorGetGlobalError ()
 Retrieve the current global error.
 

Protected Member Functions

void Serve ()
 
void AutoCapture ()
 
void SetImageData (uint8_t *data, unsigned int size, unsigned int start=0, bool imaqData=false)
 
void FreeImageData (std::tuple< uint8_t *, unsigned int, unsigned int, bool > imageData)
 

Protected Attributes

std::shared_ptr< USBCameram_camera
 
std::thread m_serverThread
 
std::thread m_captureThread
 
priority_recursive_mutex m_imageMutex
 
std::condition_variable_any m_newImageVariable
 
std::vector< uint8_t * > m_dataPool
 
unsigned int m_quality
 
bool m_autoCaptureStarted
 
bool m_hwClient
 
std::tuple< uint8_t
*, unsigned int, unsigned int,
bool > 
m_imageData
 
- Protected Attributes inherited from ErrorBase
Error m_error
 

Additional Inherited Members

- Static Protected Attributes inherited from ErrorBase
static priority_mutex _globalErrorMutex
 
static Error _globalError
 

Member Function Documentation

void CameraServer::StartAutomaticCapture ( std::shared_ptr< USBCamera camera)

Start automatically capturing images to send to the dashboard.

You should call this method to just see a camera feed on the dashboard without doing any vision processing on the roboRIO. SetImage should not be called after this is called.

Parameters
cameraThe camera interface (eg. USBCamera)

The documentation for this class was generated from the following files: