8.10 Hamlib -- rigctld - table slidershl
The following section deals with configuring sliders for those commands that are supported by rigctld.
(Unsupported commands can use \send_cmd_rx which is discussed separately )
rigctld commands are text based and so configuration is similar to the ASCII configuration system.
Prior reading of the section on Database tables - configuration is assumed.
Table slidershl
As with the other configuration systems slidershl contains both client and server configuration data.
(Whereas, for buttons, its separate in buttonshl (client) and catcodeshl (server)
- Client slidersshl data is extracted at startup from server database to client data array.
The data includes: caption, color, sliderno, active status and code and vx for linking to the server.
It also contains min and max to match slider position to CAT data range and mult, divide, decpoint
and units to scale and present the numeric display to the right of the slider. - Server catcodeshl contains the rigctld command strings (readmask and setmask fields).
It also contains client links code and abx.
sliderhl fields:
- rig The current radio - drop down selector (from radios table). Needs same spelling in all tables.
- description Descriptive text- no function
- caption The caption to the left of the slider. Only applies to the central column of sliders
with no adjacent on/off button with identifying caption. - sliderno The sliders's unique, fixed, numeric identifier. See: Button and slider numbering
- active Y = slider active N = slider inactive (drop list selector)
- code 3 or 4 upper case characters. This links to a slider movement action on the client
to its action processes on the server. It is transmitted to the server with data (jobdata)
See below for more explanation. - vx vx = V, X or U. Client field that controls storage of latest setting for each VFO.
vx is set to V for dual receiver settings for the radios stores a different value per receiver. - abx A or B if there is pair of entries one for each VFO eg: DNR level, RF gain
X if A or B not relevant. (eg: RF power level, mic gain etc) See: vx and abx - readmask The character string used to read from the rig via rigctld.
- setmask The character string used to write to the rig via rigctld.
Contains # which is substituted on slider movement by a value scaled from slider position. - answermask This is only used for commands not supported by rigctld where we use \send_cmd_rx.
It is the character pattern of the answer and has the same format as in the ASCII system.
See Command masks - min The minimum of the CAT data (ie: before scaling etc)
- max The maximum value of the CAT data.
min and max ensure that the range of the sent CAT value spans the limits of the slider
and that the slider response to radio initiated change also fits the range, - def Default value - set by the associated reset button (not available on all sliders)
- mult Multiplier to scale CAT value for display.
- divide Divider to scale CAT value for display.
eg: use (CAT * 100) / 255 to scale 0-255 to 0 - 100
(Multiply first then divide). - offset Offset applied to display value. eg: offset = -50 scales 0 -100 to -50 to +50.
- units Units after displayed value eg: Hz kHz etc
- lookup If lookup = Y then displayed value is taken from lookup table entries with matching code.
Lookup uses the CAT value after scaling (if any).
If lookup = M then displayed value from lookup table entry with matching code
and lookup table mode field = current operating mode ( eg: USB, LSB etc).
For lookup = M, lookup table mode must be the mode button's caption -
ie: LSB, USB, CW etc (NOT SSB) See Lookup table .
- decpoint Add decimal point = dec places. eg: decpoint = 3 for 3000Hz to 3.000kHz.
Table slidershl sample:
Here are 6 records of the slidershl table (split to fit)
The first four records are singe items which are not vfo/receiver-specific and so have: vx = X abx=x
Id 5 and 6 are AF gain, one Main rx, one Sub rx.
Client config: vx = V so client sends current vfo, A or B.
Server response: abx = A (Main rx)
abx = B (Sub rx)
Using compression level as an example from the above table:
readmask is the command sent to rigctld. ie: \get_level Main COMP
This command is not VF0/receiver-specific, but piWebCAT uses --vfo mode and so the word Main must be
present (as a dummy) in the command string.
The response is a numeric and is handled internally. Experimenting with rigctl revealed a range of 0.010 to 1.000
The rig range is observed to be 1 - 100 (CAT manual says 0 - 100)
See: rigctl at the command line, checking ranges.
We set min = 0.010 and max = 1.000. piWebCAT then scales so that the data range gives the full slider travel.
We set mult = 100 and divide =1. This is purely for the displayed value which will then be 1 to 100.
The answermask field is not used. It is only used with \send_cmd_rx for unsupported CAT commands.
setmask is \set_level Main COMP #.
The # is substituted by the data value which is derived from slider position.
Again, the min and max settings perform a similar scaling in reverse giving a CAT value range of 0.010 to 1.000.
- so we actually sent to rigctld: \set_level Main COMP 0.450 etc