INtime SDK Help
CILLIntMbxHandler
This topic contains these sections:

This class is only available in the RT environment. It has been derived from CIIntHandler to ease the creation of an interrupt handler that processes interrupts by sending a message to a low level mailbox. It must be used to derive an application specific mailbox 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 CILLIntMbxHandler 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

Send

Member variables

The following member variables are only available to the members of the class and its derived classes:

CILLMbx * m_pMbx;

Inherited functions

All functions inherited from CIIntHandler can be used, although OnSignal implements the low level mailbox interface and is therefore essential. The Attach, Detach and Lookup functions cannot be used.

CILLIntMbxHandler::Constructor

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

CILLIntMbxHandler::Destructor

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

CILLIntMbxHandler::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 CILLIntMbxHandler::Create(
    WORD wLevel,
    CILLMbx * pMbx
);

Parameters

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

Status

E_OK
No exceptional conditions occurred.
E_PARAM
wLevel has a bad value, or pMbx does not point to an attached low-level mailbox.
E_CONTEXT
The interrupt level already has a handler.

CILLIntMbxHandler::Send

CILLIntMbxHandler::Send is called by the framework when an interrupt has occurred and a message must be sent; 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. CILLIntMbxHandler::Send sends a one byte message (containing a zero) to the low level mailbox. When overruling this call, there is no need to call the default call.

Syntax

void CILLIntMbxHandler::Send(void);
See Also

Interrupts