
Reserved Identifiers
133
NetLinx Programming Language Reference Guide
The Flags member is a bit field that is used for several different purposes.
Each bit is defined in the table below:
GET_URL_LIST flags member bit fields
Bit
Mathematical
Value
Normal
value
Meaning
Bit 0
1 (0x01)
1
0 = Establishes a UDP connection.
1 = Establishes a TCP connection.
Bit 1
2 (0x02)
0
Unused
Bit 2
4 (0x04)
0
Unused
Bit 3
8 (0x08)
0
Unused
Bit 4
16 (0x10)
0
Establishes a Temp Connection. A Temp Connection is
one that is set, but is not stored in flash, and therefore is
not restored when the master reboots. If the NetLinx code
is adding URL entries, it is recommended to make them
temporary so that the flash is not constantly being written,
especially since the code handles all the connections any-
way.
Bit 5
32 (0x20)
0
Source of URL.
0 = Programmed by the IDE.
1 = Programmed by NetLinx
ADD_URL_ENTRY
.
Bit 6
Bit 7
64 (0x40)
128 (0x80)
0
Encoded status indication (Read only).
These 2 bits together form one of 4 possible codes indicat-
ing the status of the connection.
• 0x00 - Looking up IP address or URL.
• 0x40 - Connecting to URL.
• 0x80 - Waiting for connection to establish.
• 0xC0 - Connected.
Keywords & Run-Time Library Functions (Cont.)
GET_URL_LIST
(Cont.)
Example:
URL_STRUCT UrlList [10]
Result = GET_URL_LIST(0:0:0,UrlList,0) (* Get ALL URLs *)
-or-
Result
=
GET_URL_LIST(0:0:0,UrlList,1)(*
Get
NetLinx-
programmed URLs *)
-or-
Result
=
GET_URL_LIST(0:0:0,UrlList,2)(*
Get
IDE-
programmed URLs *)
Note:
There is a known issue with this function: If you have only 1 URL entry, it
will return nothing. If you have 2 entries, it will return the second entry.
HEXTOI
This function converts an ASCII string containing the hexadecimal representa-
tion of a number to an unsigned 32-bit integer.
LONG HEXTOI (CHAR STRING[ ])
Parameters:
•
STRING
: Hexadecimal formatted string to be converted to an integer.
The result is a 32-bit unsigned integer representing the converted string. Any
non-hexadecimal characters in the string are ignored.
HEXTOI
returns a value
representing the first complete set of characters that represents an integer.
Valid characters are "0" through "9", "A" through "F" and "a" through "f". If no
valid characters are found, zero is returned as a result.
Num = HEXTOI('126EC') // Num = 75500
Summary of Contents for NETLINX PROGRAMMING LANGUAGE
Page 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Page 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Page 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Page 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Page 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Page 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Page 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Page 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Page 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Page 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...