Reboot; Rebuild_Event() - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

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

REBOOT

REBUILD_EVENT()

144
This keyword causes the device to reset and is equivalent to doing a power
down and up on the master.
REBOOT (DEVICE)
Parameters:
• DEVICE = ICSP device number to reboot.
Note: Not all ICSP devices implement the reboot command.
DEVICE refers to:
- Device – a single device number.
- Dps – a DEV structure.
- D:P:S – a device specification such as 128:1:0.
- DEV[ ] – a device array.
Examples:
REBOOT (0:0:0)
or
REBOOT (0:1:0) or REBOOT (0)
Any of these examples will cause the master to reboot.
The NetLinx runtime supports a new NetLinx function, REBUILD_EVENT(),
that rebuilds the NetLinx event table for level, channel, button, timeline, and
data events. Modifications to variables used in event declarations affect
NetLinx event handling when REBUILD_EVENT() is called after the variables
are modified.
REBUILD_EVENT() works on a module-by-module basis (i.e. calling the func-
tion in one module does not affect the event table of another module).
REBUILD_EVENT() rebuilds the event table for variables modified in the same
block of code in which it resides.
With no braces, a REBUILD_EVENT() in DEFINE_START rebuilds event
tables that use any variable modified in DEFINE_START, above the
REBUILD_EVENT() statement.
You can reduce the scope of the REBUILD_EVENT() by delineating a block
with braces as shown at the bottom of the following example:
The code below demonstrates how to use the NetLinx REBUILD_EVENT()
function:
DEFINE_DEVICE
dvApoc1 = 128:1:0
dvApoc2 = 1505:1:0
dvApoc3 = 1303:1:0
(*----------------------------------------------------*)
(* CONSTANT DEFINITIONS GO BELOW *)
(*----------------------------------------------------*)
DEFINE_CONSTANT
DEV panel[] = {dvApoc1,dvApoc2}
(*----------------------------------------------------*)
(* DEFINE TYPE DEFINITIONS GO BELOW *)
(*----------------------------------------------------*)
DEFINE_TYPE
(*----------------------------------------------------*)
(* VARIABLE DEFINITIONS GO BELOW *)
(*----------------------------------------------------*)
DEFINE_VARIABLE
DEV curModApoc
(*----------------------------------------------------*)
(* EVENT DEFINITIONS GO BELOW *)
(*----------------------------------------------------*)
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