WPILibC++  trunk
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IntCameraParameter Class Reference

#include <IntCameraParameter.h>

Inheritance diagram for IntCameraParameter:
Inheritance graph
[legend]

Public Member Functions

 IntCameraParameter (const char *setString, const char *getString, bool requiresRestart)
 
int GetValue ()
 
void SetValue (int value)
 
virtual bool CheckChanged (bool &changed, char *param)
 
virtual void GetParamFromString (const char *string, int stringLength)
 

Protected Member Functions

int SearchForParam (const char *pattern, const char *searchString, int searchStringLen, char *result)
 

Protected Attributes

const char * m_setString
 
const char * m_getString
 
bool m_changed
 
bool m_requiresRestart
 
int m_value
 

Detailed Description

Integer camera parameter. This class represents a camera parameter that takes an integer value.

Definition at line 16 of file IntCameraParameter.h.

Constructor & Destructor Documentation

IntCameraParameter::IntCameraParameter ( const char *  setString,
const char *  getString,
bool  requiresRestart 
)

Constructor for an integer camera parameter.

Parameters
setStringThe string to set a value in the HTTP request
getStringThe string to retrieve a value in the HTTP request

Definition at line 17 of file IntCameraParameter.cpp.

Member Function Documentation

bool IntCameraParameter::CheckChanged ( bool &  changed,
char *  param 
)
virtual

Check if a parameter has changed and update. Check if a parameter has changed and send the update string if it has changed. This is called from the loop in the parameter task loop.

Returns
true if the camera needs to restart

Reimplemented in EnumCameraParameter.

Definition at line 52 of file IntCameraParameter.cpp.

void IntCameraParameter::GetParamFromString ( const char *  string,
int  stringLength 
)
virtual

Get a parameter value from the string. Get a parameter value from the camera status string. If it has been changed been changed by the program, then don't update it. Program values have precedence over those written in the camera.

Reimplemented in EnumCameraParameter.

Definition at line 70 of file IntCameraParameter.cpp.

int IntCameraParameter::GetValue ( )

Get a value for a camera parameter.

Returns
The camera parameter cached valued.

Definition at line 30 of file IntCameraParameter.cpp.

int IntCameraParameter::SearchForParam ( const char *  pattern,
const char *  searchString,
int  searchStringLen,
char *  result 
)
protected
Parameters
patternthe regular expression
searchStringthe text to search
searchStringLenthe length of searchString
resultbuffer to put resulting text into, must be pre-allocated

Definition at line 85 of file IntCameraParameter.cpp.

void IntCameraParameter::SetValue ( int  value)

Set a value for a camera parameter. Mark the value for change. The value will be updated in the parameter change loop.

Definition at line 40 of file IntCameraParameter.cpp.


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