Download presentation
Presentation is loading. Please wait.
Published byKristian Leslie Davis Modified over 6 years ago
1
Automated Software Configuration in the MONSOON System
P. N. Daly N. C. Buchholz P. C. Moore (NOAO) Copyright, 2004 © AURA, Inc.
2
MONSOON Team L to R: Peter Moore, Dee Stover, Paul Schmitt, Dave Dryden, John Garcia, Jerry Penegor, Nick Buchholz, Phil Daly and Dave Sawyer. (Not shown: Gustavo Rahmer, Mike Warner, Ricardo Schmidt, Mark Hunten).
3
MONSOON Results 8 August 2003: First Light Aladdin
19 September 2003: First Light Hawaii II 29 September 2003: First Light CCD
4
Typical MONSOON System
5
Configuration Requirements
Provide an automated boot and configuration system for safe detector operations Provide astronomer, hardware and software engineering interfaces Provide edit capability from various operating systems and trusted users
6
The GPX Dictionary Only point of entry for high level software (HLS) systems and/or astronomers Named modes hide underlying functionality Translated to PPX commands on a 1-to-1 or 1-to-many basis
7
Software / Hardware Engineers
Look at the same system differently Need ability to call commands different names Need ability for hardware engineers to add new commands with little or no effort from software engineers Needs back door for debug/development
8
The MONSOON Configuration File
Simple ASCII text file CSV format 1 command entry per line Well-understood fields Easy to edit and re-load CSV This format was used because the original configuration files were generated via an Excel spreadsheet
9
Configuration Record Fields
Field SQL Type Example Description panName varchar(32) intTime Unique PAN name dheName varchar(32) MCB_SEQITR Non-unique DHE name baseAddr integer 0x Base address in DHE memory nelms integer 1 Number of array elements Creg integer 0x Miscellaneous control register setMethod text SIMPLE Function to call to encode a value getMethod text SIMPLE Function to call to decode a value panType text FLOAT Data type as known to PAN dheSize text ULONG Data size as known to DHE coef1 float First coefficient to conversion function coef2 float Second coefficient to conversion function funcID text LINEAR Conversion function minValue float Minimum value (before conversion) maxValue float Maximum value (before conversion) units varchar(32) seconds Units (if applicable) help varchar(128) Integration time to 1 ms Associated help text
10
Memory Map cmdListPPX holds the well-known PPX/GPX commands (fixed number of entries) cmdListATT is loaded from lines in the configuration file (variable number of entries) Each panName becomes a new command
11
Command Execution cmdListPPX is searched first
cmdListATT is search if command is not found in PPX table: Parameter not present: read execute Parameter present: write execute
12
Example (integration time)
Set the integration time: gpxSetAVP intTime=4.0 ppxSetAVP intTime=4.0 intTime 4.0 Get the integration time: gpxGetAVP intTime ppxGetAVP intTime intTime NB HLS software uses the GPX/PPX interface whereas software and hardware engineers typically use the ATT interface
13
Array Handling If nelms > 1, an array of commands is automatically created which can be used: Single element: mcbSeqLoopReg[12] 44.0 Range of elements: mcbSeqLoopReg[] <2:8> 44.0 All elements: mcbSeqLoopReg[] 44.0
14
Problems with this approach
Unix file clobbering can ruin your day No error checking of CSV file No template to start from Our solution to these problems is to create and maintain an SQL database
15
MSDs SQL Database ... Create database using MSDs:
CREATE DATABASE monsoondb; \c monsoondb CREATE FUNCTION msdsql_msd( ) RETURNS float8 AS ‘/MNSN/soft_dev/lib/libmsdSql’ LANGUAGE C; CREATE TABLE generic_I ( panName varchar(32), dheName varchar(32), baseAddr integer CHECK(baseAddr>=0). nelms integer CHECK(nelms>=0), creg integer CHECK(creg>=0), MSDs For an explanation of MSDs, see “The MONSOON Implementation of the Generic Pixel Server” by Daly & Buchholz ( )
16
SQL Database … continued
setMethod text CHECK(setMethod=‘NOMETHOD’ OR setMethod=‘SIMPLE’ OR setMethod=‘INTTIME’ OR setMethod=‘ROISETC’ OR setMethod=‘ROISETR’ OR setMethod=‘FNAMESET’ OR setMethod=‘FNAMESET’ OR setMethod=‘SETVOFF’ OR setMethod=‘SETBIASV’ OR setMethod=‘SETFBIAS’ OR setMethod=‘WRT2READ’ OR setMethod=‘STRINGSET’ OR setMethod=‘RDMSKWRT’), getMethod text CHECK(getMethod=‘NOMETHOD’ OR getMethod=‘SIMPLE’ OR getMethod=‘INTTIME’ OR getMethod=‘ROISETC’ OR getMethod=‘ROISETR’ OR getMethod=‘FNAMESET’ OR getMethod=‘FNAMESET’ OR getMethod=‘SETVOFF’ OR getMethod=‘SETBIASV’ OR getMethod=‘SETFBIAS’ OR getMethod=‘WRT2READ’ OR getMethod=‘STRINGSET’ OR getMethod=‘RDMSKWRT’), panType text CHECK(panType=‘CHAR’ OR panType=‘UCHAR’ OR panType=‘SHORT’ OR panType=‘USHORT’ OR panType=‘INT’ OR panType=‘UINT’ OR panType=‘LONG’ OR panType=‘ULONG’ OR panType=‘STRING’ OR panType=‘FLOAT’), dheSize text CHECK(dheSize=‘ONEBIT’ OR dheSize=‘BYTE’ OR dheSize=‘CHAR’ OR dheSize=‘UCHAR’ OR dheSize=‘SHORT’ OR dheSize=‘USHORT’ OR dheSize=‘LONG’ OR dheSize=‘ULONG’ OR dheSize=‘TWLVBIT’ OR dheSize=‘TWNT4BIT’),
17
SQL Database … continued
coef1 float8, coef2 float8, funcID text CHECK(funcID=‘ERROR’ OR funcID=‘LINEAR’ OR funcID=‘POWER’ OR funcID=‘TABLE1’ OR funcID=‘BITFIELD’ OR funcID=‘NONE’), minValue float8, maxValue float8, units varchar(32), help varchar(128), id integer CHECK(id>=0), msd float8 CHECK(msd>=0.0) ); CREATE FUNCTION msdsql_utc( ) RETURNS int4 AS ‘/MNSN/soft_dev/lib/libmsdSql’ LANGUAGE C; CREATE FUNCTION msdsql_mjd( ) RETURNS float8 AS ‘/MNSN/soft_dev/lib/libmsdSql’ LANGUAGE C; CREATE FUNCTION msdsql_jd( ) RETURNS float8 AS ‘/MNSN/soft_dev/lib/libmsdSql’ LANGUAGE C; CREATE FUNCTION msdsql_ld( ) RETURNS float8 AS ‘/MNSN/soft_dev/lib/libmsdSql’ LANGUAGE C;
18
Populating the SQL Database
Use well-used CSV files and convert via Perl scripts: csv2sql Converts CSV to SQL csv2xml Converts CSV to XML xml2csv Converts XML to CSV xml2sql Converts XML to SQL sql2csv Recovers database records to CSV sql2xml Recovers database records to XML
19
Displaying the Configuration
Can use Unix utilities such as cat, more, vi XML for web-browsing: MONSOON schema developed MONSOON style sheet developed Consistent look and feel to output regardless of detector type
20
Typical XML Record <monsoonRecord id="1">
<panName>intTime</panName> <dheName>MCB_SEQITR</dheName> <baseAddr>0x </baseAddr> <nelms>1</nelms> <creg>0x </creg> <setMethod>SIMPLE</setMethod> <getMethod>SIMPLE</getMethod> <panType>FLOAT</panType> <dheSize>ULONG</dheSize> <coef1>1000.0</coef1> <coef2>0.0</coef2> <funcID>LINEAR</funcID> <minValue>0.0</minValue> <maxValue> </maxValue> <units>s</units> <help>Integration time to 1 ms</help> </monsoonRecord>
21
XML Record Via Web-Browser
22
Java Front End … TBD
23
Conclusions Ability to talk to MONSOON via a number of appropriate mechanisms Named modes automate startup Extensible command and configuration file Persistency via SQL Common visualization via XML Cross-platform database access via Java
24
Papers at SPIE ... N. C. Buchholz and P. N. Daly, “The MONSOON Generic Pixel Server Software Design”, P. N. Daly and N. C. Buchholz, “The MONSOON Implementation of the Generic Pixel Server”, P. N. Daly, N. C. Buchholz and P. C. Moore, “Automated Software Configuration in the MONSOON System”, N. C. Buchholz and P. N. Daly. “The Generic Pixel Server Dictionary”, R. G. Probst, N. Gaughan, G. Chisholm, P. N. Daly, E. A. Hileman, M. Hunten, M. Liang, K. M. Merrill and J. Penegor, “Project Status of NEWFIRM: the Wide-field Infrared Camera for NOAO 4m Telescopes”,
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.