This class is only available in the RT environment. It eases the creation of an interrupt handler that processes interrupts independently. It must be used to derive an application specific interrupt handler class, or it can be used directly to control an interrupt handler object.
The class contains a static call that acts as an interrupt handler. When deriving from the CIIntHandler class and overruling the handler, care should be taken in obeying all rules on the contents of such a handler.
Constructor
Destructor
Create
OnInterrupt
Enable
The following member variable is only available to the members of the class and its derived classes:
WORD m_wLevel;
The constructor has no arguments. It does not install an interrupt handler yet.
The destructor removes the interrupt handler from the level, if one had been installed.
If a handler is currently installed, it is first removed. Then this call installs a new interrupt handler for the given level. Note that this call does not create any RT obje ct and also does not catalog any name.
DWORD CIIntHandler::Create( WORD wLevel );
wLevel
E_OK
E_PARAM
wLevel
has a bad value.
E_CONTEXT
CIIntHandler::OnInterrupt is called by the framework when a signal has been received successfully; it should never be called explicitly. Inside this call scheduling has been stopped, so calls like sending to a low level mailbox are allowed; do not use the address of a local variable inside this call and do not call any call that uses such an address. CIIntThread::OnSignal does nothing. When overruling this call, there is no need to call the default call.
void CIIntHander::OnInterrupt(void);
Note that this call is executed in the context of the interrupt handler, so only a limited set of calls is available.
This call enables or disables the hardware interrupt signal.
DWORD CIIntHandler::Enable(BOOLEAN bState);
bState Indicates the required state for the level: TRUE means enabled (default), FALSE means disabled. The result is a status indicating success or failure:
E_OK
E_CONTEXT
E_EXIST