Devlev - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Reserved Identifiers
Keywords & Run-Time Library Functions (Cont.)
DEVICE_INFO
(Cont.)

DEVLEV

118
Example:
DEFINE_DEVICE
dvNL = 0:1:0
DEFINE_VARIABLE
DEV_INFO_STRUCT sDeviceInfo
DEFINE_EVENT
DATA_EVENT[dvNL]
{
ONLINE:
{
DEVICE_INFO(dvNL, sDeviceInfo)
SEND_STRING 0,"'MANUFACTURER_STRING=',
sDeviceInfo.MANUFACTURER_STRING"
SEND_STRING
0,"'MANUFACTURER=',ITOA(sDeviceInfo.MANUFACTURER)"
SEND_STRING 0,"'DEVICE_ID_STRING=',
sDeviceInfo.DEVICE_ID_STRING"
SEND_STRING
0,"'DEVICE_ID=',ITOA(sDeviceInfo.DEVICE_ID)"
SEND_STRING 0,"'VERSION=', sDeviceInfo.VERSION"
SEND_STRING
0,"'FIRMWARE_ID=',ITOA(sDeviceInfo.FIRMWARE_ID)"
SEND_STRING 0,"'SERIAL_NUMBER=',
sDeviceInfo.SERIAL_NUMBER"
SEND_STRING
0,"'SOURCE_TYPE=',ITOA(sDeviceInfo.SOURCE_TYPE)"
SEND_STRING 0,"'SOURCE_STRING=',
sDeviceInfo.SOURCE_STRING"
}
}
}
Telnet displays this information:
MANUFACTURER_STRING=AMX Corp.
MANUFACTURER=1
DEVICE_ID_STRING=NXC-ME260
DEVICE_ID=256
VERSION=v2.30.128
FIRMWARE_ID=256
SERIAL_NUMBER=2010-00372
SOURCE_TYPE=1
SOURCE_STRING=00A066452001
This keyword defines a data type (structure) containing fields used to represent
a specific device number, port, system, and level. This structure is used to
implement an array DEVLEV[ ].
STRUCTURE DEVLEV
{
DEV
Device
INTEGER
Level
}
NetLinx Programming Language Reference Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents