Minutes from the 11/03/04 LCLS SLC IOC meetings. Next Meeting is for a Design Review: 11/10/04, 9:30am, Orange Room (1) Progress: Currently, James Silva is working on iocCmlog and will be finished next week. Debbie has got some work done on the PRIMARY.MAP work and hash table. Both Debbie and Diane have stopped coding and testing to prepare for the design review. (2) Diagnostics from SLC Tasks - Ran out of time, discuss during and after the review. (3) All db routines now expect unit as 4 char array just like primary and secondary. The arrays may be null-terminated strings only if the null-terminator is the 5th or higher character. Note that both the primary and secondary are left-justified with blanks filling up to 4 chars. Debbie will decide if the unit number is left or right-justified and if she wants to pad with zeros instead of blanks. She will update the dbio spec then. (4) Changes to the database access API: dbunits is now dblunits, dbget and dbput are removed. dbexists and dbunit2string is added. We will also want the standard DB macros (at the beginning of ref_c_inc:dbgetc.h before the prototypes) available. Note that ALL tasks must use list routines to access the database. It is good practice for tasks to set up their lists during initialization so that memory allocation during normal processing is minimized. All lists will be deleted on task exit. Database access from iocsh routines is an exception in that they are one-time accesses so will be allocated before the access and either deleted or cleared (for the next time) after the access. (5) Event Checking in Database Access: The database access routines (dbl*) will all first wait on an event set by dbHdlr when the database is ready or if there is an unrecoverable error during database setup. A fixed empirically-determined timeout will be used in the wait. If there is a timeout or if the database could not be setup, dbl* will return an error which will be treated as a fatal error by the task. For routines called by iocsh, a check that the database exists is done before calling dbl*. This event will be created/destroyed by slcExec and set by dbHdlr. The database-exists flag will be global. If dbHdlr has an error creating the database, after setting the event, it will suspend and a restart (IPL) is required. (6) Usage of SLC Resources by IOCSH (non-SLC task): In general, only SLC tasks will use SLC resources (memory, semaphores, etc) except for iocsh (IOC shell for user interface). At some point, the design must include something to prevent resources from disappearing (ie, during an SLC restart) while iocsh is actively using them. (7) Proxy Up/Down Testing: Diane did some proxy stop and restart testing. When the IOC is up and the proxy restarts, the tasks automatically reconnect and function is restored. In this scenario, if the proxy is down long enough, PARANOIA may set the IOC "offline" and an IPL is required to restore functionality. If the IOC starts up and there is no proxy, the tasks will periodically attempt to reconnect until the proxy is started. Once the proxy is restarted, DBEX does not respond to a DB download request. (Note that DBEX will set the IOC "online" if it gets a download request). There appears to be a problem with reconnect between VMS processes and the proxy on proxy restart. This needs to be explored or explained by Tony and RonM. Diane may need to do further testing. (8) Acknowledgement by IOC of Data Updates from DBEX: Tony explains in detail in a separate message. Bottom line - if an acknowledgement is required by DBEX, a bit is set in the message passed down to the IOC which the IOC must respect. (9) Acknowledgement by DBEX of Data Updates from IOC: Tony explains in detail in a separate message. Bottom line - IOC must set a bit in the message to get an acknowledgement. If the IOC doesn't get the proper acknowledgement in a reasonable amount of time, it makes sure the data update is tried again the next time a task calls the equivalent to micro_dbsend. (10)We would like a way to resend ALL supertype 2 and 3 to DBEX on request from at least iocsh, maybe channel access too. (11)What happens when DBEX does not respond to a DB download request? Should the IOC continue to periodically ask for a database for a certain amount of time (same timeout as for (5) above)? (12)We decided that async functionality will be done in timer-driven threads separate from message-driven threads (those handling SCP messages). For instance, there will be "mgntAsyn" and "mgntHdlr" and "cstrAsyn" and "msgHdlr". Timer-driven threads will normally do something like wait on a timer and then do a bunch of EPICS runtime dbGets to get readbacks and status followed by a dblput to update the SLC database. They will also need to check for setpoint changes by EPICS and then update the SLC database on change only. Timer-driven threads will need to respond (in a timely manner) when slcExec tells them to exit, ie via an event flag. (13)"Job": Note that threads that do dblputs to the same group of primaries are considered to be part of the same "job". So "mgntAsyn" and "mgntHdlr" are in the "mgnt" job. The concept of "job" is used by the threads that send supertype 2/3 data to DBEX and wait for an acknowledgement. (14)Locks on the database: Initially we will have one lock for the whole database that is taken by dbl* routines before either read or write access. We will look into allowing mulitple reads at the same time by using a second counting semaphore and add this extra logic later. (15)IOC and Alpha Time: We don't think it's a big deal if the timestamp on the LCLS IOCs is not synchronized with the Alpha. It only means that we can't use any time set by the Alpha (either in the message header or in the database) for calculating delta times where the second time is from the IOC (other than for rough diagnostics). LCLS will probably not use the MCC NTP server and LCLS IOCs with internal event-generated timestamps definitely won't be. We expect this to cause a timestamp mismatch between the Alpha and the IOC. During the twice annual time change, the Alpha timestamp will be an hour different from the IOC until the Alpha is manually updated later on Sunday.