- Committing first working version of new AMOR settings module
This commit is contained in:
31
.cdtproject
Normal file
31
.cdtproject
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse-cdt version="2.0"?>
|
||||
|
||||
<cdtproject id="org.eclipse.cdt.make.core.make">
|
||||
<extension point="org.eclipse.cdt.core.BinaryParser" id="org.eclipse.cdt.core.ELF"/>
|
||||
<extension point="org.eclipse.cdt.core.CIndexer" id="org.eclipse.cdt.core.domsourceindexer"/>
|
||||
<data>
|
||||
<item id="org.eclipse.cdt.core.pathentry">
|
||||
<pathentry kind="src" path=""/>
|
||||
<pathentry kind="out" path=""/>
|
||||
<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
|
||||
</item>
|
||||
<item id="cdt_indexer">
|
||||
<indexEnabled indexValue="true"/>
|
||||
<indexerProblemsEnabled indexProblemsValue="0"/>
|
||||
</item>
|
||||
<item id="scannerConfiguration">
|
||||
<autodiscovery enabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile" problemReportingEnabled="true"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="false" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction useDefault="true" command="gcc" arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</item>
|
||||
</data>
|
||||
</cdtproject>
|
108
.project
Normal file
108
.project
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>sics</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.make.core.makeBuilder</name>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.core.errorOutputParser</key>
|
||||
<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>clean all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>-f makefile_slinux</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.ScannerConfigDiscoveryEnabled</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.makeBuilderParserId</key>
|
||||
<value>org.eclipse.cdt.make.core.GCCScannerInfoConsoleParser</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.esiProviderCommandEnabled</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.siProblemGenerationEnabled</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultESIProviderCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.makeBuilderParserEnabled</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.esiProviderParserId</key>
|
||||
<value>org.eclipse.cdt.make.core.GCCSpecsConsoleParser</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.make.core.makeNature</nature>
|
||||
<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -414,15 +414,15 @@
|
||||
}
|
||||
pCurrent = pCurrent->pNext;
|
||||
}
|
||||
if(iMot)
|
||||
{
|
||||
fprintf(fd,"Success \n");
|
||||
}
|
||||
fclose(fd);
|
||||
/* rename temporary to final file (this is an atomic action) */
|
||||
if (0 > rename(tmpfile, file)) {
|
||||
return 0;
|
||||
}
|
||||
if(iMot)
|
||||
{
|
||||
fprintf(fd,"Success \n");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
1
conman.c
1
conman.c
@ -1835,6 +1835,7 @@ static void writeToLogFiles(SConnection *self, char *buffer)
|
||||
SCWrite(self,"Login OK",eError);
|
||||
self->iLogin = 1;
|
||||
SCSetRights(self,iRet);
|
||||
pHost[0] = '\0';
|
||||
NETInfo(self->pSock,pHost,131);
|
||||
sprintf(pBueffel,"Accepted connection on socket %d from %s",
|
||||
self->pSock->sockid, pHost);
|
||||
|
@ -713,6 +713,7 @@
|
||||
SConnection *pCon = NULL;
|
||||
pMonEvent pMon = NULL;
|
||||
char pBueffel[512];
|
||||
int rights;
|
||||
|
||||
if(iEvent != MONITOR)
|
||||
{
|
||||
@ -725,7 +726,13 @@
|
||||
assert(pMon);
|
||||
sprintf(pBueffel,"%s.CountStatus = %f %d",pMon->pName,pMon->fPreset,
|
||||
(int)nintf(pMon->fCurrent));
|
||||
/**
|
||||
* prevent this to be written to log files
|
||||
*/
|
||||
rights = SCGetRights(pCon);
|
||||
SCSetRights(pCon,usSpy);
|
||||
SCWrite(pCon,pBueffel,eWarning);
|
||||
SCSetRights(pCon,rights);
|
||||
return 1;
|
||||
}
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
110
doc/manager/managerman.aux
Normal file
110
doc/manager/managerman.aux
Normal file
@ -0,0 +1,110 @@
|
||||
\relax
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {1}Introduction}{4}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {2}SICS programs, Scripts and Prerequisites}{5}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\newlabel{f0}{{2}{5}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {2.1}Hardware}{5}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {2.2}Server programs}{5}}
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {3}General SICS Setup}{7}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {3.1}System Control}{8}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {3.2}Moving SICS}{9}}
|
||||
\newlabel{f2}{{3.2}{9}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.1} Moving the SICS Server to a new Computer}{9}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.2}Exchanging the Serial Port Server}{9}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.3}Exchanging the Histogram Memory}{10}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {3.3}SICS Trouble Shooting }{10}}
|
||||
\newlabel{f3}{{3.3}{10}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.1}Check Server Status}{10}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.2}Inspecting Log Files}{10}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.3}Restarting SICS}{11}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.4}Restart Everything}{11}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.5}Starting SICS Manually}{11}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.6}Test the SerPortServer Program}{11}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.7}Trouble with Environment Devices}{12}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.8} HELP debugging!!!!}{12}}
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {4}The SICS Initialization File}{13}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.1}Overview of SICS Initialization}{13}}
|
||||
\newlabel{f4}{{4.1}{13}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.2}SICS Options and Users}{14}}
|
||||
\newlabel{f5}{{4.2}{14}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.3}SICS Variables }{15}}
|
||||
\newlabel{f6}{{4.3}{15}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.4}SICS Hardware Configuration}{16}}
|
||||
\newlabel{f7}{{4.4}{16}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.4.1}Bus Access}{16}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{Direct Access to RS232 Controllers or TCP/IP Controllers.}{16}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{Accessing Serial Ports (Old System)}{17}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{GPIB Controller Access}{19}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.4.2}Controllers}{20}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{ECB Controllers}{20}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{Siematic SPS Controllers}{21}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{General Controller Object and Choppers}{22}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.4.3} Motors}{23}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.4.4}Counting Devices}{24}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{Histogram Memory}{25}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.4.5}Velocity Selectors}{26}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.5}Initialization of General Commands}{27}}
|
||||
\newlabel{f10}{{4.5}{27}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.5.1}Monochromators}{28}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.5.2}Reoccuring Tasks}{28}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.5.3}The SICS Online Help System}{29}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.5.4}Aliases in SICS}{29}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{Object Aliases}{29}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{Runtime Aliases}{29}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{Command Aliases}{30}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.5.5}The AntiCollision Module}{30}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.6}The Internal Scan Commands}{31}}
|
||||
\newlabel{f11}{{4.6}{31}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.6.1}Scan Concepts}{31}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.6.2}User Definable Scan Functions}{34}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.6.3}User Defined Scans(Old Style)}{35}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.6.4}The Scan Command Header Description File}{35}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.6.5}Differential Scans}{36}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.6.6}Peak Analysis}{37}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.6.7}Common Scan Scripts}{37}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.7}Scripting NeXus Files}{37}}
|
||||
\newlabel{f12}{{4.7}{37}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.7.1}Usage}{38}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{File Opening and Closing}{38}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{Writing Things}{38}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.8}Automatic Updating of NeXus Files}{39}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.8.1}Prerequisites for Using the Automatic Update Manager}{39}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.8.2}Installing Automatic Update}{40}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.8.3}Configuring Automatic Update}{40}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.9}Instrument Specific SICS Initializations}{40}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.9.1}Initialization for Four Circle Diffractometers}{40}}
|
||||
\newlabel{f13}{{4.9.1}{40}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.9.2}Triple Axis Spectrometer Specific Commands}{42}}
|
||||
\newlabel{f14}{{4.9.2}{42}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.9.3}Special Commands for the Reflectometer (AMOR)}{42}}
|
||||
\newlabel{f15}{{4.9.3}{42}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{AMOR Status Display Commands}{43}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.9.4}SANS Special Commands}{44}}
|
||||
\newlabel{f16}{{4.9.4}{44}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.9.5}Special FOCUS Initializations}{45}}
|
||||
\newlabel{f17}{{4.9.5}{45}}
|
||||
\@writefile{toc}{\contentsline {subsubsection}{Special Internal FOCUS Support Commands}{45}}
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {5}Programming SICS Macros}{46}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\newlabel{f18}{{5}{46}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {5.1}Input/Output}{46}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {5.2}Error Handling}{47}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {5.3}Interacting with SICS within a Script}{47}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {5.4}SICS Interfaces in Tcl}{47}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.1}The Object Interface}{47}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.2}Overriding the Drivable Interface with Tcl}{48}}
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {6}The McStas SICS Interface}{49}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\newlabel{f8}{{6}{49}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {6.1}McStas Requirements and SICS Requirements}{50}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {6.2}The McStas Reader}{50}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {6.3}The McStas Controller}{51}}
|
BIN
doc/manager/managerman.dvi
Normal file
BIN
doc/manager/managerman.dvi
Normal file
Binary file not shown.
BIN
doc/manager/managerman.pdf
Normal file
BIN
doc/manager/managerman.pdf
Normal file
Binary file not shown.
2340
doc/manager/managerman.tex
Normal file
2340
doc/manager/managerman.tex
Normal file
File diff suppressed because it is too large
Load Diff
80
doc/manager/managerman.toc
Normal file
80
doc/manager/managerman.toc
Normal file
@ -0,0 +1,80 @@
|
||||
\contentsline {chapter}{\numberline {1}Introduction}{4}
|
||||
\contentsline {chapter}{\numberline {2}SICS programs, Scripts and Prerequisites}{5}
|
||||
\contentsline {section}{\numberline {2.1}Hardware}{5}
|
||||
\contentsline {section}{\numberline {2.2}Server programs}{5}
|
||||
\contentsline {chapter}{\numberline {3}General SICS Setup}{7}
|
||||
\contentsline {section}{\numberline {3.1}System Control}{8}
|
||||
\contentsline {section}{\numberline {3.2}Moving SICS}{9}
|
||||
\contentsline {subsection}{\numberline {3.2.1} Moving the SICS Server to a new Computer}{9}
|
||||
\contentsline {subsection}{\numberline {3.2.2}Exchanging the Serial Port Server}{9}
|
||||
\contentsline {subsection}{\numberline {3.2.3}Exchanging the Histogram Memory}{10}
|
||||
\contentsline {section}{\numberline {3.3}SICS Trouble Shooting }{10}
|
||||
\contentsline {subsection}{\numberline {3.3.1}Check Server Status}{10}
|
||||
\contentsline {subsection}{\numberline {3.3.2}Inspecting Log Files}{10}
|
||||
\contentsline {subsection}{\numberline {3.3.3}Restarting SICS}{11}
|
||||
\contentsline {subsection}{\numberline {3.3.4}Restart Everything}{11}
|
||||
\contentsline {subsection}{\numberline {3.3.5}Starting SICS Manually}{11}
|
||||
\contentsline {subsection}{\numberline {3.3.6}Test the SerPortServer Program}{11}
|
||||
\contentsline {subsection}{\numberline {3.3.7}Trouble with Environment Devices}{12}
|
||||
\contentsline {subsection}{\numberline {3.3.8} HELP debugging!!!!}{12}
|
||||
\contentsline {chapter}{\numberline {4}The SICS Initialization File}{13}
|
||||
\contentsline {section}{\numberline {4.1}Overview of SICS Initialization}{13}
|
||||
\contentsline {section}{\numberline {4.2}SICS Options and Users}{14}
|
||||
\contentsline {section}{\numberline {4.3}SICS Variables }{15}
|
||||
\contentsline {section}{\numberline {4.4}SICS Hardware Configuration}{16}
|
||||
\contentsline {subsection}{\numberline {4.4.1}Bus Access}{16}
|
||||
\contentsline {subsubsection}{Direct Access to RS232 Controllers or TCP/IP Controllers.}{16}
|
||||
\contentsline {subsubsection}{Accessing Serial Ports (Old System)}{17}
|
||||
\contentsline {subsubsection}{GPIB Controller Access}{19}
|
||||
\contentsline {subsection}{\numberline {4.4.2}Controllers}{20}
|
||||
\contentsline {subsubsection}{ECB Controllers}{20}
|
||||
\contentsline {subsubsection}{Siematic SPS Controllers}{21}
|
||||
\contentsline {subsubsection}{General Controller Object and Choppers}{22}
|
||||
\contentsline {subsection}{\numberline {4.4.3} Motors}{23}
|
||||
\contentsline {subsection}{\numberline {4.4.4}Counting Devices}{24}
|
||||
\contentsline {subsubsection}{Histogram Memory}{25}
|
||||
\contentsline {subsection}{\numberline {4.4.5}Velocity Selectors}{26}
|
||||
\contentsline {section}{\numberline {4.5}Initialization of General Commands}{27}
|
||||
\contentsline {subsection}{\numberline {4.5.1}Monochromators}{28}
|
||||
\contentsline {subsection}{\numberline {4.5.2}Reoccuring Tasks}{28}
|
||||
\contentsline {subsection}{\numberline {4.5.3}The SICS Online Help System}{29}
|
||||
\contentsline {subsection}{\numberline {4.5.4}Aliases in SICS}{29}
|
||||
\contentsline {subsubsection}{Object Aliases}{29}
|
||||
\contentsline {subsubsection}{Runtime Aliases}{29}
|
||||
\contentsline {subsubsection}{Command Aliases}{30}
|
||||
\contentsline {subsection}{\numberline {4.5.5}The AntiCollision Module}{30}
|
||||
\contentsline {section}{\numberline {4.6}The Internal Scan Commands}{31}
|
||||
\contentsline {subsection}{\numberline {4.6.1}Scan Concepts}{31}
|
||||
\contentsline {subsection}{\numberline {4.6.2}User Definable Scan Functions}{34}
|
||||
\contentsline {subsection}{\numberline {4.6.3}User Defined Scans(Old Style)}{35}
|
||||
\contentsline {subsection}{\numberline {4.6.4}The Scan Command Header Description File}{35}
|
||||
\contentsline {subsection}{\numberline {4.6.5}Differential Scans}{36}
|
||||
\contentsline {subsection}{\numberline {4.6.6}Peak Analysis}{37}
|
||||
\contentsline {subsection}{\numberline {4.6.7}Common Scan Scripts}{37}
|
||||
\contentsline {section}{\numberline {4.7}Scripting NeXus Files}{37}
|
||||
\contentsline {subsection}{\numberline {4.7.1}Usage}{38}
|
||||
\contentsline {subsubsection}{File Opening and Closing}{38}
|
||||
\contentsline {subsubsection}{Writing Things}{38}
|
||||
\contentsline {section}{\numberline {4.8}Automatic Updating of NeXus Files}{39}
|
||||
\contentsline {subsection}{\numberline {4.8.1}Prerequisites for Using the Automatic Update Manager}{39}
|
||||
\contentsline {subsection}{\numberline {4.8.2}Installing Automatic Update}{40}
|
||||
\contentsline {subsection}{\numberline {4.8.3}Configuring Automatic Update}{40}
|
||||
\contentsline {section}{\numberline {4.9}Instrument Specific SICS Initializations}{40}
|
||||
\contentsline {subsection}{\numberline {4.9.1}Initialization for Four Circle Diffractometers}{40}
|
||||
\contentsline {subsection}{\numberline {4.9.2}Triple Axis Spectrometer Specific Commands}{42}
|
||||
\contentsline {subsection}{\numberline {4.9.3}Special Commands for the Reflectometer (AMOR)}{42}
|
||||
\contentsline {subsubsection}{AMOR Status Display Commands}{43}
|
||||
\contentsline {subsection}{\numberline {4.9.4}SANS Special Commands}{44}
|
||||
\contentsline {subsection}{\numberline {4.9.5}Special FOCUS Initializations}{45}
|
||||
\contentsline {subsubsection}{Special Internal FOCUS Support Commands}{45}
|
||||
\contentsline {chapter}{\numberline {5}Programming SICS Macros}{46}
|
||||
\contentsline {section}{\numberline {5.1}Input/Output}{46}
|
||||
\contentsline {section}{\numberline {5.2}Error Handling}{47}
|
||||
\contentsline {section}{\numberline {5.3}Interacting with SICS within a Script}{47}
|
||||
\contentsline {section}{\numberline {5.4}SICS Interfaces in Tcl}{47}
|
||||
\contentsline {subsection}{\numberline {5.4.1}The Object Interface}{47}
|
||||
\contentsline {subsection}{\numberline {5.4.2}Overriding the Drivable Interface with Tcl}{48}
|
||||
\contentsline {chapter}{\numberline {6}The McStas SICS Interface}{49}
|
||||
\contentsline {section}{\numberline {6.1}McStas Requirements and SICS Requirements}{50}
|
||||
\contentsline {section}{\numberline {6.2}The McStas Reader}{50}
|
||||
\contentsline {section}{\numberline {6.3}The McStas Controller}{51}
|
4
doc/manager/scrap1.htm
Normal file
4
doc/manager/scrap1.htm
Normal file
@ -0,0 +1,4 @@
|
||||
<li> <b> MakeWaveLength nam mono </b> creates a wavelength variable nam.
|
||||
The monochromator mono is used for adjustment.
|
||||
<li> <b> MakeEnergy nam mono </b> creates a energy variable nam. The
|
||||
monochromator mono is used for adjustment.
|
15
dynstring.c
15
dynstring.c
@ -97,7 +97,17 @@
|
||||
free(self->pBuffer);
|
||||
|
||||
free(self);
|
||||
}
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int DynStringClear(pDynString self)
|
||||
{
|
||||
assert(self);
|
||||
assert(self->iMAGIC == DYNMAGIC);
|
||||
|
||||
self->iTextLen = 0;
|
||||
memset(self->pBuffer,0,self->iBufferSize);
|
||||
return 1;
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
int DynStringCopy(pDynString self, char *pText)
|
||||
{
|
||||
@ -245,3 +255,6 @@
|
||||
return self->iTextLen;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -84,5 +84,9 @@
|
||||
/*
|
||||
returns the current length of the dynamic string.
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
int DynStringClear(pDynString self);
|
||||
/*
|
||||
removes all old dat from the dynstring
|
||||
*/
|
||||
#endif
|
||||
|
20
fourtable.c
20
fourtable.c
@ -32,17 +32,6 @@ void DeleteFourCircleTable(int handle){
|
||||
LLDdelete(handle);
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
static void clearTable(int handle){
|
||||
int status;
|
||||
|
||||
status = LLDnodePtr2First(handle);
|
||||
while(status == 1) {
|
||||
LLDnodeDelete(handle);
|
||||
status = LLDnodePtr2Next(handle);
|
||||
}
|
||||
LLDnodeDelete(handle);
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
static void printList(int handle, SConnection *pCon){
|
||||
FourTableEntry entry;
|
||||
char pBueffel[132];
|
||||
@ -179,9 +168,12 @@ static void delEntry(int handle, int index){
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
int HandleFourCircleCommands(int handle, SConnection *pCon,
|
||||
int HandleFourCircleCommands(int *table, SConnection *pCon,
|
||||
int argc, char *argv[], int *err){
|
||||
int handle;
|
||||
|
||||
*err = 1;
|
||||
handle = *table;
|
||||
|
||||
/*
|
||||
test if this is for us
|
||||
@ -204,7 +196,9 @@ int HandleFourCircleCommands(int handle, SConnection *pCon,
|
||||
*err = 0;
|
||||
return 1;
|
||||
}
|
||||
clearTable(handle);
|
||||
LLDdelete(handle);
|
||||
handle = LLDcreate(sizeof(FourTableEntry));
|
||||
*table = handle;
|
||||
SCparChange(pCon);
|
||||
SCSendOK(pCon);
|
||||
} else if (strcmp(argv[2],"list") == 0){
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
int MakeFourCircleTable(void);
|
||||
void DeleteFourCircleTable(int handle);
|
||||
int HandleFourCircleCommands(int handle, SConnection *pCon,
|
||||
int HandleFourCircleCommands(int *table, SConnection *pCon,
|
||||
int argc, char *argv[], int *err);
|
||||
char *GetFourCircleScanVar(int handle, double two_theta);
|
||||
int GetFourCircleScanNP(int handle, double two_theta);
|
||||
|
4
make_gen
4
make_gen
@ -7,7 +7,7 @@
|
||||
|
||||
COBJ = Sclient.o network.o ifile.o intcli.o $(FORTIFYOBJ)
|
||||
SOBJ = network.o ifile.o conman.o SCinter.o splitter.o passwd.o \
|
||||
servlog.o sicvar.o nserver.o SICSmain.o \
|
||||
servlog.o sicvar.o nserver.o SICSmain.o motorlist.o\
|
||||
sicsexit.o costa.o task.o $(FORTIFYOBJ)\
|
||||
macro.o ofac.o obpar.o obdes.o drive.o status.o intserv.o \
|
||||
devexec.o mumo.o mumoconf.o selector.o selvar.o fupa.o lld.o \
|
||||
@ -46,7 +46,7 @@ full: purge all
|
||||
SICServer: $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \
|
||||
$(VELOOBJ) $(DIFIL) $(EXTRA) \
|
||||
$(SUBLIBS)
|
||||
$(CC) -g -o SICServer \
|
||||
$(CC) -pg -o SICServer \
|
||||
$(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \
|
||||
$(VELOOBJ) $(DIFOBJ) $(EXTRA) $(LIBS)
|
||||
|
||||
|
@ -17,7 +17,7 @@ CC = gcc
|
||||
CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 -DNXXML $(NI) \
|
||||
-Ipsi/hardsup -I. \
|
||||
-fwritable-strings -DCYGNUS -DNONINTF -g $(DFORTIFY) \
|
||||
-Wall -Wno-unused -Wno-comment -Wno-switch -Werror
|
||||
-Wall -Wno-unused -Wno-comment -Wno-switch -Werror
|
||||
|
||||
BINTARGET = bin
|
||||
EXTRA=nintf.o
|
||||
|
6
mesure.c
6
mesure.c
@ -1053,7 +1053,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
SNXFormatTime(pBueffel,512);
|
||||
GetScanVarStep(self->pScanner,0,&fStep);
|
||||
fPreset = GetScanPreset(self->pScanner);
|
||||
fprintf(self->fRefl,"%3d %7.3f %9.0f %7.3f %s\n",iNP,fStep,
|
||||
fprintf(self->fRefl,"%3d %7.4f %9.0f %7.3f %s\n",iNP,fStep,
|
||||
fPreset,fTemp,pBueffel);
|
||||
for(i = 0; i < iNP; i++)
|
||||
{
|
||||
@ -1078,7 +1078,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
if(self->iCompact == 1)
|
||||
{
|
||||
strcpy(pTime,pBueffel);
|
||||
sprintf(pBueffel,"%3d%8.3f%10.0f%8.3f %s\n",iNP,fStep,
|
||||
sprintf(pBueffel,"%3d%8.4f%10.0f%8.3f %s\n",iNP,fStep,
|
||||
fPreset,fTemp,pTime);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
pBueffel[0] = '\0';
|
||||
@ -1528,7 +1528,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
/*
|
||||
catch table processing commands
|
||||
*/
|
||||
iRet = HandleFourCircleCommands(self->stepTable,pCon,argc,argv,&err);
|
||||
iRet = HandleFourCircleCommands(&self->stepTable,pCon,argc,argv,&err);
|
||||
if(iRet == 1)
|
||||
{
|
||||
return err;
|
||||
|
265
motorlist.c
Normal file
265
motorlist.c
Normal file
@ -0,0 +1,265 @@
|
||||
/*----------------------------------------------------------------------
|
||||
Support module which manages a list of motors and their target values
|
||||
when running complex movements. See accompanying tex file for
|
||||
more info.
|
||||
|
||||
copyright: see file COPYRIGHT
|
||||
|
||||
Mark Koennecke, September 2005
|
||||
-----------------------------------------------------------------------*/
|
||||
#include "motorlist.h"
|
||||
#include "lld.h"
|
||||
#include "motor.h"
|
||||
/*---------------------------------------------------------------*/
|
||||
static void *MOLIGetInterface(void *data, int iD){
|
||||
return NULL;
|
||||
}
|
||||
/*----------------------------------------------------------------
|
||||
This routine can return either OKOK or HWFault when thing
|
||||
go wrong. However, the return value of Halt is usually ignored!
|
||||
------------------------------------------------------------------*/
|
||||
static int MOLIHalt(void *data) {
|
||||
int self = 0, iRet;
|
||||
MotControl tuktuk;
|
||||
|
||||
self = *(int *)data;
|
||||
|
||||
iRet = LLDnodePtr2First(self);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(self,&tuktuk);
|
||||
tuktuk.pDriv->Halt(tuktuk.data);
|
||||
iRet = LLDnodePtr2Next(self);
|
||||
}
|
||||
return OKOK;
|
||||
}
|
||||
/*----------------------------------------------------------------
|
||||
This routine can return either 1 or 0. 1 means the position can
|
||||
be reached, 0 NOT
|
||||
If 0, error shall contain up to errlen characters of information
|
||||
about which limit was violated
|
||||
------------------------------------------------------------------*/
|
||||
static int MOLICheckLimits(void *data, float val,
|
||||
char *error, int errlen){
|
||||
int self = 0, iRet, test, retVal = 1;
|
||||
MotControl tuktuk;
|
||||
|
||||
self = *(int *)data;
|
||||
|
||||
iRet = LLDnodePtr2First(self);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(self,&tuktuk);
|
||||
test = tuktuk.pDriv->CheckLimits(tuktuk.data,val, error, errlen);
|
||||
if(test == 0){
|
||||
retVal = 0;
|
||||
}
|
||||
iRet = LLDnodePtr2Next(self);
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
/*----------------------------------------------------------------
|
||||
This routine can return 0 when a limit problem occurred
|
||||
OKOK when the motor was successfully started
|
||||
HWFault when a problem occured starting the device
|
||||
Possible errors shall be printed to pCon
|
||||
For real motors, this is supposed to try at least three times
|
||||
to start the motor in question
|
||||
val is the value to drive the motor too
|
||||
------------------------------------------------------------------*/
|
||||
static long MOLISetValue(void *data, SConnection *pCon, float val){
|
||||
int self = 0, iRet, test;
|
||||
MotControl tuktuk;
|
||||
|
||||
self = *(int *)data;
|
||||
|
||||
iRet = LLDnodePtr2First(self);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(self,&tuktuk);
|
||||
test = tuktuk.pDriv->SetValue(tuktuk.data,pCon,tuktuk.target);
|
||||
if(test != 1) {
|
||||
return test;
|
||||
} else {
|
||||
tuktuk.running = 1;
|
||||
LLDnodeDataFrom(self,&tuktuk);
|
||||
}
|
||||
iRet = LLDnodePtr2Next(self);
|
||||
}
|
||||
return OKOK;
|
||||
}
|
||||
/*----------------------------------------------------------------
|
||||
Checks the status of a running motor. Possible return values
|
||||
HWBusy The motor is still running
|
||||
OKOK or HWIdle when the motor finished driving
|
||||
HWFault when a hardware problem ocurred
|
||||
HWPosFault when the hardware cannot reach a position
|
||||
Errors are duly to be printed to pCon
|
||||
For real motors CheckStatus again shall try hard to fix any
|
||||
issues with the motor
|
||||
------------------------------------------------------------------*/
|
||||
static int MOLICheckStatus(void *data, SConnection *pCon){
|
||||
int self = 0, iRet, status, result = HWIdle;
|
||||
MotControl tuktuk;
|
||||
|
||||
self = *(int *)data;
|
||||
|
||||
iRet = LLDnodePtr2First(self);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(self,&tuktuk);
|
||||
if(tuktuk.running == 1){
|
||||
status = tuktuk.pDriv->CheckStatus(tuktuk.data, pCon);
|
||||
switch(status){
|
||||
case HWIdle:
|
||||
tuktuk.running = 0;
|
||||
LLDnodeDataFrom(self,&tuktuk);
|
||||
break;
|
||||
case HWBusy:
|
||||
result = HWBusy;
|
||||
break;
|
||||
case HWFault:
|
||||
case HWPosFault:
|
||||
return status;
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
this is a programming error and has to be fixed
|
||||
*/
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
iRet = LLDnodePtr2Next(self);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/*----------------------------------------------------------------
|
||||
GetValue is supposed to read a motor position
|
||||
On errors, -99999999.99 is returned and messages printed to pCon
|
||||
------------------------------------------------------------------*/
|
||||
static float MOLIGetValue(void *data, SConnection *pCon){
|
||||
int self = 0, iRet;
|
||||
MotControl tuktuk;
|
||||
float value, result = 1;
|
||||
|
||||
self = *(int *)data;
|
||||
|
||||
iRet = LLDnodePtr2First(self);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(self,&tuktuk);
|
||||
if(MotorGetSoftPosition(tuktuk.data,pCon,&value) == 1){
|
||||
tuktuk.position = value;
|
||||
} else {
|
||||
tuktuk.position = -9999999.99;
|
||||
}
|
||||
LLDnodeDataFrom(self,&tuktuk);
|
||||
iRet = LLDnodePtr2Next(self);
|
||||
}
|
||||
return OKOK;
|
||||
}
|
||||
/*======================== interface functions ========================*/
|
||||
pIDrivable makeMotListInterface(){
|
||||
pIDrivable pDriv = NULL;
|
||||
|
||||
pDriv = CreateDrivableInterface();
|
||||
if(pDriv == NULL){
|
||||
return NULL;
|
||||
}
|
||||
pDriv->Halt = MOLIHalt;
|
||||
pDriv->CheckLimits = MOLICheckLimits;
|
||||
pDriv->SetValue = MOLISetValue;
|
||||
pDriv->CheckStatus = MOLICheckStatus;
|
||||
pDriv->GetValue = MOLIGetValue;
|
||||
|
||||
return pDriv;
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
int addMotorToList(int listHandle, char *name, float targetValue){
|
||||
pMotor pMot = NULL;
|
||||
MotControl tuktuk;
|
||||
|
||||
pMot = FindMotor(pServ->pSics,name);
|
||||
if(pMot == NULL){
|
||||
return 0;
|
||||
}
|
||||
tuktuk.data = pMot;
|
||||
strncpy(tuktuk.name,name,79);
|
||||
tuktuk.pDriv = pMot->pDrivInt;
|
||||
tuktuk.target = targetValue;
|
||||
tuktuk.running = 0;
|
||||
tuktuk.position = -9999999.999;
|
||||
LLDnodeAppendFrom(listHandle,&tuktuk);
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
int setNewMotorTarget(int listHandle, char *name, float value){
|
||||
int iRet;
|
||||
MotControl tuktuk;
|
||||
|
||||
iRet = LLDnodePtr2First(listHandle);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(listHandle,&tuktuk);
|
||||
if(strcmp(tuktuk.name,name) == 0){
|
||||
tuktuk.target = value;
|
||||
tuktuk.running = 0;
|
||||
LLDnodeDataFrom(listHandle, &tuktuk);
|
||||
return 1;
|
||||
}
|
||||
iRet = LLDnodePtr2Next(listHandle);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------------*/
|
||||
int getMotorFromList(int listHandle, char *name,pMotControl tuk){
|
||||
int iRet;
|
||||
MotControl tuktuk;
|
||||
|
||||
iRet = LLDnodePtr2First(listHandle);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(listHandle,&tuktuk);
|
||||
if(strcmp(tuktuk.name,name) == 0){
|
||||
memcpy(tuk,&tuktuk,sizeof(MotControl));
|
||||
return 1;
|
||||
}
|
||||
iRet = LLDnodePtr2Next(listHandle);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------------*/
|
||||
float getListMotorPosition(int listHandle, char *name){
|
||||
int iRet;
|
||||
MotControl tuktuk;
|
||||
|
||||
iRet = LLDnodePtr2First(listHandle);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(listHandle,&tuktuk);
|
||||
if(strcmp(tuktuk.name,name) == 0){
|
||||
return tuktuk.position;
|
||||
}
|
||||
iRet = LLDnodePtr2Next(listHandle);
|
||||
}
|
||||
return -999999.99;
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
void printMotorList(int listHandle, SConnection *pCon){
|
||||
int iRet;
|
||||
MotControl tuktuk;
|
||||
char pBueffel[132];
|
||||
|
||||
MOLIGetValue(&listHandle,pCon);
|
||||
|
||||
iRet = LLDnodePtr2First(listHandle);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(listHandle,&tuktuk);
|
||||
snprintf(pBueffel,131,"Driving %20s from %8.3f to %8.3f",
|
||||
tuktuk.name, tuktuk.position, tuktuk.target);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
iRet = LLDnodePtr2Next(listHandle);
|
||||
}
|
||||
}
|
34
motorlist.h
Normal file
34
motorlist.h
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Support module which manages a list of motors and their target values
|
||||
when running complex movements. See accompanying tex file for
|
||||
more info.
|
||||
|
||||
copyright: see file COPYRIGHT
|
||||
|
||||
Mark Koennecke, September 2005
|
||||
-----------------------------------------------------------------------*/
|
||||
#ifndef SICSMOTLIST
|
||||
#define SICSMOTLIST
|
||||
#include "sics.h"
|
||||
|
||||
typedef struct{
|
||||
char name[80];
|
||||
float target;
|
||||
float position;
|
||||
pIDrivable pDriv;
|
||||
void *data;
|
||||
int running;
|
||||
}MotControl, *pMotControl;
|
||||
|
||||
/*======================================================================*/
|
||||
|
||||
pIDrivable makeMotListInterface();
|
||||
int addMotorToList(int listHandle, char *name, float targetValue);
|
||||
int setNewMotorTarget(int listHandle, char *name, float value);
|
||||
int getMotorFromList(int listHandle, char *name, pMotControl tuk);
|
||||
float getListMotorPosition(int listHandle, char *name);
|
||||
void printMotorList(int listHandle, SConnection *pCon);
|
||||
|
||||
#endif
|
||||
|
101
motorlist.tex
Normal file
101
motorlist.tex
Normal file
@ -0,0 +1,101 @@
|
||||
\subsection{The Motorlist Module}
|
||||
The motorlist is e helper module for implementing complex movements of
|
||||
multiple motors. A good example is the coordination of the reflectometer AMOR.
|
||||
The general idea is to have a list (using the lld implementation used in
|
||||
SICS) which contains one of the following data structure for each motor
|
||||
to run:
|
||||
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap1}
|
||||
$\langle$motlistmot {\footnotesize ?}$\rangle\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@typedef struct{@\\
|
||||
\mbox{}\verb@ char name[80];@\\
|
||||
\mbox{}\verb@ float target;@\\
|
||||
\mbox{}\verb@ float position;@\\
|
||||
\mbox{}\verb@ pIDrivable pDriv;@\\
|
||||
\mbox{}\verb@ void *data;@\\
|
||||
\mbox{}\verb@ int running;@\\
|
||||
\mbox{}\verb@}MotControl, *pMotControl;@\\
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
||||
\item Macro referenced in scrap ?.
|
||||
\end{list}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
The motorlist module then takes care of starting all these motors,
|
||||
checking their status etc. A client module then only needs to calculate
|
||||
targets for its motors and populate a list with them. All other
|
||||
drivable tasks will then be performed by motorlist.
|
||||
|
||||
The interface provided by this module looks like this:
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap2}
|
||||
$\langle$motlistint {\footnotesize ?}$\rangle\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@pIDrivable makeMotListInterface();@\\
|
||||
\mbox{}\verb@int addMotorToList(int listHandle, char *name, float targetValue);@\\
|
||||
\mbox{}\verb@int setNewMotorTarget(int listHandle, char *name, float value);@\\
|
||||
\mbox{}\verb@int getMotorFromList(int listHandle, char *name, pMotControl tuk);@\\
|
||||
\mbox{}\verb@float getListMotorPosition(int listHandle, char *name);@\\
|
||||
\mbox{}\verb@void printMotorList(int listHandle, SConnection *pCon); @\\
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
||||
\item Macro referenced in scrap ?.
|
||||
\end{list}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
\begin{description}
|
||||
\item[makeMotListInterface] creates a drivable interface which is initialized
|
||||
with the motlist implementations. Each of the drivabel functions expects
|
||||
as pData pointer a pointer to the listHandle describing the list of motors
|
||||
to run
|
||||
\item[addMotorToList] adds motor name with target value targetValue to
|
||||
the list identified by listHandle. Retruns 1 on success, 0 on failure (The
|
||||
motor could not be found)
|
||||
\item[setNewMotorTarget] does what it says.
|
||||
\item[getMotorFromList] rets a motor entry for name from listHandle. Used in
|
||||
order to retrieve positions.
|
||||
\item[getListMotorPosition] retrieves the current position of motor name.
|
||||
\end{description}
|
||||
All the rest of the interface is invoked through the drivable interface
|
||||
functions which thus can be used in implementing own drivable interfaces.
|
||||
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap3}
|
||||
\verb@"motorlist.h"@ {\footnotesize ? }$\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@/*----------------------------------------------------------------------@\\
|
||||
\mbox{}\verb@ Support module which manages a list of motors and their target values@\\
|
||||
\mbox{}\verb@ when running complex movements. See accompanying tex file for@\\
|
||||
\mbox{}\verb@ more info.@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ copyright: see file COPYRIGHT@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ Mark Koennecke, September 2005@\\
|
||||
\mbox{}\verb@-----------------------------------------------------------------------*/@\\
|
||||
\mbox{}\verb@#ifndef SICSMOTLIST@\\
|
||||
\mbox{}\verb@#define SICSMOTLIST@\\
|
||||
\mbox{}\verb@#include "sics.h"@\\
|
||||
\mbox{}\verb@@$\langle$motlistmot {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@/*======================================================================*/@\\
|
||||
\mbox{}\verb@@$\langle$motlistint {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@#endif@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-2ex}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
67
motorlist.w
Normal file
67
motorlist.w
Normal file
@ -0,0 +1,67 @@
|
||||
\subsection{The Motorlist Module}
|
||||
The motorlist is e helper module for implementing complex movements of
|
||||
multiple motors. A good example is the coordination of the reflectometer AMOR.
|
||||
The general idea is to have a list (using the lld implementation used in
|
||||
SICS) which contains one of the following data structure for each motor
|
||||
to run:
|
||||
|
||||
@d motlistmot @{
|
||||
typedef struct{
|
||||
char name[80];
|
||||
float target;
|
||||
float position;
|
||||
pIDrivable pDriv;
|
||||
void *data;
|
||||
int running;
|
||||
}MotControl, *pMotControl;
|
||||
@}
|
||||
|
||||
The motorlist module then takes care of starting all these motors,
|
||||
checking their status etc. A client module then only needs to calculate
|
||||
targets for its motors and populate a list with them. All other
|
||||
drivable tasks will then be performed by motorlist.
|
||||
|
||||
The interface provided by this module looks like this:
|
||||
@d motlistint @{
|
||||
pIDrivable makeMotListInterface();
|
||||
int addMotorToList(int listHandle, char *name, float targetValue);
|
||||
int setNewMotorTarget(int listHandle, char *name, float value);
|
||||
int getMotorFromList(int listHandle, char *name, pMotControl tuk);
|
||||
float getListMotorPosition(int listHandle, char *name);
|
||||
void printMotorList(int listHandle, SConnection *pCon);
|
||||
@}
|
||||
\begin{description}
|
||||
\item[makeMotListInterface] creates a drivable interface which is initialized
|
||||
with the motlist implementations. Each of the drivabel functions expects
|
||||
as pData pointer a pointer to the listHandle describing the list of motors
|
||||
to run
|
||||
\item[addMotorToList] adds motor name with target value targetValue to
|
||||
the list identified by listHandle. Retruns 1 on success, 0 on failure (The
|
||||
motor could not be found)
|
||||
\item[setNewMotorTarget] does what it says.
|
||||
\item[getMotorFromList] rets a motor entry for name from listHandle. Used in
|
||||
order to retrieve positions.
|
||||
\item[getListMotorPosition] retrieves the current position of motor name.
|
||||
\end{description}
|
||||
All the rest of the interface is invoked through the drivable interface
|
||||
functions which thus can be used in implementing own drivable interfaces.
|
||||
|
||||
@o motorlist.h @{
|
||||
/*----------------------------------------------------------------------
|
||||
Support module which manages a list of motors and their target values
|
||||
when running complex movements. See accompanying tex file for
|
||||
more info.
|
||||
|
||||
copyright: see file COPYRIGHT
|
||||
|
||||
Mark Koennecke, September 2005
|
||||
-----------------------------------------------------------------------*/
|
||||
#ifndef SICSMOTLIST
|
||||
#define SICSMOTLIST
|
||||
#include "sics.h"
|
||||
@<motlistmot@>
|
||||
/*======================================================================*/
|
||||
@<motlistint@>
|
||||
#endif
|
||||
|
||||
@}
|
81
mumo.c
81
mumo.c
@ -505,7 +505,7 @@ static int SaveMumo(void *pData, char *name, FILE *fd)
|
||||
current value and compare it with the stored ones for
|
||||
all currently stored named positions.
|
||||
|
||||
*/
|
||||
-------------------------------------------------------------------------*/
|
||||
const char *FindNamPos(pMulMot self, SConnection *pCon)
|
||||
{
|
||||
int iRet, iTest;
|
||||
@ -514,6 +514,33 @@ static int SaveMumo(void *pData, char *name, FILE *fd)
|
||||
char *pName, *pVal;
|
||||
float f1, f2;
|
||||
pMotor pMot = NULL;
|
||||
pStringDict motCache = NULL;
|
||||
|
||||
/*
|
||||
* create cache of motor positions
|
||||
*/
|
||||
motCache = CreateStringDict();
|
||||
if(motCache == NULL){
|
||||
SCWrite(pCon,"ERROR: out of memory in FindNamPos",eError);
|
||||
return NULL;
|
||||
}
|
||||
StringDictKillScan(self->pAlias);
|
||||
pAlias = StringDictGetNext(self->pAlias,pCurrCommand,1023);
|
||||
while(pAlias != NULL){
|
||||
pMot = FindMotor(pServ->pSics,pCurrCommand);
|
||||
if(pMot != NULL){
|
||||
iRet = MotorGetSoftPosition(pMot,pCon,&f1);
|
||||
if(!iRet){
|
||||
sprintf(pTestCommand,
|
||||
"ERROR: failed to get motor position for %s", pName);
|
||||
SCWrite(pCon,pTestCommand,eError);
|
||||
return NULL;
|
||||
}
|
||||
snprintf(pTestCommand,1023,"%f",f1);
|
||||
StringDictAddPair(motCache,pCurrCommand,pTestCommand);
|
||||
}
|
||||
pAlias = StringDictGetNext(self->pAlias,pCurrCommand,1023);
|
||||
}
|
||||
|
||||
/* scan named position list */
|
||||
StringDictKillScan(self->pNamPos);
|
||||
@ -524,43 +551,27 @@ static int SaveMumo(void *pData, char *name, FILE *fd)
|
||||
pName = strtok(pCurrCommand," ");
|
||||
iTest = 1;
|
||||
while(pName != NULL)
|
||||
{
|
||||
pVal = strtok(NULL," ");
|
||||
pMot = FindMotor(pServ->pSics,pName);
|
||||
if(pMot)
|
||||
{
|
||||
iRet = MotorGetSoftPosition(pMot,pCon,&f1);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pTestCommand,
|
||||
"ERROR: failed to get motor position for %s", pName);
|
||||
SCWrite(pCon,pTestCommand,eError);
|
||||
return NULL;
|
||||
}
|
||||
sscanf(pVal,"%f",&f2);
|
||||
f1 = f1 - f2;
|
||||
if(f1 < 0.)
|
||||
f1 = - f1;
|
||||
if(f1 > 0.03)
|
||||
{
|
||||
iTest--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SCWrite(pCon,"ERROR: internal error in FindNamPos, no motor",
|
||||
eError);
|
||||
return NULL;
|
||||
}
|
||||
pName = strtok(NULL," ");
|
||||
{
|
||||
pVal = strtok(NULL," ");
|
||||
StringDictGetAsNumber(motCache,pName,&f1);
|
||||
sscanf(pVal,"%f",&f2);
|
||||
f1 = f1 - f2;
|
||||
if(f1 < 0.)
|
||||
f1 = - f1;
|
||||
if(f1 > 0.03)
|
||||
{
|
||||
iTest--;
|
||||
break;
|
||||
}
|
||||
pName = strtok(NULL," ");
|
||||
}
|
||||
if(iTest == 1 && (strcmp(pAlias,"back") != 0) ) {
|
||||
DeleteStringDict(motCache);
|
||||
return pAlias;
|
||||
}
|
||||
if(iTest == 1 && (strcmp(pAlias,"back") != 0) )
|
||||
return pAlias;
|
||||
|
||||
pAlias = StringDictGetNext(self->pNamPos,pTestCommand,1063);
|
||||
}
|
||||
|
||||
DeleteStringDict(motCache);
|
||||
/* not found */
|
||||
return NULL;
|
||||
}
|
||||
|
160
napiu.c
Normal file
160
napiu.c
Normal file
@ -0,0 +1,160 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
NeXus - Neutron & X-ray Common Data Format
|
||||
|
||||
NeXus Utility (NXU) Application Program Interface Header File
|
||||
|
||||
Copyright (C) 2005 Freddie Akeroyd
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
For further information, see <http://www.nexus.anl.gov/>
|
||||
|
||||
$Id: napiu.c,v 1.1 2005/10/05 07:20:18 koennecke Exp $
|
||||
|
||||
----------------------------------------------------------------------------*/
|
||||
static const char* rscid = "$Id: napiu.c,v 1.1 2005/10/05 07:20:18 koennecke Exp $"; /* Revision interted by CVS */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include "napiu.h"
|
||||
|
||||
#define DO_GLOBAL(__name) \
|
||||
if (__name != NULL) \
|
||||
{ \
|
||||
if (NXputattr(file_id, #__name, (char*)__name, strlen(__name), NX_CHAR) != NX_OK) \
|
||||
{ \
|
||||
return NX_ERROR; \
|
||||
} \
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUwriteglobals(NXhandle file_id, const char* user, const char* affiliation, const char* address, const char* telephone_number, const char* fax_number, const char* email)
|
||||
{
|
||||
DO_GLOBAL(user);
|
||||
DO_GLOBAL(affiliation);
|
||||
DO_GLOBAL(address);
|
||||
DO_GLOBAL(telephone_number);
|
||||
DO_GLOBAL(fax_number);
|
||||
DO_GLOBAL(email);
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
/* NXUwritegroup creates and leaves open a group */
|
||||
NXstatus CALLING_STYLE NXUwritegroup(NXhandle file_id, const char* group_name, const char* group_class)
|
||||
{
|
||||
int status;
|
||||
status = NXmakegroup(file_id, group_name, group_class);
|
||||
if (status == NX_OK)
|
||||
{
|
||||
status = NXopengroup(file_id, group_name, group_class);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUwritedata(NXhandle file_id, const char* data_name, const void* data, int data_type, int rank, const int dim[], const char* units, const int start[], const int size[])
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUreaddata(NXhandle file_id, const char* data_name, void* data, char* units, const int start[], const int size[])
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUwritehistogram(NXhandle file_id, const char* data_name, const void* data, const char* units)
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUreadhistogram(NXhandle file_id, const char* data_name, void* data, char* units)
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
static int NXcompress_type = 0;
|
||||
static int NXcompress_size = 0;
|
||||
|
||||
/* NXUsetcompress sets the default compression type and minimum size */
|
||||
NXstatus CALLING_STYLE NXUsetcompress(NXhandle file_id, int comp_type, int comp_size)
|
||||
{
|
||||
int status;
|
||||
if (comp_type == NX_COMP_LZW || comp_type == NX_COMP_HUF ||
|
||||
comp_type == NX_COMP_RLE || comp_type == NX_COMP_NONE)
|
||||
{
|
||||
NXcompress_type = comp_type;
|
||||
if (comp_size != 0)
|
||||
{
|
||||
NXcompress_size = comp_size;
|
||||
}
|
||||
status = NX_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
NXIReportError(NXpData, "Invalid compression option");
|
||||
status = NX_ERROR;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/* !NXUfindgroup finds if a NeXus group of the specified name exists */
|
||||
NXstatus CALLING_STYLE NXUfindgroup(NXhandle file_id, const char* group_name, char* group_class)
|
||||
{
|
||||
int status, n;
|
||||
NXname vname, vclass;
|
||||
status = NXgetgroupinfo(file_id, &n, vname, vclass);
|
||||
if (status != NX_OK)
|
||||
{
|
||||
return status;
|
||||
}
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUfindclass(NXhandle file_id, const char* group_class, char* group_name, int find_index)
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
/* NXUfinddata finds if a NeXus data item is in the current group */
|
||||
NXstatus CALLING_STYLE NXUfinddata(NXhandle file_id, const char* data_name)
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUfindattr(NXhandle file_id, const char* attr_name)
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUfindsignal(NXhandle file_id, int signal, char* data_name, int* data_rank, int* data_type, int data_dimensions[])
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUfindaxis(NXhandle file_id, int axis, int primary, char* data_name, int* data_rank, int* data_type, int data_dimensions[])
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUfindlink(NXhandle file_id, NXlink* group_id, const char* group_class)
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
||||
NXstatus CALLING_STYLE NXUresumelink(NXhandle file_id, NXlink group_id)
|
||||
{
|
||||
return NX_OK;
|
||||
}
|
||||
|
72
napiu.h
Normal file
72
napiu.h
Normal file
@ -0,0 +1,72 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
NeXus - Neutron & X-ray Common Data Format
|
||||
|
||||
NeXus Utility (NXU) Application Program Interface Header File
|
||||
|
||||
Copyright (C) 2005 Freddie Akeroyd
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
For further information, see <http://www.nexus.anl.gov/>
|
||||
|
||||
$Id: napiu.h,v 1.1 2005/10/05 07:20:18 koennecke Exp $
|
||||
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef NEXUSAPIU
|
||||
#define NEXUSAPIU
|
||||
|
||||
#include "napi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUwriteglobals(NXhandle file_id, const char* user, const char* affiliation, const char* address, const char* phone, const char* fax, const char* email);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUwritegroup(NXhandle file_id, const char* group_name, const char* group_class);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUwritedata(NXhandle file_id, const char* data_name, const void* data, int data_type, int rank, const int dim[], const char* units, const int start[], const int size[]);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUreaddata(NXhandle file_id, const char* data_name, void* data, char* units, const int start[], const int size[]);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUwritehistogram(NXhandle file_id, const char* data_name, const void* data, const char* units);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUreadhistogram(NXhandle file_id, const char* data_name, void* data, char* units);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUsetcompress(NXhandle file_id, int comp_type, int comp_size);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUfindgroup(NXhandle file_id, const char* group_name, char* group_class);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUfindclass(NXhandle file_id, const char* group_class, char* group_name, int find_index);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUfinddata(NXhandle file_id, const char* data_name);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUfindattr(NXhandle file_id, const char* attr_name);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUfindsignal(NXhandle file_id, int signal, char* data_name, int* data_rank, int* data_type, int data_dimensions[]);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUfindaxis(NXhandle file_id, int axis, int primary, char* data_name, int* data_rank, int* data_type, int data_dimensions[]);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUfindlink(NXhandle file_id, NXlink* group_id, const char* group_class);
|
||||
|
||||
NX_EXTERNAL NXstatus CALLING_STYLE NXUresumelink(NXhandle file_id, NXlink group_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /*NEXUSAPIU*/
|
||||
|
132
nxconfig.h
Normal file
132
nxconfig.h
Normal file
@ -0,0 +1,132 @@
|
||||
/* include/nxconfig.h. Generated by configure. */
|
||||
/* include/nxconfig_h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `alarm' function. */
|
||||
#define HAVE_ALARM 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the `ftime' function. */
|
||||
#define HAVE_FTIME 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `df' library (-ldf). */
|
||||
#define HAVE_LIBDF 1
|
||||
|
||||
/* Define to 1 if you have the `hdf5' library (-lhdf5). */
|
||||
#define HAVE_LIBHDF5 1
|
||||
|
||||
/* Define to 1 if you have the `jpeg' library (-ljpeg). */
|
||||
#define HAVE_LIBJPEG 1
|
||||
|
||||
/* Define to 1 if you have the `mfhdf' library (-lmfhdf). */
|
||||
#define HAVE_LIBMFHDF 1
|
||||
|
||||
/* Define to 1 if you have the `rpc' library (-lrpc). */
|
||||
/* #undef HAVE_LIBRPC */
|
||||
|
||||
/* Define to 1 if you have the `SystemStubs' library (-lSystemStubs). */
|
||||
/* #undef HAVE_LIBSYSTEMSTUBS */
|
||||
|
||||
/* Define to 1 if you have the `sz' library (-lsz). */
|
||||
#define HAVE_LIBSZ 1
|
||||
|
||||
/* Define to 1 if you have the `xml2' library (-lxml2). */
|
||||
#define HAVE_LIBXML2 1
|
||||
|
||||
/* Define to 1 if you have the `z' library (-lz). */
|
||||
#define HAVE_LIBZ 1
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#define HAVE_MALLOC 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#define HAVE_STRRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `tzset' function. */
|
||||
#define HAVE_TZSET 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "nexus"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "nexus-developers@anl.gov"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "NeXus Library"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "NeXus Library 3.0.1"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "nexus"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "3.0.1"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "3.0.1"
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
/* #undef malloc */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
10
trigd.c
10
trigd.c
@ -36,6 +36,16 @@ extern double Tand(double x)
|
||||
return (tan(x*DEGREE_RAD));
|
||||
}
|
||||
/*******************************************************************************
|
||||
* cotangens of angle in degrees
|
||||
*****************************************************************************/
|
||||
extern double Cotd(double x){
|
||||
if(tan(x*DEGREE_RAD) > .00001){
|
||||
return (1./tan(x*DEGREE_RAD));
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
* Cosinus of angle in degrees.
|
||||
*******************************************************************************/
|
||||
extern double Cosd (double x)
|
||||
|
Reference in New Issue
Block a user