Reserved Identifiers
113
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
DEFINE_CALL
This keyword defines the implementation of a NetLinx subroutine.
DEFINE_CALL '<name>' [(P1,P2,...)]
{
// body of subroutine
}
The subroutine name cannot be a previously defined device name, constant, or
variable, or a name assigned to a buffer or a wait statement.
DEFINE_CALL
names are case sensitive and may contain spaces.
Note
: Subroutines must be defined before they can be used. For this reason,
DEFINE_CALLS
should appear before the
DEFINE_START
,
DEFINE_EVENT
,
and
DEFINE_PROGRAM
sections.
DEFINE_COMBINE
This keyword defines the combination of functionally identical devices, such as
identically programmed touch panels. When the program references one of
these devices, all other combined devices are also referenced. The devices in
a given combine must be enclosed in parentheses.
The first device in the list (the primary device) must be a virtual device.
DEFINE_COMBINE(VDevice, Panel1, Panel2, Panel3)
The example below uses a device array (DEV[ ]) instead of specifying the indi-
vidual devices (Panel1, Panel2, and Panel3). Any input events for any device in
the array will appear to the program as coming from the virtual device. Output
changes directed to the virtual device or any device in the set is sent to all
devices in the array.
DEFINE_COMBINE(VDevice, DEV[ ])
See
COMBINE_DEVICES,
on page 108, for more information on virtual devices
and device arrays.
DEFINE_CONNECT_
LEVEL
This keyword defines level connections. A single connection is defined by list-
ing the device-level pairs inside parentheses.
The first level in the list (the primary level) must be a virtual level (a level on a
virtual device). A virtual level does not actually exist but merely represents one
or more levels on physical devices.
The example below combines the levels
[Device1, Level1]
and
[Device2, Level2]
.
(VDevice, Level1, Device1, Level1, Device2, Level1)
The next example combines all levels in the device-level array. Changes to any
level listed in the connection will automatically be reflected in the other levels so
that all level values are the same.
DEFINE_CONNECT_LEVEL(VDevLev, MyDL[ ])
By specifying a virtual level as the primary level, NetLinx code targets the virtual
level but operates on each physical level. Since the primary level is virtual, the
primary device (a virtual device) cannot be taken off-line or removed from the
system.
DEFINE_CONSTANT
This keyword defines program constants; the value of a constant cannot be
changed within the program.
DEFINE_CONSTANT
PLAY = 1
STOP = 2
STRING='HELLO'
Summary of Contents for NETLINX PROGRAMMING LANGUAGE
Page 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Page 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Page 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Page 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Page 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Page 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Page 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Page 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Page 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Page 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...