PPort Class Reference

To access and share the parallel port between severa objects. More...

#include <PPort.hpp>

List of all members.

Public Member Functions

bool setBit (const void *ID, int bit, bool stat)
 set a data bit of the // port.
bool registerBit (const void *ID, int bit)
 register a bit for object ID.
bool unregisterBit (const void *ID, int bit)
 release a bit.
bool isRegisterBit (const void *ID, int bit) const
 test if a bit is registerd.
bool commit ()
 set the bits off the // port according to previous call to setBit().

Static Public Member Functions

static PPortgetPPort (int ioPort)
 return the PPort object associated to the given IO port.


Detailed Description

To access and share the parallel port between severa objects.


Member Function Documentation

PPort * PPort::getPPort ( int  ioPort  )  [static]

return the PPort object associated to the given IO port.

if no PPort is already associated to the port, one is created

bool PPort::setBit ( const void *  ID,
int  bit,
bool  stat 
)

set a data bit of the // port.

Returns:
false if IO port not set, or bit not registered by ID.
Parameters:
ID the identifier used to register the bit
stat the stat wanted for the given bit
bit the bit to set. They are numbered from 0 to 7.

bool PPort::registerBit ( const void *  ID,
int  bit 
)

register a bit for object ID.

Parameters:
ID the identifier used to register the bit it should be the 'this' pointer.
bit the bit of the // port to register
Returns:
false if the bit is allready register with an other ID, or if the // port is not initialised.

bool PPort::unregisterBit ( const void *  ID,
int  bit 
)

release a bit.

Parameters:
ID the identifier used to register the bit
bit the bit to register.
Returns:
false if the bit was not registered by ID or if the if the // port is not initialised.

bool PPort::isRegisterBit ( const void *  ID,
int  bit 
) const

test if a bit is registerd.

Parameters:
ID the identifier used to register the bit
bit the bit to test.
Returns:
false if the bit was not registered by ID or if the if the // port is not initialised.


The documentation for this class was generated from the following files:
Generated on Sat Oct 27 09:21:05 2007 for QastroCam by  doxygen 1.5.1