Reserved Identifiers
149
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
SET_DNS_LIST
This function programs a domain name and the list of DNS servers that the
specified device will use to lookup domain names. It requires a pre-initialized
DNS_STRUCT
structure that will be sent to the specified device.
SLONG SET_DNS_LIST(DEV Device,DNS_STRUCT DnsList )
Parameters:
•
Device
: Device to which the DNS list will be sent
•
DnsList
: A
DNS_STRUCT
that contains the list of DNS server IP addresses
that will be programmed in to the device
Result:
• 0: Operation was successful
• -1: Specified device is invalid or is not online
• -2: Time out occurred
• -3: Function is already actively attempting to set a DNS list (i.e. busy)
• -4: Set DNS failed
• -5: A portion of the DNS structure contains invalid information
DNS_STRUCT DnsList
DnsList.DomainName = 'amx.com'
DnsList.DNS1 = '19.00.100.00'
DnsList.DNS2 = ''
DnsList.DNS3 = ''
Result = SET_DNS_LIST(0:0:0,DnsList) // set master's list
See
GET_DNS_LIST
, on page 129, for a description of the
DNS_STRUCT
struc-
ture.
SET_IP_ADDRESS
This function programs the TCP/IP configuration of the specified device. The
function requires a pre-initialized
IP_ADDRESS_STRUCT
structure that will be
sent to the specified device.
SLONG SET_IP_ADDRESS(DEV Device,IP_ADDRESS_STRUCT
IPAddress )
Note
:
SET_IP_ADDRESS
takes effect after the system is rebooted.
Parameters:
•
Device
: Device to which the
IPAddress
list will be sent.
•
IPAddress
: An
IP_ADDRESS_STRUCT
containing the desired TCP/IP
configuration for the specified device.
Result:
• 0: Operation was successful.
• -1: Specified device is invalid or is not online.
• -2: Time out occurred.
• -3: Function is already actively attempting to set an IP Address (i.e. busy).
The function requires an
IP_ADDRESS_STRUCT
..
The
IP_ADDRESS_STRUCT
is predefined as follows:
STRUCTURE IP_ADDRESS_STRUCT
{
CHAR Flags // Configuration flags
CHAR HostName[128] // Host name
CHAR IPAddress[15] // IP address unit
CHAR SubnetMask[15] // subnet mask
CHAR Gateway[15] // IP address of gateway
}
Содержание NETLINX PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...