Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

l1394_vcr.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           vcr.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 VCR_H
00019 #define VCR_H
00020 
00021 #include "l1394_deviceregister.h"
00022 #include "l1394_eventhandle.h"
00023 #include "l1394_device.h"
00024 #include "l1394_timecode.h"
00025 #define EXECUTE 1
00026 #define TEST 0
00027 
00028 namespace L1394
00029 {
00030 
00031 enum{
00032   DVCR_SPEED_32 = 0,
00033   DVCR_SPPED_STANDARD,
00034   DVCR_SPPED_176,
00035   DVCR_192,
00036 
00037   DVHS_SPEED_STANDARD,
00038 
00039   VHS_SPEED_33,
00040   VHS_SPEED_32,
00041   VHS_SPEED_STANDARD
00042 
00043   };
00044 
00045 }//end namespace
00046 
00047 namespace L1394
00048 {
00049 /*! \class Vcr
00050   *  \ingroup L1394_Device
00051   * \brief This class defines the interface for Vcrs.
00052   *
00053   * This class is base-class for all Vcrs. The interface provides functions
00054   *  for the most common features. If you access a feature of the Vcr object
00055   *  the DeviceRegister object is returned and you can specify how to execute the command.
00056   * (See also the DeviceRegister class documentation.)
00057   * A little example show the idea.
00058   *
00059   * \code
00060   *  Session *session = GetSession();
00061   * Vcr* my_vcr = session->findVcr();
00062   * if( my_vcr->fastForward()->hasFeature() )
00063   * {
00064   *   int response = my_vcr->forward()->send();
00065   *   switch(response) //for all response codes see method send() in class DeviceRegister.
00066   *   {
00067   *     case ACCEPTED : cout << "Command accepted" << endl; break;
00068   *     case REJECTED : cout << "Command rejected" << endl; break;
00069   *     default : cout << "Unhandled case" << endl; break;
00070   *   }
00071   * }
00072   * \endcode
00073   *@author Michael Repplinger
00074   */
00075 
00076 class Vcr : public Device {
00077 
00078 public:
00079 
00080   Vcr(Node* parent_node);
00081 
00082 /*! \fn ~Vcr()
00083   * \brief destructor
00084   */
00085   virtual ~Vcr(){};
00086 
00087 /*! \name Vcr Interface
00088   * This functions describe the interface of any vcr
00089   */
00090 //@{
00091   virtual DeviceType getDeviceType() const {return _Vcr;}
00092 
00093 /*! \fn play()
00094   * \brief With this method you can access the play feature.
00095   * \return DeviceRegister* : pointer to the DeviceRegister.
00096   */
00097   virtual int play()                    =0;
00098 
00099 
00100 /*! \fn pause()
00101   * \brief With this method you can access the pause feature.
00102   * \return DeviceRegister* : pointer to the DeviceRegister.
00103   */
00104   virtual int pause()                   =0;
00105 
00106 /*! \fn timeCode getTimeCode()
00107   * \brief With this method you can get the actual timecode.
00108   * \return Timecode : the actual timecode.
00109   */
00110   virtual Timecode getTimeCode()                       =0;
00111 
00112 /*! \fn recordingDate(const Timecode time_begin)
00113   * \brief With this method you can access the recording date feature.
00114   * \return DeviceRegister* : pointer to the DeviceRegister object.
00115   */
00116   virtual const DeviceRegister* recordingDate(const Timecode time_begin)   =0;
00117 
00118 
00119 /*! \fn transportState()
00120   * \brief With this method you can get the actual status of a vcr.
00121   * \return DeviceRegister* : pointer to the DeviceRegister object.
00122   */
00123    virtual const DeviceRegister* transportState()   =0;
00124 
00125 
00126 /*! \fn search(const Timecode)
00127   * \brief This method stop the tape at a specific position.
00128   * \return DeviceRegister* : pointer to the DeviceRegister.
00129   */
00130   virtual const DeviceRegister* search(const Timecode)   =0;
00131 
00132 
00133 /*! \fn nextFrame()
00134   * \brief With this method you can access the nextFrame feature.
00135   *
00136   * If you execute the command, the vcr increase one frame, from actual
00137   * position.
00138   * \return DeviceRegister* : pointer to the DeviceRegister.
00139   */
00140   virtual const DeviceRegister* nextFrame()               =0;
00141 
00142 /*! \fn previousFrame()
00143   * \brief With this method you can access the nextFrame feature.
00144   *
00145   * If you execute the command, the vcr decrease one frame, from actual
00146   * position.
00147   * \return DeviceRegister* : pointer to the DeviceRegister.
00148   */
00149   virtual const DeviceRegister* previousFrame()           =0;
00150 
00151 
00152 /*! \fn slowForward()
00153   * \brief With this method you can access the slowForward feature.
00154   * \return DeviceRegister* : pointer to the DeviceRegister.
00155   */
00156   virtual const DeviceRegister* slowForward()             =0;
00157 
00158 
00159 /*! \fn slowReverse()
00160   * \brief With this method you can access the slowReverse feature.
00161   * \return DeviceRegister* : pointer to the DeviceRegister.
00162   */
00163   virtual const DeviceRegister* slowReverse()             =0;
00164 
00165 
00166 /*! \fn forward()
00167   * \brief With this method you can access the forward feature.
00168   * \return DeviceRegister* : pointer to the DeviceRegister.
00169   */
00170   virtual const DeviceRegister* forward()                 =0;
00171 
00172 
00173 /*! \fn reverse()
00174   * \brief With this method you can access the reverse feature.
00175   * \return DeviceRegister* : pointer to the DeviceRegister.
00176   */
00177   virtual const DeviceRegister* reverse()                 =0;
00178 
00179 
00180 /*! \fn fastForward()
00181   * \brief With this method you can access the fastForward feature.
00182   * \return DeviceRegister* : pointer to the DeviceRegister.
00183   */
00184   virtual const DeviceRegister* fastForward()             =0;
00185 
00186 
00187 /*! \fn rewind()
00188   * \brief With this method you can access the rewind feature.
00189   * \return DeviceRegister* : pointer to the DeviceRegister.
00190   */
00191   virtual const DeviceRegister* rewind()                  =0;
00192 
00193 
00194 /*! \fn record()
00195   * \brief With this method you can access the record feature.
00196   * \return DeviceRegister* : pointer to the DeviceRegister.
00197   */
00198   virtual const DeviceRegister* record()                  =0;
00199 
00200 
00201 /*! \fn recordingSpeed(const int speed)
00202   * \brief With this method you can access the recordingSpeed feature.
00203   * \param speed : the speed value.
00204   * \return DeviceRegister* : pointer to the DeviceRegister.
00205   */
00206   virtual const DeviceRegister* recordingSpeed(const int speed)   =0;
00207 //@}
00208 };
00209 }
00210 #endif

Generated on Wed Aug 24 00:36:41 2005 for L1394 by doxygen 1.4.2
L1394 library (NMM) grahics.cs.uni-sb.de/~repplix/l1394_home/