12.6 jQuery Ajax MySQL access
The piWebCAT control web page has 67 + 24 extra buttons and 27 sliders
.
Configuration information for these controls is held in the MySQL radio database on the server.
Some of this configuration information is needed on the client, some is needed on the server.
Sliders
For sliders there is a single database table: sliders
(or slidersciv for Icom CIV or slidershl for Hamlib)
- Fields that control slider appearance and operation need to be accessible on the client.
eg: rig, caption, sliderno, active, code, abx, mode, min, max, def, mult, divide, offset
units, lookup, decpoint,
- Fields that control communication with the radio need to be on the server
ie: code, abx, readbytes, setbytes, answerbytes, readmask, setmask, answermask
Fields code and abx are the operational link between client slider data and server slider data.
Buttons
For buttons, client data is the buttons table and server data in the catcodes table.
(and buttonsciv or catcodesciv tables for Icom CIV radios or catcodeshl for Hamlib)
Loading to the client at startup
At piWebCAT startup, we need to load button and slider data to array variables in the client.
In fact we need to do it also for tables: lookups, meter, timings, radios and settings.
The following description describes how this is done using sliders as the example.