![Logitech Magellan/SPACE MOUSE Classic Programmer'S Manual Download Page 9](http://html1.mh-extra.com/html/logitech/magellan-space-mouse-classic/magellan-space-mouse-classic_programmers-manual_1937109009.webp)
9
Data Structures
Data packets are transmitted from the
Magellan/SPACE MOUSE to the computer using
the data structures described below. Note that
these packet structures cannot be used as
commands.
Standard Data Structure
Structure:
d <X3><X2><X1><X0>
<Y3><Y2><Y1><Y0>
<Z3><Z2><Z1><Z0>
<A3><A2><A1><A0>
<B3><B2><B1><B0>
<C3><C2><C1><C0>\r
<X,Y,Z,A,B,C
3,2,1,0>
The data packet transmits each
of the six 16-bit inputs (X, Y, Z,
A, B and C) coded into four
nibbles. The higher-order nibble
is transmitted first, followed by
the lower-order nibble. The
following formula is used to
calculate each of the six inputs:
<input> = <input3> * 4096 +
<input2> * 256 +
<input1> * 16 +
<input0> * 1 – 32768
As a rule, three translational values and three
rotational values are transmitted in the data
packet INDEPENDENT of any mode settings
(which utilize the mode command "m..\r"). The
data packets are transmitted automatically if
and only if the following conditions are met:
1)
The data packet contains nonzero values. If
all translational and rotational values are
zero, only one data packet is transmitted.
Further data packets are not transmitted
until nonzero values appear in the data
packet.
2)
The maximum programmed time period is
exceeded. The maximum time period is set
with the data rate command "p..\r". If this
period is exceeded, the Magellan/SPACE
MOUSE transmits a data packet without
request.
3)
The minimum time period is exceeded and
a data packet has been requested via the
data command "dQ\r". If data packets are
requested more often than the minimum
time period permits, the requests are
ignored.
As an example, suppose the Magellan/SPACE
MOUSE transmits the following data packet:
dHBA5G?HKH000H0A6GNA6H06B\r
The corresponding values are as follows.
Input
Characters
Decimal
Calculated
Input Value
X
HBA5
8,2,1,5
533
Y
G?HK
7,15,8,11
-117
Z
H000
8,0,0,0
0
A
H0A6
8,0,1,6
22
B
GNA6
7,14,1,6
-490
C
H06B
8,0,6,2
98
Error Message Structure
Structure:
e<nibble1><nibble2><nibble3>\r
<nibble1>
= 1
Magellan/SPACE MOUSE has
received an illegal command byte,
which is returned to the computer
with the parameters
<nibble2>
and
<nibble3>. After transmission
of the error message the
Magellan/SPACE MOUSE is ready
to receive a new command.
= 2
Magellan/SPACE MOUSE has
detected a framing error after
receiving a character. If the
character may be transmitted with
only one stop bit, the parameters
<nibble2> and <nibble3> have no
meaning.
For example, if the Magellan/SPACE MOUSE
receives an illegal "C" command byte, it
transmits the message "eAD3\r" to the
computer. The two parameters "D" and "3"
correspond to the nibbles 43H (see the
). In ASCII code the value 43H
corresponds to the upper-case "C" character.
Summary of Contents for Magellan/SPACE MOUSE Classic
Page 1: ......