Data Set Structures
NetLinx predefines several structures designed to work with NetLinx device numbers, channels, and levels. Data sets allow you to group and combine certain elements of NetLinx devices. There are three data set structures supported by NetLinx:
You have already seen the structure DEV structure in the DEFINE_DEVICE section. If we were to define the structure DEV in the DEFINE_TYPE section, it would look like this:
The actual instancing of the structure is unique to the DEV structure because you separate
the individual structure's elements with colons (:) instead of enclosing the structure with braces
{} and separating the elements with commas (,). For example:
Using the DEV structure, you create the structures DEVCHAN and DEVLEV like this:
DEVCHAN and DEVLEV instance and initialize similarly to other NetLinx structures:
DEV, DEVCHAN, and DEVLEV are structures built into the NetLinx language. You can do more with DEV, DEVCHAN, and DEVLEV than you could with structures you create within the code.
You can use the structures and arrays of the structures within many commands and situations where you would use a device number, a device and channel combination, or a device and level combination. These data sets allow you to combine devices, devices and channels, and devices and levels without using the DEFINE_COMBINE or DEFINE_CONNECT_LEVEL sections. This gives you the ability to combine certain pages of panels or to combine panels under certain conditions. In Axcess, once the panels were combined you were locked into that system configuration.
Instead of writing the following statements:
You can use device sets or channel sets to accomplish the same functionality:
or