EasyManuals Logo

AMX NETLINX PROGRAMMING LANGUAGE User Manual

AMX NETLINX PROGRAMMING LANGUAGE
246 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #155 background imageLoading...
Page #155 background image
Reserved Identifiers
139
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
LENGTH_STRING This function returns the length of a CHAR or WIDECHAR string. This function is
retained for compatibility with previous versions of Axcess and provides the
same information as LENGTH_ARRAY.
LONG LENGTH_STRING (CHAR STRING[ ])
LONG LENGTH_STRING (WIDECHAR STRING[ ])
Parameters:
• STRING: The input character string.
The result is the length of STRING. The string length can be set implicitly
through a literal or variable string assignment or explicitly by calling
SET_LENGTH_STRING. For example:
IF (LENGTH_STRING(STRING) > 0)
{
// process string
}
LENGTH_VARIABLE_TO_
STRING
(VARIABLE Encode)
This routine calculates how many bytes it takes to encode a variable.
LONG LENGTH_VARIABLE_TO_STRING (VARIABLE Encode)
Parameters:
• Encode: The variable (any type) to be encoded.
Result:
• >0: Number of bytes required to encode variable.
• 0: Encoded variable error, unrecognized type
LENGTH_VARIABLE_TO_
XML
CHAR LENGTH_VARIABLE_TO_XML(CONSTANT VARIANTARRAY A,
LONG B)
Where:
• A is the variable (any type) to be encoded.
• B is the encoding flag. These can be used together.
Value $01 is "Encode with Types". If the bit is set, types will be included for
every variable being encoded. The default is to not include types.
Value $10 is "Encoded CHAR arrays as using data list". See the Binary array
encoding section on pages 219.
Value $20 is "Array Encoding is Little-Ending".
The return is the length needed to encode the variable.
LEVEL_EVENT This keyword defines a level event handler and can only be used in the
DEFINE_EVENT section of the program. This type of handler is invoked when a
level change occurs on the specified device-channel. The level object is avail-
able to the level event handler as a local variable.
LEVEL_EVENT[DEVICE,LEVEL] or LEVEL_EVENT[([DEVLEV[ ])]
{
// level event handler
}
See the Event Handlers section on page 61 for more information.
LOCAL_VAR This keyword specifies a variable that is static. To provide compatibility with the
Axcess language, local variables may be declared right before the opening
brace for DEFINE_CALL declarations only.
If neither the LOCAL_VAR nor the STACK_VAR keyword is specified,
STACK_VAR is assumed.
See the Variables section on page 11 for more information.
LONG This keyword defines an intrinsic data type representing a 32-bit unsigned
value.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the AMX NETLINX PROGRAMMING LANGUAGE and is the answer not in the manual?

AMX NETLINX PROGRAMMING LANGUAGE Specifications

General IconGeneral
BrandAMX
ModelNETLINX PROGRAMMING LANGUAGE
CategorySoftware
LanguageEnglish

Related product manuals