Msg.db
From EPICSWIKI
# Below is a database that will generate 10 messages, each with an associated time stamp. This database is useful for capturing events such as when an alarm comes in with a brief description of the alarm. One could use the records to display a running log that is written as actions are completed.
The pv $(S):info triggers the database to process. $(S):info FLNKs to the last message record. The last msg record gets the previous msg value then
######################################################################### #Program: msg.db #Purpose: Creates a set of 10 messages that can be displayed in edm. # #MACROS: # S - application specific identifier # TIME - defines format to display time PVs. Uses formats defined by the # linux 'date' command. (ie. "@%x %T" displays "mm/dd/yy hh:mm:ss") #Author: Tim Southern <[email protected]> #Created: June 10, 2010 #Updated: Feb. 25, 2012 # - Changed reading a PV for time to reading system using soft # timestamp record type ######################################################################## record(stringin, "$(S):info") { field(DESC, "Info from seq") field(VAL, "Message db intialized") field(FLNK, "$(S):msg10") field(PINI, "YES") } record(stringin, "$(S):msg01") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time01") field(INP, "$(S):info") } record(stringin, "$(S):time01") { field(DESC, "Message History") field(DTYP, "Soft Timestamp") field(VAL, "--------------------") field(INP, "$(TIME)") } record(stringin, "$(S):msg02") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time02") field(INP, "$(S):msg01") } record(stringin, "$(S):time02") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):msg01") field(INP, "$(S):time01") } record(stringin, "$(S):msg03") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time03") field(INP, "$(S):msg02") } record(stringin, "$(S):time03") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):msg02") field(INP, "$(S):time02") } record(stringin, "$(S):msg04") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time04") field(INP, "$(S):msg03") } record(stringin, "$(S):time04") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):msg03") field(INP, "$(S):time03") } record(stringin, "$(S):msg05") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time05") field(INP, "$(S):msg04") } record(stringin, "$(S):time05") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):msg04") field(INP, "$(S):time04") } record(stringin, "$(S):msg06") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time06") field(INP, "$(S):msg05") } record(stringin, "$(S):time06") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):msg05") field(INP, "$(S):time05") } record(stringin, "$(S):msg07") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time07") field(INP, "$(S):msg06") } record(stringin, "$(S):time07") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):msg06") field(INP, "$(S):time06") } record(stringin, "$(S):msg08") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time08") field(INP, "$(S):msg07") } record(stringin, "$(S):time08") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):msg07") field(INP, "$(S):time07") } record(stringin, "$(S):msg09") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time09") field(INP, "$(S):msg08") } record(stringin, "$(S):time09") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):msg08") field(INP, "$(S):time08") } record(stringin, "$(S):msg10") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):time10") field(INP, "$(S):msg09") } record(stringin, "$(S):time10") { field(DESC, "Message History") field(VAL, "--------------------") field(FLNK, "$(S):msg09") field(INP, "$(S):time09") }