WWW.SSTCOMM.COM
16
Four-byte register swap is 2 registers for unit exchange, and the exchange mode is shown in the following table:
Before exchange
After exchange
Byte index
Byte value
Byte index
Byte value
0
0x12
0
0x56
1
0x34
1
0x78
2
0x56
2
0x12
3
0x78
3
0x34
Four-Byte Big-endian and Little-endian Swap
When using Four-Byte Big-endian and Little-endian Swap, the number of bytes exchanged must be 4 times
integer.
Four-Byte Big-endian and Little-endian Swap is 4 bytes for unit exchange, and the exchange mode is shown in
the following table:
Before exchange
After exchange
Byte index
Byte value
Byte index
Byte value
0
0x12
0
0x78
1
0x34
1
0x56
2
0x56
2
0x34
3
0x78
3
0x12
3.3.1.9 Bytes Exchange Way in Various Protocols
The schematic diagram is as follows:
As you can see from the figure, the byte-exchange program is only a process between the buffer and the request
or response frame of the command, without changing the length of the total data, only changes the organization
way of the data.
Command execution mode:
1. Read a certain length of data from the buffer (input or output) and put it in the frame buffer of the command.
Then, send the command.
2. When the command has a response, the data is separated from the response frame of the command and copied
Содержание GT200-PN-RS
Страница 53: ...WWW SSTCOMM COM 53...