00001 /*************************************************************************** 00002 l1394_cameraregister.h - description 00003 ------------------- 00004 begin : Fri Nov 24 2000 00005 copyright : (C) 2000-2004 by Michael Repplinger 00006 email : repplinger@cs.uni-sb.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef CAMERAREGISTER_H 00019 #define CAMERAREGISTER_H 00020 //ok 00021 namespace L1394 00022 { 00023 00024 /**\class CameraRegister 00025 *\ingroup L1394_Register 00026 *\brief This class defines the interface of an L1394 Register for Cameras. 00027 * 00028 * If you access a feature of a device a so called L1394 Register object is returned. 00029 * The L1394 Register object provides functions to define how to execute the feature. 00030 * 00031 * The functions of this class define, how to execute commands of a Camera.<BR> 00032 * If you store a pointer to a L1394 Register object remember, that the functions of 00033 * this class are only valid for the last feature called by the Device. 00034 * 00035 * Functions changing the status of the camera, like setValue(int) return the new value. 00036 * So you can test, if the new value is set correct. 00037 * 00038 * Illegal combinations are ignored. 00039 * 00040 * For an example see class Camera. 00041 * 00042 *@author Michael Repplinger 00043 */ 00044 00045 class CameraRegister { 00046 public: 00047 /*! \name CameraRegister constructor 00048 * These functions creates the Register objects for Camera devices. 00049 */ 00050 //@{ 00051 00052 /*! \fn ~CameraRegister() 00053 * \brief destructor 00054 */ 00055 virtual ~CameraRegister(){}; 00056 //@} 00057 /*! \name Camera_register Interface 00058 * These functions defines how to execute a feature of class Camera. 00059 */ 00060 //@{ 00061 /*! \fn onePush(const bool one_push = true) const 00062 * \brief This method activates or deactivates one-push mode of a feature 00063 * \param one_push : enable or disable one_push 00064 * \return bool : new status of one-push mode. 00065 */ 00066 virtual bool onePush(const bool one_push = true) const =0; 00067 00068 00069 /*! \fn automatic(const bool on = true) const 00070 * \brief This method activates or deactivates the automode of a feature. 00071 * \param on : enable or disable automatic mode for a feature. 00072 * \return bool : new status of automatic mode. 00073 */ 00074 virtual bool automatic(const bool on = true) const =0; 00075 00076 00077 /*! \fn setTriggerMode(const int value) const 00078 * \brief This method sets the trigger mode. 00079 * 00080 * This method works only combined with the trigger feature. 00081 * \param value : new value for trigger mode. 00082 * \return int : value after changing the trigger mode. 00083 */ 00084 virtual int setTriggerMode(const int value) const =0; 00085 00086 00087 /*! \fn setTriggerPolarity(const bool value) const 00088 * \brief This method sets trigger polarity to value (False = low active) 00089 * 00090 * This method works only combined with the trigger feature. 00091 * \param value : new value for trigger mode. 00092 * \return bool : status after changing trigger mode 00093 */ 00094 virtual bool setTriggerPolarity(const bool value) const =0; 00095 00096 00097 /*! \fn setValue(const int value) const 00098 * \brief This method change the value of a feature. 00099 * \param value : new value for the feature 00100 * \return int : value after changing new value. 00101 */ 00102 virtual int setValue(const int value) const =0; 00103 00104 00105 /*! \fn getValue() const 00106 * \brief This method returns the current value of a feature. 00107 * \return int : value of a feature. 00108 */ 00109 virtual int getValue() const =0; 00110 00111 00112 /*! \fn getMinValue() const 00113 * \brief This method returns the minimal value of a feature. 00114 * \return int : minimal value of a feature 00115 */ 00116 virtual int getMinValue() const =0; 00117 00118 00119 /*! \fn getMaxValue() const 00120 * \brief This method returns the maximal value of a feature. 00121 * \return int : maximal value of a feature 00122 */ 00123 virtual int getMaxValue() const =0; 00124 00125 00126 /*! \fn on(const bool set) const 00127 * \brief This method enables or disables a feature. 00128 * 00129 * After disabling a feature, no write access has affect until enabling 00130 * the feature again. So this method can be used, to lock (unlock) a 00131 * feature to a value. 00132 * \param set : true enable, false disable the feature. 00133 */ 00134 virtual bool on(const bool =true) const =0; 00135 00136 00137 /*! \fn hasFeature() const 00138 * \brief This method tests if a feature is supported by a camera. 00139 * \return bool : true if feature is supported, false if not. 00140 */ 00141 virtual bool hasFeature() const =0; 00142 00143 00144 /*! \fn hasOnePush() const 00145 * \brief This method tests, if one-push mode is supported by a camera. 00146 * \return bool : true if a feature supported this mode, false if not. 00147 */ 00148 virtual bool hasOnePush() const =0; 00149 00150 00151 /*! \fn hasReadout() const 00152 * \brief This method tests for readout mode of a feature. 00153 * \return bool : true if a feature support this mode, false if not. 00154 */ 00155 virtual bool hasReadout() const =0; 00156 00157 00158 /*! \fn hasOnOff() const 00159 * \brief This method tests, if on-off mode is support by a feature. 00160 * \return bool : true if a feature support this mode, false if not. 00161 */ 00162 virtual bool hasOnOff() const =0; 00163 00164 00165 /*! \fn hasAuto() const 00166 * \brief This method tests for auto mode of a feature. 00167 * \return bool : true if mode is supported, false if not. 00168 */ 00169 virtual bool hasAuto() const =0; 00170 00171 00172 /*! \fn hasManual() const 00173 * \brief This method tests for manual mode of a feature. 00174 * \return bool : true if feature has manual support, false if not. 00175 */ 00176 virtual bool hasManual() const =0; 00177 00178 //@} 00179 }; 00180 } 00181 #endif