Reserved Identifiers
116
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
DEFINE_VARIABLE This keyword declares global variables. Any variable defined in this section is
static (its value is maintained throughout the duration of program execution)
with module scope (it is accessible from any instruction in the current module).
DEFINE_VARIABLE
INTEGER INT1
FLOAT FP1
VOLATILE INTEGER BIGARRAY[1000][1000]
Note: 1000 marks the limit of the string.
See the Variables section on page 11 for more information.
DELETE_URL_ENTRY This function deletes a URL entry to the specified device. The function requires
a pre-initialized URL_STRUCT that will be sent to the specified device.
SLONG DELETE_URL_ENTRY (DEV Device, URL_STRUCT Url)
Parameters:
• Device: Device to which the URL will be sent.
• Url: URL_STRUCT that will be programmed into the device.
Result:
•0: Success
• -1: Specified device is invalid or is not online
• -2: Time out occurred
• -3: Function is already actively deleting a URL entry (i.e. busy)
• -4: Delete failed
See GET_URL_LIST for a description of the URL_STRUCT structure.
DEV This keyword defines a data type (structure) used to represent a specific device,
port, and system. In NetLinx, the DEV structure is the actual (internal) represen-
tation of a NetLinx device.
STRUCTURE DEV{INTEGER NumberINTEGER PortINTEGER System}
DEVCHAN This keyword defines a data type (structure) containing fields used to represent
a specific device number, port, system, and channel.
STRUCTURE DEVCHAN
{
DEV Device
INTEGER Channel
}
DEVICE_ID Every device in the NetLinx system has a unique ID number identifying its
device type, such as an infrared/serial card or touch panel. The DEVICE_ID
keyword returns the ID number pertaining to the specified device. If the device
does not exist in the system, zero is returned. This keyword is usually used to
determine whether or not a device is present in the system.
DeviceID = DEVICE_ID(Device)
For example:
IF (DEVICE_ID(55:1:0) <> 0)
{
// device 55 exists in the system
}
DEVICE_ID_STRING This keyword returns a string description/model number for the specified
device.
DeviceString = DEVICE_ID_STRING(55:1:0)