Event Handlers - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Event Handlers

The NetLinx language provides a special program section called
incoming events/notifications. These handlers are stored in an event table providing quick access to code
that must be executed when an event is received. There are handlers to support five types of events:
The processing of an event associated with a given member of a device, channel,
device-channel, level, or device-level array must be completed before processing can
begin on another event associated with the same array.
All incoming events are stored in a queue pending processing. Messages are processed in the order they
are received. The steps to processing an event are:
1. Check all events for a handler matching the specified event. If a handler is found, run it.
2. If there is no event handler, run
Start
FIG. 1
Steps involved in processing an event
More than one handler can be defined for the same event. In this case, the handlers
are executed in the order in which they are defined in the program.
The event handler descriptions are:
NetLinx Programming Language Reference Guide
Button events include pushes, releases, and holds, which are associated with a push or release
on a particular device-channel.
Channel events occur when an output change (On/Off) is detected on a device-channel.
Data events include commands, strings, status, and error messages.
Level events are received as a result of a level change on a particular device.
Timeline events trigger events based on a sequence of times.
MAINLINE
Event
NO
handler
Run Mainline
available?
YES
Run event
Stop
handler
refers to a device specification:
DEVICE
DEVICE A single device number constant
A constant device specification such as 128:1:0
D:P:S
DEV[ ] A device array
DEFINE_EVENT
.
Event Handlers
to define handlers for
61

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents