HOST.pdf - 第18页

BM 122/ 123 /1 33/ 221/2 31 HOST COMPUTER SYSTEM 3. 1 PanaP rotoc ol Descri pti on E35HEC- 4A-151- B0 3.1- 1 3.1. PanaProtoco l Description E35HEC- 4A-151- B0 3.1. 1 PanaProtocol Description Thi s chapter descri bes the …

100%1 / 64
BM122/123/133/221/231
HOST COMPUTER SYSTEM
3. PANAPROTOCOL LAN SPECIFICATIONS
E35HEC-4A-BB1-A0
3-2
E35HEC-4A-BB1-A0
3. PANAPROTOCOL LAN
SPECIFICATIONS
BM122/123/133/221/231
HOST COMPUTER SYSTEM
3.1 PanaProtocol Description
E35HEC-4A-151-B0
3.1-1
3.1. PanaProtocol Description
E35HEC-4A-151-B0
3.1.1 PanaProtocol Description
This chapter describes the data format of PanaProtocol LAN communication.
Information in this chapter are not necessary if the customer uses our host system software, but they are
required when structuring customer’s own host system.
The PanaProtocol LAN uses the socket communications method. It is a widespread technology for
general-purpose OS such as Windows and UNIX.
The PanaProtocol LAN uses the Winsock standard to accomplish communication.
In socket communication, computers are classified into server and client.
To perform communication between host computer and machine, set the computer on the machine side as
server to wait access from the host computer set as client
Socket communication physically uses a single LAN cable, while the PanaProtocol LAN has two logical
connections dedicated to C commands and R commands respectively, and different port numbers are
assigned to them.
This enables any R commands occurred during C command communication to be notified correctly.
Also, to increase communications speed during program download/upload, all lines of a program are
transferred in block.
Item Description Remarks
Protocol TCP/IP Socket method
Port No. 2 ports used for C commands
and R commands respectively.
Must not duplicate with other socket applications.
Port 1 (for C commands): 49152
Port 2 (for R commands): 49153
Client/server ‘Client’ -- Host computer
‘Server’ -- Machine
Socket
communication
Messages conform to
Panaprotocol
STX, ETX and check sum are not used.
BM122/123/133/221/231
HOST COMPUTER SYSTEM
3.1 PanaProtocol Description
E35HEC-4A-151-B0
3.1-2
3.1.2 Message Format
Port 1: Used for communication of C commands (other than R commands).
Port 2: Used for communication of R commands.
Data structure 1 (without data)
Command
(
Fixed length)
Char [256]
*1 Commands less than 256 characters will be padded with blank
spaces.
Data size
(
Fixed length)
Long
*2 Size of transmitted data (entity) in bytes
(Big endian TCP/IP format)
0 Char
0 Char
0 Char
*4 Terminator
Data structure 2 (with data)
Command
(
Fixed length)
Char [256]
*1 Commands less than 256 characters will be padded with blank
spaces.
Data size
(
Fixed length)
Long
*2 Size of transmitted data (entity) in bytes
(Big endian TCP/I format)
Data
(
Variable-length)
Char [size]
*3 Defined separately.
Not to be set when the data size is 0.
0 Char
0 Char
0 Char
*4 Terminator
Packets of these data structures are used to exchange commands and data during communication.
=HINT=
Big endian is a method used in TCP/IP or SPARC CPU, which sends the most significant digit first
when transferring 4-byte long variables on a network.
On Windows, functions htonl() and ntohl() are used for conversion with X86 format.
Regarding the formats of command, data size and data fields, refer to Command Description.
Port 1
Port 2
Machine
Port 1
Port 2
Host