Skip to content

Read-only iocStats databases #19

@stephAllison

Description

@stephAllison

Some time ago (over a year!), J. Lewis Muir requested an option be added to the iocStats databases to prevent records that perform invasive actions (like reboot or load a new access security file) from being loaded. There are several ways to implement this but one way that seemed the least amount of work and the least changes to existing startup files is one recommended by Lewis - add a new macro that would be used like this:

$(RO_$(RO=NO),RO_YES=#,RO_NO=)record(sub, "$(IOC,undefined):SYSRESET")
$(RO_$(RO=NO),RO_YES=#,RO_NO=){
$(RO_$(RO=NO),RO_YES=#,RO_NO=)    alias("$(IOC,undefined):SysReset")
$(RO_$(RO=NO),RO_YES=#,RO_NO=)    field(DESC, "IOC Restart" )
$(RO_$(RO=NO),RO_YES=#,RO_NO=)    field(SNAM, "rebootProc")
$(RO_$(RO=NO),RO_YES=#,RO_NO=)    field(BRSV,"INVALID")
$(RO_$(RO=NO),RO_YES=#,RO_NO=)    field(L,"1")
$(RO_$(RO=NO),RO_YES=#,RO_NO=)}
==============

And set RO (Read Only) to YES to remove the record instance:

=== st.cmd ===
dbLoadRecords("$(DEVIOCSTATS)/db/iocAdminVxWorks.db","IOC=17lab,RO=YES")
==============

Or invert the sense of the macro to RW (Read Write), and I can set it to
NO.

(ANJ edited to format suggested changes better)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions