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 #175 background imageLoading...
Page #175 background image
Reserved Identifiers
159
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
VARIABLE_TO_XML SINTEGER VARIABLE_TO_XML(CONSTANT VARIANTARRAY A,CHAR
B[], LONG C, LONG D)
Where:
• A is the variable (any type) to be encoded:
• B is the CHAR array to hold the resulting XML.
• C is the beginning encoding position. Encoding will start as B[C].
• D 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. The
constant XML_ENCODE_TYPES can be used to specify this flag.
Value $10 is "Encoded CHAR arrays as using data list". The constant
XML_ENCODE_CHAR_AS_LIST can be used to specify this flag. See the
Encoding and Decoding: Binary and XML section on page 209.
Value $20 is "Array Encoding is Little-Ending". The constant
XML_ENCODE_LE can be used to specify this flag.
The return value is:
• 3 = XML decode data type mismatch
• 2 = XML decode data too small, more members in structure
• 1 = Structure too small, more members in XML decode string
• 0 = Decoded OK
• -1 = Decode variable type mismatch
• - 2 = Decode data too small, decoder ran out of data. Most likely poorly
formed XML.
• -3 = Output character buffer was too small.
Example:
DEFINE_TYPE
STRUCTURE _AlbumStruct
{
LONG lTitleID
CHAR sArtist[100]
CHAR sTitle[100]
}
DEFINE_VARIABLE
_AlbumStruct MyAlbumStruct[3]
LONG lPos
SLONG slReturn
SLONG slFile
SLONG slResult
CHAR sBinaryString[10000]
CHAR sXMLString[50000]
DEFINE_START
MyAlbumStruct[1].lTtleID = 11101000
MyAlbumStruct[1].sArtist = ‘Buffet, Jimmy’
MyAlbumStruct[1].sTitle = ‘Living & Dying in ¾ Time’
MyAlbumStruct[2].lTtleID = 11101012
MyAlbumStruct[2].sArtist = ‘Sinatra, Frank’
MyAlbumStruct[2].sTitle = ‘Come Fly With Me’
MyAlbumStruct[3].lTtleID = 33101000
MyAlbumStruct[3].sArtist = ‘Holiday, Billie’
MyAlbumStruct[3].sTitle = ‘Lady in satin’

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