EasyManua.ls Logo

AMX NETLINX PROGRAMMING LANGUAGE - Ip_Server_Open; Itoa; Itohex; Ldate

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
Loading...
Reserved Identifiers
137
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
IP_SERVER_OPEN This function opens a server port to listen for client requests.
SLONG IP_SERVER_OPEN (INTEGER LocalPort,
LONG ServerPort,
INTEGER Protocol)
Parameters:
LocalPort: The local port number to open. This number must be passed to
IP_Server_Close to close the port.
ServerPort: The number of the server port to listen on.
Protocol: The transport protocol to use:
1 = TCP
2 = UDP
If this parameter is not specified, TCP (1) is assumed. The constants
IP_TCP and IP_UDP can be used to specify this parameter.
Result (via ONERROR event):
2: General Failure
10: Binding error
11: Listening error
14: Local port already used
15: UDP socket already listening
16: too many open sockets
Example:
IP_SERVER_OPEN (PORT1, SvPort, IP_TCP)
SeeIP Communication section on page 189 for more information.
ITOA This function converts a 32-bit signed integer to a decimal ASCII string.
CHAR[ ] ITOA (LONG Num)
Parameters:
Num: The 32-bit unsigned integer to convert to a decimal string.
Result:
A character string that contains the decimal representation of the specified
integer.
STRING = ITOA(501)// STRING = '501'
ITOHEX This function converts a 32-bit unsigned integer to an ASCII string containing
the hexadecimal representation of the number.
CHAR[ ] ITOHEX (LONG Num)
Parameters:
Num: The 32-bit unsigned integer to convert to a hexadecimal string.
Result:
A character string that contains the hexadecimal representation of the speci-
fied integer.
STRING = ITOHEX(1000) // STRING = '3E8'
LDATE The system variable LDATE returns the current date in (mm/dd/yyyy) string for-
mat.
IF (LDATE = '12/25/2000'){}

Table of Contents

Related product manuals