jerrym | f157933 | 2013-02-07 01:56:28 +0000 | [diff] [blame] | 1 | /*----------------------------------------------------------------------------*/
|
| 2 | /* Copyright (c) FIRST 2008. All Rights Reserved. */
|
| 3 | /* Open Source Software - may be modified and shared by FRC teams. The code */
|
| 4 | /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
| 5 | /*----------------------------------------------------------------------------*/
|
| 6 |
|
| 7 | #ifndef __INT_CAMERA_PARAMETER_H__
|
| 8 | #define __INT_CAMERA_PARAMETER_H__
|
| 9 |
|
| 10 | #include <vxWorks.h>
|
| 11 |
|
| 12 | /**
|
| 13 | * Integer camera parameter.
|
| 14 | * This class represents a camera parameter that takes an integer value.
|
| 15 | */
|
| 16 | class IntCameraParameter
|
| 17 | {
|
| 18 | protected:
|
| 19 | const char *m_setString;
|
| 20 | const char *m_getString;
|
| 21 | bool m_changed;
|
| 22 | bool m_requiresRestart;
|
| 23 | int m_value; // parameter value
|
| 24 |
|
| 25 | int SearchForParam(const char *pattern, const char *searchString, int searchStringLen, char *result);
|
| 26 |
|
| 27 | public:
|
| 28 | IntCameraParameter(const char *setString, const char *getString, bool requiresRestart);
|
| 29 | int GetValue();
|
| 30 | void SetValue(int value);
|
| 31 | virtual bool CheckChanged(bool &changed, char *param);
|
| 32 | virtual void GetParamFromString(const char *string, int stringLength);
|
| 33 | };
|
| 34 |
|
| 35 | #endif
|