Reserved Identifiers
131
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
GET_MULTI_BUFFER_
STRING
To access characters coming into a multi-buffer, you must first use
GET_MULTI_BUFFER_STRING
to transfer these characters into another array.
For example:
Device = GET_MULTI_BUFFER_STRING (Buffer, Array)
The next string in the specified buffer is copied to the specified array. All three
header bytes are stripped before the string is copied. If
CREATE_MUTLI_BUFFER
was defined using a
FirstDevice
and
LastDe-
vice
, the return value
Device
is the device number (not the Port number) of
the card that received the string. If
CREATE_MUTLI_BUFFER
was defined using
a
DeviceSet
, the return value
Device
is the device index into the
DeviceSet
array of the card that received the string.
GET_PULSE_TIME
This keyword returns the current duration of
PULSE
and
MINTO
commands as
set by
SET_PULSE_TIME
. Time is measured in tenths of a second; the default
is 5 (0.5 seconds).
PulseTime = GET_PULSE_TIME
GET_SERIAL_NUMBER
This function returns the 16-character serial number of the specified device.
The serial number of every device is established when manufactured.
SLONG GET_SERIAL_NUMBER(DEV Device,CHAR SerialNumber[ ] )
Parameters:
•
Device
: Device from which the serial number will be retrieved.
•
SerialNumber
: String that will receive the device's serial number.
Result:
• 0: Operation was successful
• -1: Specified device is invalid or is not online
Result = GET_SERIAL_NUMBER(128:1:0,serialNum)
GET_SYSTEM_NUMBER
This function returns the system number of the NetLinx Master.
INTEGER GET_SYSTEM_NUMBER( )
The result is an integer representing the system number of the NetLinx Master.
SystemNum = GET_SYSTEM_NUMBER() // get local system num
Note:
When it is a NetLinx function the ( ) are NOT OPTIONAL even if there are
no parameters.
GET_TIMER
This keyword returns an unsigned long integer representing the value currently
held by the system timer. Time is measured in tenths of a second. The system
timer is set to zero on power-up.
SystemTime = GET_TIMER
GET_UNIQUE_ID
This function returns a 48-bit hardware constant guaranteed to be unique in the
domain of NetLinx Masters. Possible uses for
GET_UNIQUE_ID
include identifi-
cation of a particular system for the purpose of providing system specific capa-
bility or limiting the functionality of a NetLinx program to operate on a specific
master.
CHAR[6] GET_UNIQUE_ID ( )
The result is a 48-bit constant returned as a 6-element character array.
SYSID = GET_UNIQUE_ID() // get the master's h/w ID
IF(sysID = "$00,$01,$09,$73,$25,$01")
{
// allow system to operate
normally
}
Содержание NETLINX PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...