Hextoi - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

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
Bit 0
1 (0x01)
Bit 1
2 (0x02)
Bit 2
4 (0x04)
Bit 3
8 (0x08)
Bit 4
16 (0x10)
Bit 5
32 (0x20)
Bit 6
64 (0x40)
Bit 7
128 (0x80)
Keywords & Run-Time Library Functions (Cont.)
GET_URL_LIST (Cont.)

HEXTOI

NetLinx Programming Language Reference Guide
Normal
Meaning
value
1
0 = Establishes a UDP connection.
1 = Establishes a TCP connection.
0
Unused
0
Unused
0
Unused
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.
0
Source of URL.
0 = Programmed by the IDE.
1 = Programmed by NetLinx ADD_URL_ENTRY.
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.
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.
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')
Reserved Identifiers
// Num = 75500
133

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents