Using bitmapped parameters, Reading / writing bitmapped parameters, Command syntax – Zektor ProAudio 16™ DSP Preamp Audio Matrix User Manual
Page 9
ClarityAudio Serial Protocol, Version 1.01, 11/8/12
7
Command Syntax
^P ?$
->
Send a power request command to the A/V switch
^+$
<-
Acknowledgement (the command has no errors)
^=P 1$
<-
Query response indicating the power is on.
Using Bitmapped Parameters
Reading / Writing Bitmapped Parameters
Some commands accept “Bitmapped” parameters. These are decimal values that represent a series of
flags, or bits, that control, enable and/or disable different device operations.
Binary arithmetic is used to represent bitmapped parameters, it is assumed the reader has some famil-
iarity with binary arithmetic.
An example of a command that uses a bitmapped parameter is the “XS settings” command, which is
defined as:
^XS settings$
Where ‘settings’ is a bitmapped parameter defined as:
For information on what each bit of the XS command does, see: “‘XS’ Control Settings” on page 30.
The “Value” row, in the table’s header, refers to the values, that when added together, create the deci-
mal parameter used by the command. For instances if you want the bits ‘ASY’ and ‘AUT’ to be set to
1, and the rest of the bits set to zero, the parameter’s value would be calculated as: 1+8192, making the
parameter value: 8193.
The command to set those two bits to ones, and reset all the others would be:
^XS 8193$
Individual bits of a bitmapped parameter can be set or reset without affecting the other bits, by prefix-
ing the bitmapped parameter with a ‘+’ to set individual bits, or a ‘-’ to reset individual bits.
For instance in the above example the bitmapped value has been set to 8193. If we would now like to
enable the command echoing, by setting the ‘ECO’ bit, the following command can be issued:
^XS +2$
The will set the ‘IRJ’ bit, and have no affect on the others, and the new “XS” value would be: 8195
If we’d like to now use classic mode by reseting the ‘AUT’ flag we could send:
^XS -8192$
leaving the new “XS” value to be: 3.
This command only sets and resets bits, for instance if you issue another:
^XS -8192$
the resulting “XS” value will still be ‘3’, since this bit was not set to begin with, nothing has changed.
Value
32768
16384
8192
4069
2048
1024
512
256
128
64
32
16
8
4
2
1
Bit Position
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Name
0
0
AUT
0
0
0
0
0
0
0
0
CRE
CHM
ECO
ACK
ASY
Default:
0
0
1
0
0
0
0
0
0
0
0
1
0
1
1
1