- Fixes for FOCUS 2D

- Mapped fileeval to exe manager
- Updates for TRICS file formats
This commit is contained in:
koennecke
2006-05-23 15:05:39 +00:00
parent 9a211b7366
commit 8b12033cb2
7 changed files with 85 additions and 15 deletions

View File

@ -1499,9 +1499,9 @@
*/ */
if (asyn_info->skt <= 0) { if (asyn_info->skt <= 0) {
memset (rcve_buff, memset (rcve_buff,
'0', sizeof (*rcve_buff)); '0', sizeof (*rcve_buff));
if ((AsynSrv_errcode == 0) && (asyn_info->skt < 0)) { if ((AsynSrv_errcode == 0) && (asyn_info->skt < 0)) {
AsynSrv_errcode = ASYNSRV__FORCED_CLOSED; AsynSrv_errcode = ASYNSRV__FORCED_CLOSED;
} }
return False; return False;
} }
@ -1601,6 +1601,7 @@
** .. timeout of 1.5*tmo */ ** .. timeout of 1.5*tmo */
} }
memset (rcve_buff,0, sizeof (*rcve_buff));
size = sizeof (rcve_buff->msg_size); size = sizeof (rcve_buff->msg_size);
memset(rcve_buff->msg_size,0,size); memset(rcve_buff->msg_size,0,size);
status = recv (asyn_info->skt, rcve_buff->msg_size, size, 0); status = recv (asyn_info->skt, rcve_buff->msg_size, size, 0);

View File

@ -78,6 +78,9 @@ extern int close(int fp);
assert(self); assert(self);
assert(self->iClientSocket); assert(self->iClientSocket);
memset(&Req_buff,0,sizeof(struct req_buff_struct));
memset(&Rply_buff,0,sizeof(struct rply_buff_struct));
/* prepare a message */ /* prepare a message */
Req_buff.bigend = htonl (0x12345678); Req_buff.bigend = htonl (0x12345678);
@ -466,6 +469,8 @@ extern int close(int fp);
{ {
return INVALID_HARSH; return INVALID_HARSH;
} }
memset(&Req_buff,0,sizeof(struct req_buff_struct));
memset(&Rply_buff,0,sizeof(struct rply_buff_struct));
/* fill in the request data structure */ /* fill in the request data structure */
Req_buff.bigend = htonl (0x12345678); Req_buff.bigend = htonl (0x12345678);
@ -700,6 +705,9 @@ extern int close(int fp);
assert(self); assert(self);
memset(&Req_buff,0,sizeof(struct req_buff_struct));
memset(&Rply_buff,0,sizeof(struct rply_buff_struct));
/* fill in the request data structure */ /* fill in the request data structure */
Req_buff.bigend = htonl (0x12345678); Req_buff.bigend = htonl (0x12345678);
Req_buff.cmnd = htonl (SQHM_CNCT); Req_buff.cmnd = htonl (SQHM_CNCT);
@ -804,6 +812,8 @@ extern int close(int fp);
} }
iRet = 1; iRet = 1;
memset(&Req_buff,0,sizeof(struct req_buff_struct));
/* send close message, this helps the master to clean up */ /* send close message, this helps the master to clean up */
Req_buff.bigend = htonl (0x12345678); Req_buff.bigend = htonl (0x12345678);
@ -1660,6 +1670,9 @@ extern int close(int fp);
struct tof tofi; struct tof tofi;
assert(self); assert(self);
memset(&Req_buff,0,sizeof(struct req_buff_struct));
memset(&Rply_buff,0,sizeof(struct rply_buff_struct));
/* figure out how long we are going to be*/ /* figure out how long we are going to be*/
iLength = 24 + self->iBanks*sizeof(struct tof_bank); iLength = 24 + self->iBanks*sizeof(struct tof_bank);

BIN
libpsi.a

Binary file not shown.

View File

@ -293,7 +293,7 @@
else else
{ {
/* close the connection if there is such a thing */ /* close the connection if there is such a thing */
SINQHMCloseDAQ(pInternal->pMaster); SINQHMCloseDAQ(pInternal->pMaster);
} }
/* in any case let us propagate the state of affairs to /* in any case let us propagate the state of affairs to

View File

@ -25,14 +25,14 @@ extern char *trim(char *);
/*=================================================================== /*===================================================================
The request strings to append to the computer address The request strings to append to the computer address
====================================================================*/ ====================================================================*/
static char startdaq[] = {"/sinqhm/startdaq.egi"}; static char startdaq[] = {"/admin/startdaq.egi"};
static char stopdaq[] = {"/sinqhm/stopdaq.egi"}; static char stopdaq[] = {"/admin/stopdaq.egi"};
static char pausedaq[] = {"/sinqhm/pausedaq.egi"}; static char pausedaq[] = {"/admin/pausedaq.egi"};
static char continuedaq[] = {"/sinqhm/continuedaq.egi"}; static char continuedaq[] = {"/admin/continuedaq.egi"};
static char statusdaq[] = {"/sinqhm/textstatus.egi"}; static char statusdaq[] = {"/admin/textstatus.egi"};
static char gethm[] = {"/sinqhm/readhmdata.egi"}; static char gethm[] = {"/admin/readhmdata.egi"};
static char configure[] = {"/sinqhm/configure.egi"}; static char configure[] = {"/admin/configure.egi"};
static char preset[] = {"/sinqhm/presethm.egi"}; static char preset[] = {"/admin/presethm.egi"};
/*==================================================================== /*====================================================================
error codes error codes
======================================================================*/ ======================================================================*/
@ -191,7 +191,7 @@ static int SinqHttpConfigure(pHistDriver self, SConnection *pCon,
/* /*
actually do configure actually do configure
*/ */
if(iInit == 0){ if(iInit == 1){
memset(confCommand,0,512*sizeof(char)); memset(confCommand,0,512*sizeof(char));
if(StringDictGet(pOpt,"hmconfigscript",confCommand,511) != 1){ if(StringDictGet(pOpt,"hmconfigscript",confCommand,511) != 1){
SCWrite(pCon, SCWrite(pCon,
@ -201,7 +201,8 @@ static int SinqHttpConfigure(pHistDriver self, SConnection *pCon,
} }
status = Tcl_Eval(pSics->pTcl,confCommand); status = Tcl_Eval(pSics->pTcl,confCommand);
if(status != TCL_OK){ if(status != TCL_OK){
snprintf(confCommand,511,"ERROR: Tcl reported %s while evaluating hmconfigscript", snprintf(confCommand,511,
"ERROR: Tcl reported %s while evaluating hmconfigscript",
Tcl_GetStringResult(pSics->pTcl)); Tcl_GetStringResult(pSics->pTcl));
SCWrite(pCon,confCommand,eError); SCWrite(pCon,confCommand,eError);
return 0; return 0;
@ -218,6 +219,7 @@ static int SinqHttpConfigure(pHistDriver self, SConnection *pCon,
} }
status = ghttp_set_type(pPriv->syncRequest,ghttp_type_post); status = ghttp_set_type(pPriv->syncRequest,ghttp_type_post);
confData = (char *)Tcl_GetStringResult(pSics->pTcl); confData = (char *)Tcl_GetStringResult(pSics->pTcl);
/* puts(confData); */
status = ghttp_set_body(pPriv->syncRequest,confData, status = ghttp_set_body(pPriv->syncRequest,confData,
strlen(confData)); strlen(confData));
ghttp_set_authinfo(pPriv->syncRequest, pPriv->userName, ghttp_set_authinfo(pPriv->syncRequest, pPriv->userName,

View File

@ -445,8 +445,9 @@ static int loadTable(pTableDrive self, char *filename, SConnection *pCon){
while(fgets(pBueffel,511,fd) != NULL){ while(fgets(pBueffel,511,fd) != NULL){
if(pBueffel[0] == '#'){ if(pBueffel[0] == '#'){
strcpy(moti.motorName,trim(&pBueffel[1])); strcpy(moti.motorName,trim(&pBueffel[1]));
moti.pMot = FindCommandData(pServ->pSics,moti.motorName, moti.pMot = FindCommandData(pServ->pSics,
"Motor"); moti.motorName,
"Motor");
if(moti.pMot == NULL){ if(moti.pMot == NULL){
snprintf(pBueffel,511,"ERROR: motor %s NOT found!", snprintf(pBueffel,511,"ERROR: motor %s NOT found!",
moti.motorName); moti.motorName);

View File

@ -151,6 +151,8 @@ static int TASHeader(pScanData self)
pDummy pDum= NULL; pDummy pDum= NULL;
pIDrivable pDrive = NULL; pIDrivable pDrive = NULL;
pEVControl pTem = NULL; pEVControl pTem = NULL;
pSicsVariable sVar = NULL;
float f1, f2, f3, f4;
assert(self); assert(self);
assert(pTAS); assert(pTAS);
@ -285,6 +287,57 @@ static int TASHeader(pScanData self)
pTAS->tasPar[BX]->fVal, pTAS->tasPar[BX]->fVal,
pTAS->tasPar[BY]->fVal, pTAS->tasPar[BY]->fVal,
pTAS->tasPar[BZ]->fVal); pTAS->tasPar[BZ]->fVal);
/*
* write mupad stuff if available
*/
sVar = FindCommandData(pServ->pSics,"w1","SicsVariable");
if(sVar != NULL)
{
f1 = sVar->fVal;
sVar = FindCommandData(pServ->pSics,"w2","SicsVariable");
if(sVar != NULL)
{
f2 = sVar->fVal;
}
sVar = FindCommandData(pServ->pSics,"w3","SicsVariable");
if(sVar != NULL)
{
f3 = sVar->fVal;
}
sVar = FindCommandData(pServ->pSics,"w4","SicsVariable");
if(sVar != NULL)
{
f4 = sVar->fVal;
}
fprintf(self->fd,"PARAM: W1=%8.4f, W2=%8.4f, W3=%8.4f, W4=%8.4f\n",
f1, f2, f3, f4);
sVar = FindCommandData(pServ->pSics,"p1","SicsVariable");
if(sVar != NULL)
{
f1 = sVar->fVal;
}
sVar = FindCommandData(pServ->pSics,"p2","SicsVariable");
if(sVar != NULL)
{
f2 = sVar->fVal;
}
sVar = FindCommandData(pServ->pSics,"p3","SicsVariable");
if(sVar != NULL)
{
f3 = sVar->fVal;
}
sVar = FindCommandData(pServ->pSics,"p4","SicsVariable");
if(sVar != NULL)
{
f4 = sVar->fVal;
}
fprintf(self->fd,"PARAM: P1=%8.4f, P2=%8.4f, P3=%8.4f, P4=%8.4f\n",
f1, f2, f3, f4);
}
/* /*
write currents if in polarisation mode write currents if in polarisation mode