
5-4 Advanced Features
Timer event
To install a timer event handler the function installTimerEventEventHandler must be called to
install the event handler with the device driver and the controller. This function accepts a single boolean
parameter. Passing true will install the event handler and allow timer events to be received. Passing
false will uninstall the event handler and prevent timer events being generated or received.
The period of the timer event can be set using the function setTimerEvent.
Digital input event
To install a digital input event handler the function installInputEventHandler must be called to
install the event handler with the device driver and the controller. This function accepts a single boolean
parameter. Passing true will install the event handler and allow digital input events to be received.
Passing false will uninstall the event handler and prevent digital input events being generated or
received.
When the input event handler is called, it is passed two parameters, a bank number and a bit pattern of
activated inputs. In the case of NextMove PCI where each PCI card has a bank of I/O (the main board is
bank 0, the first expansion board is bank 1 and the second expansion card is bank 2) the expansion cards
are read sequentially. It is advisable to set up a mask of digital inputs that will generate events using the
function setIMask.
Comms location changed event
To install a comms event handler the function installCommsEventHandler must be called to install the
event handler with the device driver and the controller. This function accepts a single boolean parameter.
Passing true will install the event handler and allow comms events to be received. Passing false will
uninstall the event handler and prevent comms events being generated or received.
When the comms event handler is called, it is passed a bit pattern indicating the changed comms.
Comms events will be generated when an external source modifies the contents of comms locations 1 to 5
using the function setComms. Only external access to the comms array will call the embedded comms
event handler. Calling the MML function setComms in an embedded application will not generate a call to
an embedded comms event handler.
DPR event
To install a DPR event handler the function installDPREventHandler must be called to install the
event handler with the device driver and the controller. This function accepts a single boolean parameter.
Passing true will install the event handler and allow DPR events to be received. Passing false will
uninstall the event handler and prevent DPR events being generated or received.
DPR events are generated by an application running on the controller calling the function doDPREvent.
This can be done in MintMT using the keyword DPREVENT. This function accepts a 16-bit code which is
passed to the DPR event handler running on the PC application.
Kommentare zu diesen Handbüchern