ADBLib  0.5
A simple library for rapid robot code development
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Pages
ADBLib::MultiVision Class Reference

Camera manager-type class that allows easy camera switching/handling. More...

#include <MultiVision.h>

Collaboration diagram for ADBLib::MultiVision:

Public Member Functions

 MultiVision ()
 Constructor; sets the current enabled camera to nullptr. More...
 
bool switchCamera (string camName)
 Switches to the new camera, automatically stopping the previous camera and starting the new one. More...
 
void postImage ()
 Post an image from the current camera to the Camera Server (i.e. to the dashboard) More...
 
Image * getCurrentImage ()
 Gets an image from the current camera. More...
 
CameragetCamera (string camName)
 Gets a camera with the given name. More...
 

Protected Attributes

unordered_map< string, Camera * > cameras
 
Cameracurrent
 

Detailed Description

Camera manager-type class that allows easy camera switching/handling.

Constructor & Destructor Documentation

ADBLib::MultiVision::MultiVision ( )

Constructor; sets the current enabled camera to nullptr.

Member Function Documentation

Camera * ADBLib::MultiVision::getCamera ( string  camName)

Gets a camera with the given name.

Parameters
camNameThe name of the camera. Found in the roboRIO.
Returns
A camera object. Should never be nullptr.
Note
If a camera under the given name is not found, creates a new one under the given name!
Image * ADBLib::MultiVision::getCurrentImage ( )

Gets an image from the current camera.

Returns
An IMAQ_IMAGE_RGB image object thingy.

Here is the call graph for this function:

void ADBLib::MultiVision::postImage ( )

Post an image from the current camera to the Camera Server (i.e. to the dashboard)

Here is the call graph for this function:

bool ADBLib::MultiVision::switchCamera ( string  camName)

Switches to the new camera, automatically stopping the previous camera and starting the new one.

Parameters
camNameThe name of the camera. This can be found through the roboRIO web page.
Returns
Status of the new camera; true for enabled, false otherwise.
Note
If the camera you specified does not exist, a new camera will be created using the name you specified.

Here is the call graph for this function:

Member Data Documentation

unordered_map<string, Camera*> ADBLib::MultiVision::cameras
protected
Camera* ADBLib::MultiVision::current
protected

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