The
參數(shù)資料
型號(hào): 20-101-0446
廠商: Rabbit Semiconductor
文件頁(yè)數(shù): 59/100頁(yè)
文件大?。?/td> 0K
描述: MODULE RABBITCORE RCM2130
標(biāo)準(zhǔn)包裝: 1
系列: RabbitCore®
模塊/板類型: MPU 核心模塊
適用于相關(guān)產(chǎn)品: RCM2130
產(chǎn)品目錄頁(yè)面: 620 (CN2011-ZH PDF)
其它名稱: 316-1088
User’s Manual
55
Program Description
For operation, network addresses must be correctly defined at the start of this program.
The TCPCONFIG 1 macro in the sample program provides default settings for
MY_IP_ADDRESS
, which is the address of the RCM2100 module, MY_NETMASK, and
MY_GATEWAY
(which needs to be defined if you wish to ping systems outside the local
network). If you wish to ping systems using domain names instead of IP addresses, a valid
DNS server address must be defined for MY_NAMESERVER. These TCP/IP settings can be
changed as needed in the TCP_CONFIG.LIB library.
The IP address to be pinged is defined by PING_WHO. You will have to change this address
and recompile the program to ping different addresses. (In most real-world applications,
there should be some mechanism by which to dynamically define or select addresses.)
This address may be defined as a numeric IP address. If a gateway to the Internet and a
valid DNS server are specified, this definition may also be a fully-qualified domain name
(such as “www.rabbit.com”).
The program first defines three functions to control the LEDs—one to initialize them, and
then one each to drive the “ping out” and “ping in” LEDs.
The program begins by calling the LED initialization function pingleds_setup( ).
More importantly, it then calls sock_init( ), which initializes the packet driver and the
TCP manager using the compiler defaults. This function must always be called before any
other TCP/IP functions.
The program then resolves the address to be pinged into a numeric value. using the library
function resolve(). If the defined address is numeric, it converts the define string into
truly numeric form. If the address is a domain name, the function queries the indicated
DNS server to obtain the numeric address. (If the function is unable to resolve the
address—if, for example, the numeric address is incomplete or badly formed, or the DNS
server is unable to identify the domain name—the program will print a message to the
screen and terminate.)
The program then begins an endless loop using for(;;). Within this loop, the program
executes the following steps:
1. Calls tcp_tick() to perform the basic housekeeping functions for the socket;
2. As a costatement, waits for the duration of PING_DELAY (defined by default as 500 ms
or one-half second), issues a ping to the resolved address using the _ping() function,
and flashes LED DS2;
3. As a second costatement, checks for a ping return using the _chk_ping() function. If
the ping is successful, the costatement flashes LED DS3.
If you uncomment the #VERBOSE define near the beginning of the program, the ping
return costatement will also print a message to the screen indicating each successful ping.
相關(guān)PDF資料
PDF描述
AT25256-10PI-2.7 IC EEPROM 256KBIT 3MHZ 8DIP
345-030-524-801 CARDEDGE 30POS DUAL .100 GREEN
345-030-524-204 CARDEDGE 30POS DUAL .100 GREEN
345-030-524-202 CARDEDGE 30POS DUAL .100 GREEN
345-030-524-201 CARDEDGE 30POS DUAL .100 GREEN
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
20-101-0453 功能描述:模塊化系統(tǒng) - SOM RCM2300 RabbitCore Module RoHS:否 制造商:Digi International 外觀尺寸:ConnectCore 9P 處理器類型:ARM926EJ-S 頻率:150 MHz 存儲(chǔ)容量:8 MB, 16 MB 存儲(chǔ)類型:NOR Flash, SDRAM 接口類型:I2C, SPI, UART 工作電源電壓:3.3 V 最大工作溫度:+ 85 C 尺寸:1.97 in x 1.97 in x 6.1 in
20-101-0454 功能描述:模塊化系統(tǒng) - SOM RCM2200 RABBITCORE RoHS:否 制造商:Digi International 外觀尺寸:ConnectCore 9P 處理器類型:ARM926EJ-S 頻率:150 MHz 存儲(chǔ)容量:8 MB, 16 MB 存儲(chǔ)類型:NOR Flash, SDRAM 接口類型:I2C, SPI, UART 工作電源電壓:3.3 V 最大工作溫度:+ 85 C 尺寸:1.97 in x 1.97 in x 6.1 in
20-101-0455 功能描述:單板計(jì)算機(jī) BL2010 RoHS:否 制造商:Ampro By ADLINK 外觀尺寸:EPIC 處理器類型:Intel Atom D510 頻率:1.66 GHz 存儲(chǔ)容量:2 GB (max) 存儲(chǔ)類型:DDR2, L2 Cache 接口類型:Ethernet, PS/2, SATA, Serial, USB 工作電源電壓:5 V, 12 V 功耗:13 W 最大工作溫度:+ 70 C 尺寸:165.1 mm x 114.3 mm
20-101-0456 功能描述:單板計(jì)算機(jī) BL2020 RoHS:否 制造商:Ampro By ADLINK 外觀尺寸:EPIC 處理器類型:Intel Atom D510 頻率:1.66 GHz 存儲(chǔ)容量:2 GB (max) 存儲(chǔ)類型:DDR2, L2 Cache 接口類型:Ethernet, PS/2, SATA, Serial, USB 工作電源電壓:5 V, 12 V 功耗:13 W 最大工作溫度:+ 70 C 尺寸:165.1 mm x 114.3 mm
20-101-0457 功能描述:單板計(jì)算機(jī) BL2030 Board RoHS:否 制造商:Ampro By ADLINK 外觀尺寸:EPIC 處理器類型:Intel Atom D510 頻率:1.66 GHz 存儲(chǔ)容量:2 GB (max) 存儲(chǔ)類型:DDR2, L2 Cache 接口類型:Ethernet, PS/2, SATA, Serial, USB 工作電源電壓:5 V, 12 V 功耗:13 W 最大工作溫度:+ 70 C 尺寸:165.1 mm x 114.3 mm