Data Events - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

NetLinx Programming Overview

Data Events

Data Events provide some interesting capabilities in a NetLinx system. At first glance, it seems to be
concerned with receiving strings of data either from a serial data device such as an NXC-COM2 card or
an interface device such as a touch panel or WebLinx. While this is a valid function,
many more capabilities and works with many devices. The structure for a
DATA_EVENT [<device>]
{
In Axcess, strings are handled in mainline code. Between each pass through mainline, the data received
by a device is placed within a created buffer. The next pass through mainline allows the Axcess program
to evaluate the string. This has two limitations:
Because the role of mainline is diminished in NetLinx and events can be processed quickly, NetLinx is
able to process data received by a
message queue and triggers a data event. If a buffer has been created for the device, the data is placed
within the buffer and can be used by either the
The data can be evaluated in two ways. The actual string that is received by the message queue can be
evaluated using the
end of the device's buffer. This becomes a factor when receiving large strings, or when receiving strings
with an embedded string length or start and end characters.
if the entire string has been received before processing it; however, the evaluation is done immediately
24
COMMAND:
{
(* command data event handler *)
}
STRING:
{
(* string data event handler *)
}
ONLINE:
{
(* online data event handler *)
}
OFFLINE:
{
(* offline data event handler *)
}
ONERROR:
{
(* error data event handler *)
}
}
First, Axcess must evaluate the contents of the buffer with each pass through mainline,
whether there is data in the buffer or not. This adds to the length of mainline and slows
mainline.
Second, data is only received into the buffer between passes through mainline. In large
systems, data processing is delayed, and some buffers may be overrun and some data may be
lost.
DATA_EVENT
object within the event. The string in
DATA.TEXT
DATA_EVENT
in real time. When data is received, it enters the
or mainline.
DATA_EVENT
DATA.TEXT
then evaluates the buffer to see
DATA_EVENT
NetLinx Programming Language Reference Guide
has
DATA_EVENT
is:
is also added to the

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents