-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve archiver info tags implementation
- Fix minor bugs (missing quotes, unnecessary commands, etc) - Create ECMC_ARCHIVER_POLICY macro - Create configureArchiver.cmd
- Loading branch information
Carlos Doro Neto
committed
Sep 2, 2024
1 parent
1720b23
commit 83ded70
Showing
4 changed files
with
57 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#=============================================================================== | ||
# configureArchiver.cmd | ||
#- Arguments: [POLICY], [CLUSTER] | ||
|
||
#-d /** | ||
#-d \brief Sets variables consumed by info tags related to integration with the EPICS Archiver Appliance. | ||
#-d \details Currently only availble at ESS. | ||
#-d \file | ||
#-d \param POLICY (optional) default value depends on ECMC_P_SCRIPT | ||
#-d \param CLUSTER (optional) default value depends on ECMC_P_SCRIPT | ||
#-d \note Examples: | ||
#-d \code | ||
#-d $(SCRIPTEXEC) ${ecmccfg_DIR}configureArchiver.cmd | ||
#-d $(SCRIPTEXEC) ${ecmccfg_DIR}configureArchiver.cmd, "POLICY=1Hz" | ||
#-d $(SCRIPTEXEC) ${ecmccfg_DIR}configureArchiver.cmd, "CLUSTER=lab" | ||
#-d $(SCRIPTEXEC) ${ecmccfg_DIR}configureArchiver.cmd, "POLICY=1Hz, CLUSTER=lab" | ||
#-d \endcode | ||
#-d \pre Must be called after startup.cmd | ||
#-d \post Must be called before addAxis.cmd | ||
#-d */ | ||
|
||
#- The default value for ECMC_BLOCK_ARCHIVER is # (check ecmc_axis_mr.cmd). | ||
#- This prevents the info tags from being loaded. | ||
#- The next line removes this restriction. | ||
epicsEnvSet("ECMC_BLOCK_ARCHIVER" , "") | ||
|
||
#- Set ESS-specific default values if NAMING==ESSnaming | ||
#- These values are overridden if either POLICY or CLUSTER are non empty. | ||
ecmcEpicsEnvSetCalcTernary("BLOCK_ESS_DEFAULTS", "'${ECMC_P_SCRIPT}' == 'ESSnaming')", "", "#-") | ||
$(BLOCK_ESS_DEFAULTS) epicsEnvSet("ECMC_ARCHIVER_POLICY" , "default") | ||
$(BLOCK_ESS_DEFAULTS) epicsEnvSet("ECMC_ARCHIVER_CLUSTER", "tn") | ||
|
||
#- Only set ECMC_ARCHIVER_POLICY and ECMC_ARCHIVER_CLUSTER if | ||
#- POLICY and CLUSTER arguments are, respectively, non-empty. | ||
#- This allows us to honor the default values in ecmc_axis_mr.cmd | ||
ecmcEpicsEnvSetCalcTernary("BLOCK_POLICY" , "'$(POLICY=)' != ''", "", "#-") | ||
ecmcEpicsEnvSetCalcTernary("BLOCK_CLUSTER", "'$(CLUSTER=)' != ''", "", "#-") | ||
$(BLOCK_POLICY) epicsEnvSet("ECMC_ARCHIVER_POLICY" , "$(POLICY)" ) | ||
$(BLOCK_CLUSTER) epicsEnvSet("ECMC_ARCHIVER_CLUSTER", "$(CLUSTER)") | ||
|
||
#- Cleanup | ||
epicsEnvUnset(BLOCK_ESS_DEFAULTS) | ||
epicsEnvUnset(BLOCK_POLICY) | ||
epicsEnvUnset(BLOCK_CLUSTER) |