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

LptNote Class Reference

Implementation using PC LPT port to ring a bell for a single note. More...

#include <lptnote.h>

Inheritance diagram for LptNote:

Monitor::Utility::Note List of all members.

Public Methods

 LptNote (int newPortNumber, int newPortBit)
 Constructor. More...

virtual ~LptNote ()
 Destructor. More...

virtual void sound () const throw (Monitor::Utility::Note::Busy)
 Sound once. More...


Private Methods

void switchOff () const
 Switch off the output bit. More...


Private Attributes

int lptPort
 Address LPT port to use. More...

unsigned char bitOn
 Bitmasks to use. More...

unsigned char bitOff
unsigned char originalControlPort
 Saved LPT port settings. More...

unsigned char originalExtendedControlPort

Static Private Attributes

int busy = 0
 Class variable used to indicate PC LPT is in use, cannot be used concurrently by more than one Note instance. More...


Detailed Description

Implementation using PC LPT port to ring a bell for a single note.

Definition at line 46 of file lptnote.h.


Constructor & Destructor Documentation

LptNote::LptNote int    newPortNumber,
int    newPortBit
 

Constructor.

Parameters:
newLptNumber  Number of LPT port to use.
newLptBit  Bit of LPT port to use.

Definition at line 53 of file lptnote.cpp.

References _USEMYTRACE_, bitOff, bitOn, lptPort, originalControlPort, and originalExtendedControlPort.

LptNote::~LptNote   [virtual]
 

Destructor.

Definition at line 82 of file lptnote.cpp.

References _USEMYTRACE_, lptPort, originalControlPort, and originalExtendedControlPort.


Member Function Documentation

void LptNote::sound   const throw (Monitor::Utility::Note::Busy) [virtual]
 

Sound once.

Exceptions:
Note::Busy  Unable to sound.

Implements Monitor::Utility::Note.

Definition at line 99 of file lptnote.cpp.

References _USEMYTRACE_, and switchOff.

void LptNote::switchOff   const [private]
 

Switch off the output bit.

Definition at line 126 of file lptnote.cpp.

References _USEMYTRACE_, bitOff, busy, and lptPort.

Referenced by sound.


Member Data Documentation

unsigned char LptNote::bitOff [private]
 

Definition at line 94 of file lptnote.h.

Referenced by LptNote, and switchOff.

unsigned char LptNote::bitOn [private]
 

Bitmasks to use.

Definition at line 93 of file lptnote.h.

Referenced by LptNote.

int LptNote::busy = 0 [static, private]
 

Class variable used to indicate PC LPT is in use, cannot be used concurrently by more than one Note instance.

Definition at line 50 of file lptnote.cpp.

Referenced by switchOff.

int LptNote::lptPort [private]
 

Address LPT port to use.

Definition at line 88 of file lptnote.h.

Referenced by LptNote, switchOff, and ~LptNote.

unsigned char LptNote::originalControlPort [private]
 

Saved LPT port settings.

Definition at line 99 of file lptnote.h.

Referenced by LptNote, and ~LptNote.

unsigned char LptNote::originalExtendedControlPort [private]
 

Definition at line 100 of file lptnote.h.

Referenced by LptNote, and ~LptNote.


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