Database generation and maintenance

From GammaSphere DAQ
Jump to navigation Jump to search

There is a method developed by Madden, Oberling and Anderson to generate the EPICS process variable (PV) database semi-automatically by using Python scripts to parse Excel spreadsheets. Developers of module firmware fill in the spreadsheet to define EVERY bit in EVERY register. Additional columns specify which subset of these controls are to be associated with EPICS process variables and what kind of GUI control (e.g. bit, multi-bit, integer) should be associated with the PVs. Python scripts then parse a comma-separated-text file extracted from the spreadsheet and generate the database source. This method allows for improved ability to add PVs and controls when firmware changes once the initial setup is in place.


General spreadsheet Rules

There are a few things you must remember when entering spreadsheet data. The follwing paraphrases rules stated in an email from Tim dated 20130328:

() in the register name is now illegal because C thinks that is a function. Use _xx_ instead. If a register name ends w/ a number python thinks it is a digitizer channel, and processes the register differently. I put _ at the end of the register..