WPILib 2012
WPILibRoboticsLibraryforFRC
Public Member Functions | Protected Member Functions | Protected Attributes
IntCameraParameter Class Reference

#include <IntCameraParameter.h>

Inheritance diagram for IntCameraParameter:
EnumCameraParameter

List of all members.

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.


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

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.

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.

int IntCameraParameter::GetValue ( )

Get a value for a camera parameter.

Returns:
The camera parameter cached valued.
int IntCameraParameter::SearchForParam ( const char *  pattern,
const char *  searchString,
int  searchStringLen,
char *  result 
) [protected]
Parameters:
pattern,:the regular expression
searchStringthe text to search
searchStringLenthe length of searchString
resultbuffer to put resulting text into, must be pre-allocated
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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables