1 / 13

LBTO Reflective Memory

LBTO Reflective Memory. August 17, 2006 Chris Biddick. 1 cjb. Introduction. Mechanism for maintaining all TCS state and status Local shared memory segment Network demon to update all systems Part of the Data Dictionary Reflective memory is composed of XML definitions

olin
Download Presentation

LBTO Reflective Memory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LBTO Reflective Memory August 17, 2006 Chris Biddick 1 cjb

  2. Introduction • Mechanism for maintaining all TCS state and status • Local shared memory segment • Network demon to update all systems • Part of the Data Dictionary • Reflective memory is composed of • XML definitions • Binary definitions (ddsconfig) • Several pieces of CommonSW • Network • Reference document: 481s504 2 cjb

  3. Reflective memory definitions • Path in CVS: • LBTO/TCS/usr/commonsw/DDArchive/ReflectiveMemory/ • Every subsystem has a directory • Files are hierarchical in the file system • PSF/PSFside/PrimaryMirror/modes.xml psf.side[n].primaryMirror.modes • Arrays allowed at all levels • Variable types: • BIT, CHAR, UCHAR, SHORT, USHORT, INT, UINT • LONG, ULONG, FLOAT, DOUBLE, STRING • Subdirectory name 3 cjb

  4. XML files • Meta Dictionary Entry • Defines level of hierarchy • Points to subdirectory • Determines element name • Reflective Memory Dictionary Entry • Defines actual variables 4 cjb

  5. Meta Dictionary Entry example <?xml version="1.0" encoding="UTF-8"?> <Meta_Dictionary_Entry> <Name>side</Name> <FullQualifiedName>PSF/side</FullQualifiedName> <Owner>PSF</Owner> <UnitType>PSFside</UnitType> <UnitQty>2</UnitQty> </Meta_Dictionary_Entry> 5 cjb

  6. Reflective Memory Dictionary Entry example <?xml version="1.0" encoding="UTF-16" standalone="no" ?> <Reflective_Memory_Dictionary_Entry> <Name>modes</Name> <FullQualifiedName>PSF/PSFside/PrimaryMirror/modes</FullQualifiedName> <Description>Number of bending modes used</Description> <Owner>PSF</Owner> <UnitType>INT</UnitType> <UnitQty>1</UnitQty> <Units>N/A</Units> <DangerUpperLimit>0</DangerUpperLimit> <UpperLimit>160</UpperLimit> <LowerLimit>1</LowerLimit> <DangerLowerLimit>0</DangerLowerLimit> <ReadAccess>ASTRONOMER</ReadAccess> <WriteAccess>ASTRONOMER</WriteAccess> <SubsystemAccess>ALL</SubsystemAccess> <SuperUserAccess>ALL</SuperUserAccess> <Events>None right now</Events> <Callback>0</Callback> <UpdateInfo> <UserName>cjb</UserName> <UserClass>ASTRONOMER</UserClass> <UpdateDescription>Modified the danger lower limit</UpdateDescription> <Date_Of_Updation>2004-11-12</Date_Of_Updation> <Time_Of_Updation>11:01:20</Time_Of_Updation> </UpdateInfo> </Reflective_Memory_Dictionary_Entry> 6 cjb

  7. DDEditorGUI • Display/create/modify definitions • Populates FullQualifiedName, Owner, and all UpdateInfo fields • Directory options • Add folder • Add file • Delete • Rename • Move • Copy 7 cjb

  8. DDEditorGUI (cont) • File options • Delete • Rename • Move • Copy • Edit by double clicking on fields • To create a new level of hierarchy • Make subdirectory • Make file whose type is the subdirectory 8 cjb

  9. Binary reflective memory definitions • Install reflective memory (and other) definitions • cd LBTO/TCS/usr • sudo make install • Run ddsconfig • sudo ddsconfig -refmem • Makes files: /usr/local/bin/.binRefMemDictionary /usr/local/lib/libLBTGshmVar.so /usr/local/include/LBT/GshmVar.h /usr/local/etc/OffsetTable.conf 9 cjb

  10. Reflective memory access • Two ways: • Gtype objects • Use variable names directly • No notification if errors • SetValueInterface objects • Each reference a function call • Status return for errors • May read/write a buffer 10 cjb

  11. Gtype access • Some operators overloaded, use cast if unsure; see 481s504 • Can get metadata • Examples: psf.side[side].primaryMirror.modes = 6; int modes = psf.side[side].primaryMirror.modes; int muplim = psf.side[side].primaryMirror.modes.get_upperlimit(); 11 cjb

  12. SetValueInterface access • Create SetValueInterface object #include <LBT/SetValueInterface.h> SetValueInterface svi; int modes,err; • Write err = svi.write(&psf.side[side].primaryMirror.modes,modes); err = svi.write(“psf.side[side].primaryMirror.modes”,modes); • Read err = svi.read(&psf.side[side].primaryMirror.modes,&modes); err = svi.read(“psf.side[side].primaryMirror.modes”,&modes); 12 cjb

  13. SetValueInterface access (cont) • Check for errors if(svi.isError(err) && err != VALUEOUTOFBOUNDS) { //error } • Metadata string muplim = svi.getUpperLimit(“psf.side[side].primaryMirror.modes”); int muplim = svi.getUpperLimit(&psf.side[side].primaryMirror.modes); • See 481s504 for details 13 cjb

More Related