# # Template for snmp interface # # Macros required: # P: PV prefix # HOST: SNMP host IP address or hostname # ATTR: PV attribute # OID: SNMP OID for parameter of interest # DESC: PV desc. # SCAN: Record scan period # Optional macros: # MASK: The substring in the returned variable value string that directly proceeds the value we actually wish to obtain # Environment variable required (set in st.cmd): # COMM: SNMP community, e.g. "public" # record(stringin, "$(P):SITEID") { field(DESC, "Node name") field(DTYP, "Snmp") field(INP, "@$(HOST) %(COMM) SNMPv2-MIB::sysName.0 STRING: 100") field(SCAN, "Passive") field(PINI, "1") } # # Template for snmp interface # # Macros required: # P: PV prefix # HOST: SNMP host IP address or hostname # ATTR: PV attribute # OID: SNMP OID for parameter of interest # DESC: PV desc. # SCAN: Record scan period # Optional macros: # MASK: The substring in the returned variable value string that directly proceeds the value we actually wish to obtain # Environment variable required (set in st.cmd): # COMM: SNMP community, e.g. "public" # record(stringin, "$(P):FWVERSIONRAW") { field(DESC, "Firmware version") field(DTYP, "Snmp") field(INP, "@$(HOST) %(COMM) %(M)sPDUIdentFirmwareRev.0 STRING: 100") field(SCAN, "Passive") field(PINI, "1") } # # Template for snmp interface # # Macros required: # P: PV prefix # HOST: SNMP host IP address or hostname # ATTR: PV attribute # OID: SNMP OID for parameter of interest # DESC: PV desc. # SCAN: Record scan period # NELM: Waveform max size # FTVL: Data type (STRING, CHAR, UCHAR) # Optional macros: # MASK: The substring in the returned variable value string that directly proceeds the value we actually wish to obtain # Environment variable required (set in st.cmd): # COMM: SNMP community, e.g. "public" # record(waveform, "$(P):POWERSTATERAW") { field(DESC, "Outlet states") field(DTYP, "Snmp") field(INP, "@$(HOST) %(COMM) %(M)sPDUMasterState.0 STRING: 120") field(NELM, "100") field(FTVL, "CHAR") field(SCAN, "2 second") field(PINI, "1") } record(stringin, "$(P):LOC") { field(VAL, "$(LOC)") field(PINI, "1") info(autosaveFields, "VAL") } record(stringin, "$(P):NETFWVERSION") { field(VAL, "N/A") field(PINI, "1") info(autosaveFields, "") } #----- Firmware version formatting ---------------------------- record(aSub, "$(P):FWVERSIONASUB"){ field(DESC, "Format aSub") field(SNAM, "asQuotedStrToStr") field(INPA, "$(P):FWVERSIONRAW CP MS") field(FTA, "STRING") field(NOA, "1") field(FTVA, "STRING") field(NOVA, "1") field(OUTA, "$(P):FWVERSION PP MS") } # Public firmware version readback record(stringin, "$(P):FWVERSION") { field(DESC, "Firmware version") } #----- Outlet state splitting ---------------------------- record(aSub, "$(P):POWERSTATEASUB"){ field(DESC, "Split aSub") field(SNAM, "splitStr") field(INPA, "$(P):POWERSTATERAW CP MS") field(FTA, "CHAR") field(NOA, "100") field(INPB, "32") field(FTB, "CHAR") field(NOB, "1") field(INPC, "8") field(FTC, "USHORT") field(NOC, "1") field(FTVA, "STRING") field(NOVA, "1") field(OUTA, "$(P):POWERSTATECHUNK1 PP MS") field(FTVB, "STRING") field(NOVB, "1") field(OUTB, "$(P):POWERSTATECHUNK2 PP MS") field(FTVC, "STRING") field(NOVC, "1") field(OUTC, "$(P):POWERSTATECHUNK3 PP MS") } # Outlet state chunks record(stringin, "$(P):POWERSTATECHUNK1") { field(DESC, "Outlet state chunk 1") } record(stringin, "$(P):POWERSTATECHUNK2") { field(DESC, "Outlet state chunk 2") } record(stringin, "$(P):POWERSTATECHUNK3") { field(DESC, "Outlet state chunk 3") } #----- Polling enable/disable --------------------------------- record(calcout, "$(P):CONNCALC") { field(CALC, "A?0:1") field(SCAN, "2 second") field(INPA, "$(P):DISABLED") field(OOPT, "On Change") field(OUT, "$(P):CONNSTA PP") } record(bi, "$(P):CONNSTA") { field(ZNAM, "Not connected") field(ONAM, "Connected") field(ZSV, "MINOR") field(OSV, "NO_ALARM") } record(bo, "$(P):DISABLED") { field(DESC, "Disable polling for host") field(DTYP, "stream") field(OUT, "@pdu_apc.proto.db setHostDisabled($(HOST)) dummy") } # Disable polling for ACSW record(seq, "$(P):ACCSTART") { field(SELM, "All") field(DOL1, "1") field(LNK1, "$(P):DISABLED PP") } # Re-enable polling for ACSW record(seq, "$(P):ACCSTOP") { field(SELM, "All") field(DOL1, "0") field(LNK1, "$(P):DISABLED PP") }