WPILib 2012
WPILibRoboticsLibraryforFRC
|
#include <IntCameraParameter.h>
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 |
Integer camera parameter. This class represents a camera parameter that takes an integer value.
IntCameraParameter::IntCameraParameter | ( | const char * | setString, |
const char * | getString, | ||
bool | requiresRestart | ||
) |
Constructor for an integer camera parameter.
setString | The string to set a value in the HTTP request |
getString | The string to retrieve a value in the HTTP request |
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.
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.
int IntCameraParameter::SearchForParam | ( | const char * | pattern, |
const char * | searchString, | ||
int | searchStringLen, | ||
char * | result | ||
) | [protected] |
pattern,: | the regular expression |
searchString | the text to search |
searchStringLen | the length of searchString |
result | buffer 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.