#include <AxisCameraParams.h>
Public Member Functions | |
void | WriteBrightness (int) |
int | GetBrightness () |
void | WriteWhiteBalance (WhiteBalance_t whiteBalance) |
WhiteBalance_t | GetWhiteBalance () |
void | WriteColorLevel (int) |
int | GetColorLevel () |
void | WriteExposureControl (Exposure_t) |
Exposure_t | GetExposureControl () |
void | WriteExposurePriority (int) |
int | GetExposurePriority () |
void | WriteMaxFPS (int) |
int | GetMaxFPS () |
void | WriteResolution (Resolution_t) |
Resolution_t | GetResolution () |
void | WriteCompression (int) |
int | GetCompression () |
void | WriteRotation (Rotation_t) |
Rotation_t | GetRotation () |
Public Member Functions inherited from ErrorBase | |
virtual Error & | GetError () |
Retrieve the current error. Get the current error information associated with this sensor. | |
virtual const Error & | GetError () const |
virtual void | SetErrnoError (const char *contextMessage, const char *filename, const char *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, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
Set the current error information associated from the nivision Imaq API. More... | |
virtual void | SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
Set the current error information associated with this sensor. More... | |
virtual void | SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
Set the current error information associated with this sensor. More... | |
virtual void | CloneError (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... | |
Protected Types | |
typedef std::vector < IntCameraParameter * > | ParameterVector_t |
Protected Member Functions | |
AxisCameraParams (const char *ipAddress) | |
virtual | ~AxisCameraParams () |
virtual void | RestartCameraTask ()=0 |
int | CreateCameraSocket (const char *requestString) |
int | ParamTaskFunction () |
int | UpdateCamParam (const char *param) |
int | ReadCamParams () |
Protected Member Functions inherited from ErrorBase | |
ErrorBase () | |
Initialize the instance status to 0 for now. | |
Static Protected Member Functions | |
static int | s_ParamTaskFunction (AxisCameraParams *thisPtr) |
Protected Attributes | |
Task | m_paramTask |
uint32_t | m_ipAddress |
SEM_ID | m_paramChangedSem |
SEM_ID | m_socketPossessionSem |
IntCameraParameter * | m_brightnessParam |
IntCameraParameter * | m_compressionParam |
IntCameraParameter * | m_exposurePriorityParam |
IntCameraParameter * | m_colorLevelParam |
IntCameraParameter * | m_maxFPSParam |
EnumCameraParameter * | m_rotationParam |
EnumCameraParameter * | m_resolutionParam |
EnumCameraParameter * | m_exposureControlParam |
EnumCameraParameter * | m_whiteBalanceParam |
ParameterVector_t | m_parameters |
Protected Attributes inherited from ErrorBase | |
Error | m_error |
Additional Inherited Members | |
Static Public Member Functions inherited from ErrorBase | |
static void | SetGlobalError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) |
static void | SetGlobalWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) |
static Error & | GetGlobalError () |
Static Protected Attributes inherited from ErrorBase | |
static SEM_ID | _globalErrorMutex = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE) |
static Error | _globalError |
AxisCameraParams class. This class handles parameter configuration the Axis 206 Ethernet Camera. It starts up a tasks with an independent connection to the camera that monitors for changes to parameters and updates the camera. It is only separate from AxisCamera to isolate the parameter code from the image streaming code.
Definition at line 23 of file AxisCameraParams.h.
|
protected |
AxisCamera constructor
Definition at line 32 of file AxisCameraParams.cpp.
|
protectedvirtual |
Destructor
Definition at line 108 of file AxisCameraParams.cpp.
int AxisCameraParams::GetBrightness | ( | ) |
Get the brightness value.
Definition at line 189 of file AxisCameraParams.cpp.
int AxisCameraParams::GetColorLevel | ( | ) |
Retrieve the color level from the camera. the camera color level.
Definition at line 227 of file AxisCameraParams.cpp.
int AxisCameraParams::GetCompression | ( | ) |
Get the compression value from the camera.
Definition at line 323 of file AxisCameraParams.cpp.
AxisCameraParams::Exposure_t AxisCameraParams::GetExposureControl | ( | ) |
Get the exposure value from the camera.
Definition at line 246 of file AxisCameraParams.cpp.
int AxisCameraParams::GetMaxFPS | ( | ) |
Get the max number of frames per second that the camera will send
Definition at line 343 of file AxisCameraParams.cpp.
AxisCameraParams::Resolution_t AxisCameraParams::GetResolution | ( | ) |
Get the resolution value from the camera.
Definition at line 265 of file AxisCameraParams.cpp.
AxisCameraParams::Rotation_t AxisCameraParams::GetRotation | ( | ) |
Get the rotation value from the camera.
Definition at line 303 of file AxisCameraParams.cpp.
AxisCameraParams::WhiteBalance_t AxisCameraParams::GetWhiteBalance | ( | ) |
Retrieve the current white balance parameter.
Definition at line 208 of file AxisCameraParams.cpp.
|
protected |
Main loop of the parameter task. This loop runs continuously checking parameters from the camera for posted changes and updating them if necessary.
Definition at line 140 of file AxisCameraParams.cpp.
|
protected |
Read the full param list from camera, use regular expressions to find the bits we care about assign values to member variables.
Definition at line 379 of file AxisCameraParams.cpp.
|
staticprotected |
Static function to start the parameter updating task
Definition at line 129 of file AxisCameraParams.cpp.
|
protected |
Update a camera parameter. Write a camera parameter to the camera when it has bene changed.
param | the string to insert into the http request. |
Definition at line 354 of file AxisCameraParams.cpp.
void AxisCameraParams::WriteBrightness | ( | int | brightness | ) |
Write the brightness value to the camera.
brightness | valid values 0 .. 100 |
Definition at line 179 of file AxisCameraParams.cpp.
void AxisCameraParams::WriteColorLevel | ( | int | colorLevel | ) |
Write the color level to the camera.
colorLevel | valid values are 0 .. 100 |
Definition at line 217 of file AxisCameraParams.cpp.
void AxisCameraParams::WriteCompression | ( | int | compression | ) |
Write the compression value to the camera.
compression | Values between 0 and 100. |
Definition at line 313 of file AxisCameraParams.cpp.
void AxisCameraParams::WriteExposureControl | ( | Exposure_t | exposureControl | ) |
Write the exposure control value to the camera.
exposureControl | A mode to write in the Exposure_t enum. |
Definition at line 236 of file AxisCameraParams.cpp.
void AxisCameraParams::WriteExposurePriority | ( | int | exposurePriority | ) |
Write the exposre priority value to the camera.
exposurePriority | Valid values are 0, 50, 100. 0 = Prioritize image quality 50 = None 100 = Prioritize frame rate |
Definition at line 277 of file AxisCameraParams.cpp.
void AxisCameraParams::WriteMaxFPS | ( | int | maxFPS | ) |
Write the maximum frames per second that the camera should send Write 0 to send as many as possible.
maxFPS | The number of frames the camera should send in a second, exposure permitting. |
Definition at line 333 of file AxisCameraParams.cpp.
void AxisCameraParams::WriteResolution | ( | Resolution_t | resolution | ) |
Write resolution value to camera.
resolution | The camera resolution value to write to the camera. Use the Resolution_t enum. |
Definition at line 255 of file AxisCameraParams.cpp.
void AxisCameraParams::WriteRotation | ( | Rotation_t | rotation | ) |
Write the rotation value to the camera. If you mount your camera upside down, use this to adjust the image for you.
rotation | The image from the Rotation_t enum in AxisCameraParams (kRotation_0 or kRotation_180) |
Definition at line 293 of file AxisCameraParams.cpp.
void AxisCameraParams::WriteWhiteBalance | ( | WhiteBalance_t | whiteBalance | ) |
Set the white balance value.
whiteBalance | Valid values from the WhiteBalance_t enum. |
Definition at line 198 of file AxisCameraParams.cpp.