- Yet another fix for eclipse commit problems
This commit is contained in:
36
mcstas/dmc/README
Normal file
36
mcstas/dmc/README
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
VIRTUAL DMC
|
||||||
|
|
||||||
|
This is the SICS-McStas virtual instrument DMC modelled after the real
|
||||||
|
powder diffcractometer DMC at SINQ:
|
||||||
|
|
||||||
|
http://sinq.web.psi.ch/sinq/instr/dmc/dmc.html
|
||||||
|
|
||||||
|
The McStas simulation used for this system has been verified against
|
||||||
|
the real instrument. The basic usage is to start the SICServer with:
|
||||||
|
|
||||||
|
./SICServer vdmc.tcl
|
||||||
|
|
||||||
|
in this directory. Then you can connect to SICS at localhost/2911
|
||||||
|
with any SICS client and start issuing commands.
|
||||||
|
|
||||||
|
In order to save simulation time, the simulation works with
|
||||||
|
neutron data files presimulated for four wavelength up to the sample.
|
||||||
|
This is why you get your wavelength coerced to the nearest
|
||||||
|
precalculated value.
|
||||||
|
|
||||||
|
If you desire to "measure" your own sample on virtual DMC, you first
|
||||||
|
have to create a LazyPulverix output file. You then can proceed to
|
||||||
|
load the sample into SICS with the SICS command:
|
||||||
|
|
||||||
|
sample load path-to-lazy-pulverix-outputfile
|
||||||
|
|
||||||
|
The command:
|
||||||
|
|
||||||
|
sample list
|
||||||
|
|
||||||
|
tells you which samples virtual DMC already knows about.
|
||||||
|
|
||||||
|
Questions and comments to: Mark.Koennecke@psi.ch
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
|||||||
#include <lld.h>
|
#include <lld.h>
|
||||||
#include <stptok.h>
|
#include <stptok.h>
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
#include "splitter.h"
|
#include <splitter.h>
|
||||||
|
|
||||||
/*== there can be only hipadaba in SICS, some globals to care for that == */
|
/*== there can be only hipadaba in SICS, some globals to care for that == */
|
||||||
static pHdb root = NULL;
|
static pHdb root = NULL;
|
||||||
@ -363,7 +363,7 @@ static int SICSScriptReadCallback(void *userData, void *callData, pHdb node,
|
|||||||
* something = anything
|
* something = anything
|
||||||
* as well as a plain value alone
|
* as well as a plain value alone
|
||||||
*/
|
*/
|
||||||
data = Tcl_GetStringResult(InterpGetTcl(pServ->pSics));
|
data = (char *)Tcl_GetStringResult(InterpGetTcl(pServ->pSics));
|
||||||
if(data == NULL){
|
if(data == NULL){
|
||||||
SCWrite(pCon,"ERROR: no result returned from script",eError);
|
SCWrite(pCon,"ERROR: no result returned from script",eError);
|
||||||
return 0;
|
return 0;
|
||||||
@ -632,6 +632,7 @@ pHdbCallback MakeIntFixedCallback(int *data, int length){
|
|||||||
pHdb MakeSICSHdbPar(char *name, int priv, hdbValue v){
|
pHdb MakeSICSHdbPar(char *name, int priv, hdbValue v){
|
||||||
pHdb result = NULL;
|
pHdb result = NULL;
|
||||||
pHdbCallback pHcb = NULL;
|
pHdbCallback pHcb = NULL;
|
||||||
|
char pPriv[20];
|
||||||
|
|
||||||
result = MakeHipadabaNode(name,v.dataType,v.arrayLength);
|
result = MakeHipadabaNode(name,v.dataType,v.arrayLength);
|
||||||
if(result == NULL){
|
if(result == NULL){
|
||||||
@ -652,6 +653,21 @@ pHdb MakeSICSHdbPar(char *name, int priv, hdbValue v){
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
AppendHipadabaCallback(result,HCBSET,pHcb);
|
AppendHipadabaCallback(result,HCBSET,pHcb);
|
||||||
|
switch(priv){
|
||||||
|
case 0:
|
||||||
|
strcpy(pPriv,"internal");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
strcpy(pPriv,"manager");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
strcpy(pPriv,"user");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
strcpy(pPriv,"spy");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SetHdbProperty(result,"priv",pPriv);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user