Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

lptnote.h

Go to the documentation of this file.
00001 #ifndef __LPTNOTE_H_INCLUDED__
00002 #define __LPTNOTE_H_INCLUDED__
00003 
00004 // $Id
00005 
00006 //**********************************************************************
00007 //                                                                     *
00008 //    Description:   Implementation using PC LPT port to ring a bell   *
00009 //                   for a single note.                                *
00010 //                                                                     *
00011 //    Author:        Chris White (whitecf@bcs.org.uk)                  *
00012 //                                                                     *
00013 //    Copyright (C) 2003  Monitor Computing Services Ltd.              *
00014 //                                                                     *
00015 //    This program is free software; you can redistribute it and/or    *
00016 //    modify it under the terms of the GNU General Public License      *
00017 //    as published by the Free Software Foundation; either version 2   *
00018 //    of the License, or any later version.                            *
00019 //                                                                     *
00020 //    This program is distributed in the hope that it will be useful,  *
00021 //    but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00022 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00023 //    GNU General Public License for more details.                     *
00024 //                                                                     *
00025 //    You should have received a copy of the GNU General Public        *
00026 //    License (http://www.gnu.org/copyleft/gpl.html) along with this   *
00027 //    program; if not, write to:                                       *
00028 //       The Free Software Foundation Inc.,                            *
00029 //       59 Temple Place - Suite 330,                                  *
00030 //       Boston, MA  02111-1307,                                       *
00031 //       USA.                                                          *
00032 //                                                                     *
00033 //**********************************************************************
00034 //                                                                     *
00035 //    Notes:                                                           *
00036 //                                                                     *
00037 //**********************************************************************
00038 
00039 
00040 #include <note.h>
00041 
00042 
00046 class LptNote : public Monitor::Utility::Note
00047 {
00048 public:
00055     LptNote(int    newPortNumber, int    newPortBit);
00056 
00060     virtual ~LptNote();
00061 
00067     virtual void
00068     sound() const
00069     throw (Monitor::Utility::Note::Busy);
00070 
00071 
00072 private:
00076     void
00077     switchOff() const;
00078 
00083     static int    busy;
00084     
00088     int    lptPort;
00089 
00093     unsigned char    bitOn;
00094     unsigned char    bitOff;
00095 
00099     unsigned char    originalControlPort;
00100     unsigned char    originalExtendedControlPort;
00101 };
00102 
00103 #endif // __LPTNOTE_H_INCLUDED__

Generated on Wed Oct 29 20:55:43 2003 for Bellmaster BC Turbo Vision by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002