- Fixed documentation typos

- In support of HMsec, allow the count command in countsec to run without a
  preset parameter. If this is missing the old, stored preset is used.
- Removed a check which causes initialisation of the HM from a batch file fail
  for POLDI
- fixed @nl@ encoding of \n problem with certain kinds of batch files generated by GTSE
- Fixed a bug with summing on hitsmemsec. nxdataset now uses 64 bit int for dimensions.
- Fixed motorsec to remove itself properly from a parent when linked. Please note
  that there is still the limitation that a second generation motor can only be linked
  once in a Hipadaba tree
- Extended subsampling a HM for second generation HM
- Added a hscriptnotify. This calls a script on the update of a node
- POLDI has been rebuilt, chnages to data file writing
- For testing, sinqhttopt now understands a special command, byteswapoff,
  which switches off byte swapping. Required when the HM ius run on an Intel box.
This commit is contained in:
koennecke
2013-09-16 09:27:51 +00:00
parent 5c3e3a4422
commit ec8a3a7bc4
2 changed files with 39 additions and 6 deletions

View File

@ -183,8 +183,13 @@ static void writeDiaphragm2(NXhandle hfil, NXdict hdict,
static void writeCollimator(NXhandle hfil, NXdict hdict,
SConnection * pCon)
{
char pBueffel[50];
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "cov", "cov");
memset(pBueffel,0,sizeof(pBueffel));
Tcl_Eval(InterpGetTcl(pServ->pSics),"coll");
strncpy(pBueffel,Tcl_GetStringResult(InterpGetTcl(pServ->pSics)), 49);
NXDputalias(hfil, hdict, "collpos", pBueffel);
}
/*--------------------------------------------------------------------*/
@ -231,6 +236,15 @@ static void writeSample(NXhandle hfil, NXdict hdict, SConnection * pCon)
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "ssv0", "sv");
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "ssa", "sa");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "ssa0", "sa");
pCom = FindCommand(pServ->pSics,"chi");
if(pCom != NULL){
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "schi", "chi");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "schi0", "chi");
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "sphi", "phi");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "sphi0", "phi");
}
}
/*--------------------------------------------------------------------*/

View File

@ -93,6 +93,7 @@ typedef struct {
int bytesExpected;
char *contentType;
int headerReceived;
int byteSwap;
} HttpProt, *pHttpProt;
/*---------------------------------------------------------------------*/
static int moreToReadThen(Ascon *a, int length)
@ -254,9 +255,15 @@ static void handleReply(Ascon * a)
if(pHttp->node == NULL){
clearSICSData(pHttp->binData);
dataPtr = getSICSDataPointer(pHttp->binData, 0, len);
if(pHttp->byteSwap == 1){
for (i = 0; i < len; i++) {
dataPtr[i] = ntohl(hmData[i]);
}
} else {
for (i = 0; i < len; i++) {
dataPtr[i] = hmData[i];
}
}
assignSICSType(pHttp->binData, 0, len, INTTYPE);
DynStringClear(a->rdBuffer);
DynStringCopy(a->rdBuffer, "SICSDATA");
@ -275,9 +282,15 @@ static void handleReply(Ascon * a)
}
pHttp->node->value.arrayLength = len;
}
if(pHttp->byteSwap == 1){
for(i = 0; i < len; i++){
pHttp->node->value.v.intArray[i] = ntohl(hmData[i]);
}
} else {
for(i = 0; i < len; i++){
pHttp->node->value.v.intArray[i] = hmData[i];
}
}
NotifyHipadabaPar(pHttp->node,NULL);
DynStringClear(a->rdBuffer);
DynStringCopy(a->rdBuffer, "NODEDATA");
@ -377,6 +390,11 @@ static int HttpHandler(Ascon * a)
a->state = AsconConnectDone; /* success */
break;
case AsconWriteStart:
if(strcmp(GetCharArray(a->wrBuffer),"byteswapoff") == 0) {
pHttp->byteSwap = 0;
a->state = AsconReadDone;
return 0;
}
if(!ANETvalidHandle(pHttp->sockHandle)){
hostport = strdup(a->hostport);
colon = strchr(hostport, ':');
@ -520,6 +538,7 @@ static int HttpProtInit(Ascon * a, SConnection * con,
}
pHttp->sockHandle = -10;
pHttp->contentType = strdup("text/html");
pHttp->byteSwap = 1;
a->private = pHttp;
a->killPrivate = killHttp;
a->state = AsconConnectStart;