As a developer I would like the information in the iocBoot config.xml to reflect what really happens in the ioc. Currently the information in config.xml is used by the GUI to define macros, it also has entries like hasDefault="YES" and default="0x0" but these are for information only in the GUI and do not influence, or necessarily correctly reflect, what the IOC actually does. We should have a single source of truth consistent between the IOC and GUI
Acceptance Criteria
Extra Information
An initial discussion of approach will be needed. There are various potential options e.g.
- use existing
config.xml as source of truth and add a new IOC command that reads file on IOC startup and creates macros. We already do something similar with configurations - IOC reads XML from disk and creates macros, so necessary XML reading code and an example of how to define a macro from an XML file already exists in IOC.
- use existing
config.xml as source of truth but at build time this file is parsed by a stand-alone program (e.g. a python script) that generates a default-macros.cmd file with necessary epicsEnvSet commands, this file can then be loaded by the IOC. This will need a new common Makefile build rule adding to automatically rebuild the macros file, but this is reasonable straightforward
(You could also create a new source of truth file and use it to generate config.xml and an IOC loadable file, but as config.xml is in a readily readable format that is not really worth it)
Note that you will not need to edit every IOC to either load default-macros.cmd or run a new command, all iocs already run init.cmd from the iocstartup common directory, so the command can be added to central init.cmd to apply to all IOCs
How to Test
should be a matter of just editing a config.xml for a chosen IOC and then looking at the screen output of the IOC to check macros defined as expected
Time in planning meeting (18/07/24)
1:34:35
planning 31:21 2024/10/31
As a developer I would like the information in the iocBoot
config.xmlto reflect what really happens in the ioc. Currently the information inconfig.xmlis used by the GUI to define macros, it also has entries likehasDefault="YES"anddefault="0x0"but these are for information only in the GUI and do not influence, or necessarily correctly reflect, what the IOC actually does. We should have a single source of truth consistent between the IOC and GUIAcceptance Criteria
Extra Information
An initial discussion of approach will be needed. There are various potential options e.g.
config.xmlas source of truth and add a new IOC command that reads file on IOC startup and creates macros. We already do something similar with configurations - IOC reads XML from disk and creates macros, so necessary XML reading code and an example of how to define a macro from an XML file already exists in IOC.config.xmlas source of truth but at build time this file is parsed by a stand-alone program (e.g. a python script) that generates adefault-macros.cmdfile with necessaryepicsEnvSetcommands, this file can then be loaded by the IOC. This will need a new common Makefile build rule adding to automatically rebuild the macros file, but this is reasonable straightforward(You could also create a new source of truth file and use it to generate config.xml and an IOC loadable file, but as config.xml is in a readily readable format that is not really worth it)
Note that you will not need to edit every IOC to either load
default-macros.cmdor run a new command, all iocs already runinit.cmdfrom the iocstartup common directory, so the command can be added to centralinit.cmdto apply to all IOCsHow to Test
should be a matter of just editing a
config.xmlfor a chosen IOC and then looking at the screen output of the IOC to check macros defined as expectedTime in planning meeting (18/07/24)
1:34:35
planning 31:21 2024/10/31