![IXXAT CAN@net II/Generic Скачать руководство пользователя страница 10](http://html1.mh-extra.com/html/ixxat/canatnet-ii-generic/canatnet-ii-generic_manual_2098901010.webp)
CAN@net II/Generic, Version 1.5
ASCII Protocol Server
10
4 ASCII Protocol Server
Every CAN@net II/Generic that is configured as server sends and receives data
on TCP Port 19227. This server handles the ASCII Protocol described in the
following sections.
4.1 ServerFunction
After power-up the CAN@net II/Generic automatically starts the protocol server
on TCP Port 19227.
The server accepts only a single connection. Additional connection requests are
rejected. After a connection is established, the server is ready to exchange data
and commands coded with the ASCII Protocol.
The ASCII Protocol is used to pack data (CAN messages) and commands for
the transfer over the Ethernet/TCP/IP network. E.g.: When the server receives
an ASCII Protocol message which contains a CAN message, it extracts the
original CAN message and sends it on the attached CAN bus. Messages seen
on the CAN bus are packed into the ASCII protocol and forwarded to the
connected Ethernet/TCP/IP client.
In addition to CAN messages, the server also handles commands. These can
be commands to start/stop the CAN controller, to set the CAN baudrate and so
on. It is also possible to retrieve the version numbers of the CAN@net II/Generic
firmware or of the ASCII-Protocol.
Whenever a connection to the server is closed or lost, the CAN@net II/Generic
is rebooted. The Device starts with the stored configuration.
4.2 ASCII Protocol
The following section describes the ASCII Protocol and how it is handled by the
ASCII Protocol server.
4.2.1 Basic Message Format
There are some basic rules the ASCII-Protocol does follow:
The messages are coded with ASCII characters
Valid characters are letters from a to z (no national characters) and numbers
from 0 to 9. There is no distinction between upper and lower case.
A message starts with a valid ASCII character and is terminated with \r\n. The
\r\n is separated by a space from the last significant character.
Directly after the \r\n the next message can follow.
Instead of using \r\n, any combination of \r and \n can be used (e.g. \r, \n, \n\n,
…).
Messages containing invalid characters are discarded.