Communication And Notation; Commands - Logitech Magellan/SPACE MOUSE Classic Programmer's Manual

Logicad3d
Table of Contents

Advertisement

K<*> and K<8>
Default Sensitivity
Returns the translational and rotational
sensitivities and the zero radius to the default
settings, as indicated by a double beep.
Subsequently the Magellan/SPACE MOUSE
sends an "nH\r" command and a "q00\r"
command without request.

Communication and Notation

The Magellan/SPACE MOUSE exchanges data
with the computer in the form of packets. Each
packet starts with a character denoting the
packet type, followed by a certain amount of
useful data. As a general rule, four bits of
useful data (which together make up a nibble )
are coded into a byte. Coding is based on the
scheme shown in the table below and always
guarantees transmission of an even number of
1-bits in the byte. A parity-check of each byte
is therefore possible and transmission errors of
one bit can be detected.
Nibble
4
Character
Code
Bits
0
0000
1
0001
2
0010
3
0011
4
0100
5
0101
6
0110
7
0111
8
1000
9
1001
A
1010
B
1011
C
1100
D
1101
E
1110
F
1111
To describe the Magellan/SPACE MOUSE
commands, this manual uses the notation
<nibbleX> . It denotes a byte that contains
four useful bits in the lower nibble (the second
half of the byte), coded according to the table
above. The individual bits of the byte are given
in the first line by <B7> through <B0> , while
Character
Hexadecimal
30H
0
41H
A
42H
B
33H
3
44H
D
35H
5
36H
6
47H
G
48H
H
39H
9
3AH
:
4BH
K
3CH
<
4DH
M
4EH
N
3FH
?
the meaning of the bits is defined in the
subsequent line. For example, suppose a bit
sequence is defined as follows:
<B7><B6><B5><B4> <B3><B2><B1><B0>
Bits <B7> through <B4> must be set
according to the nibble code (e.g. 0011 = 3,
0100 = 4), while bit <B3> contains the state
of key <K4> , <B2> the state of key <K3> ,
etc. Each command must be terminated by a
carriage return character, "\r".

Commands

Commanding the Magellan/SPACE MOUSE is
done by sending the device one of the
commands described below.
Keyboard Command
Function:
Transmits the current state of
the keys. Occurs any time a key
is pressed or released.
Command: kQ\r
Returns:
k<nibble1
<nibble1>
<B7...4> <B3><B2><B1> <B0>
<nibble2>
<B7...4> <B3><B2><B1> <B0>
<nibble3>
<B7...4> <B3><B2><B1> <B0>
For example, if key 6 is pressed, Magellan/
SPACE MOUSE transmits the packet "k0B0\r"
to the computer. If the key is released,
Magellan/SPACE MOUSE transmits the packet
"k000\r" indicating that no key is any longer
being pressed.
Mode Set Command
Function:
Defines the operating mode and
the structure of the data packets.
Command: m<nibble>\r
<nibble>
<B7...4> < B3 > < B2 > <B1> <B0>
<mouse>
= 0
<dom>
= 1
= 0
<tra>
= 1
= 0
5
<K4><K3><K2><K1>
><nibble2><nibble3>\r
<K4><K3><K2> <K1>
<K8><K7><K6> <K5>
<K*>
<mouse><dom> <tra><rot>
Magellan/SPACE MOUSE is set into
3D mode.
All components in the data packet
are set to zero except the
component with the largest
magnitude.
The bit has no effect on the
components of the data packet.
The bit has no effect on the
components of the data packet.
The translational components of
the data packet (inputs X, Y and
Z) are set to zero.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Magellan/space mouse plusMagellan/space mouse plus xt

Table of Contents