Data Check Sum; Initializing The Connection; Lines; Calculating Checksum - ReQuest Multimedia VideoReQuest Protocol Manual

Ir, rs-232, and ethernet interface guide
Hide thumbs Also See for VideoReQuest:
Table of Contents

Advertisement

Data Check Sum:

If you are not using Check Sum (based on your Flag settings), then set this byte to 00h.
Otherwise, see Calculating Checksum below for more information.
I n i t i a l i z i n g t h e C o n n e c t i o n
Before the VideoReQuest will respond to commands OR send you feedback, you must initialize
the connection. This tells the VideoReQuest a number of things, including whether or not you
wish to calculate Check Sum, how many lines of feedback you want at a time, etc. The
format for a "Start Communications" command is as follows:
Marker
Command
Type
FCh
A0h
05h
Currently, the only variable in this string is Flags, which you can set to whatever you want
depending on whether or not you want to use Acknowledgements or Check Sum (see Flags
on the previous page for more information). To simplify programming, it is recommended
that you use 00h, 00h for the flag bytes, which turns OFF both Acknowledgements and
Check Sum calculation.

Lines:

The Lines portion of the data section is a 1 byte value that tells the VideoReQuest how many
lines of text you want to receive at once on the Browse and Chapters pages. Currently, the
only supported value is 06h.
C a l c u l a t i n g C h e c k s u m
The Checksum can be calculated as follows:
1. Take the value of each byte in the string, up to but NOT including the checksum, and
multiply it by the position in the string from left to right (the leftmost byte is byte 1)
2. Add all the values calculated in step 1
3. Convert the result to Hex
4. The rightmost Hex byte is the checksum
This is done the same way for both the Header and the Data checksums.
Example Header Checksum:
Byte 1
Incoming String
Integer value
Position Multiplier
Result
Sum of all Results = 252+320+15+4+0+0+0+24 = 615 = 02h, 67h
The rightmost byte of the result is 67h, which is the calculated checksum. As we can see,
that matches the incoming checksum, so no data was lost.
Phone (518) 899-1254 • Fax (518) 899-1251 •
HEADER
Command
Flags
Subtype
01h
Byte 1
Byte 2
Byte 2
Byte 3
FC
A0
05
252
160
5
1
2
3
252
320
15
VideoReQuest Protocol Guide v1.1.2 - 5/18/04
Data Size
Chk Sum
00h
03h
00h
Byte 4
Byte 5
Byte 6
01
00
00
1
0
0
4
5
6
4
0
0
www.request.com
6 -
-
DATA
Cmd
Lines
Chk Sum
01h
06h
00h
Byte 7
Byte 8
Byte 9
00
03
67
0
3
n/a
7
8
9
0
24
n/a

Advertisement

Table of Contents
loading

Table of Contents