INtime SDK Help
CIIntHandler

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.

Class members

Constructor

Destructor

Create

OnInterrupt

Enable

Member variables

The following member variable is only available to the members of the class and its derived classes:

WORD m_wLevel;

CIIntHandler::Constructor

The constructor has no arguments. It does not install an interrupt handler yet.

CIIntHandler::Destructor

The destructor removes the interrupt handler from the level, if one had been installed.

CIIntHandler::Create

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 object and also does not catalog any name.

Syntax

DWORD CIIntHandler::Create(
    WORD wLevel
);

Parameters

wLevel
Indicates the level for the interrupt to be serviced (specified as one of the values IRQ0_LEVEL up to IRQ15_LEVEL). The result is a status indicating success or failure.

Status

E_OK
No exceptional conditions occurred.
E_PARAM
wLevel has a bad value.
E_CONTEXT
The interrupt level already has a handler.

CIIntHandler::OnInterrupt

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.

Syntax

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.

CIIntHandler::Enable

This call enables or disables the hardware interrupt signal.

Syntax

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:

Status

E_OK
No exceptional conditions occurred.
E_CONTEXT
An interrupt overflow on the specified level exists.
E_EXIST
No interrupt handler is installed.
See Also

Interrupts