![Tern CAN-Engine Скачать руководство пользователя страница 44](http://html.mh-extra.com/html/tern/can-engine/can-engine_technical-manual_1089501044.webp)
Chapter 4: Software
CAN-Engine
_____________________________________________________________________________________
4-22
tcp_client.
This sample provides for a simple RS232-based TCP client. A 115200 baud, N81 serial connection is
opened on SER1 with a simple menu based interface. Supported commands include:
- ‘c’ (for establishing a new connection to a remote TCP server),
- ‘i’ (for listing local network configuration),
- ‘w’ (to begin sending/receiving data over the newly created
connection).
The relevant files are:
- tcp_client.c,
the user application which connects serial<->TCP data.
- socket.c,
socket implementation, as above.
- i2chip_hw.c,
hardware interfacce, as above.
- ae.lib,
library for A/R- family of boards, as above.
OR re.lib
tcp_echo
This sample provides for a simple TCP echo server on 4 ports: 4000, 4001, 4002, 4003. The 4 sockets are
established to listen to each of the 4 ports.
When a conection is established, the program monitors incoming data. Any data that is received is
immediately sent back out the same port.
The relevant files are:
-
tcp_echo.c,
the user application which echoes incoming TCP data.
-
socket.c,
socket implementation, as above.
-
i2chip_hw.c,
hardware interfacce, as above.
-
ae.lib,
library for A/R- family of boards, as above.
OR
re.lib