- Added bridge functions to histmemsec to make it look more like histmem
- Modifed many modules using histmem to work also with histmemsec - Extended tasker with task names and task groups - There is a new taskobj which allows to list tasks and to interact with them. - Task now supports running Tcl functions as tasks - There is a new experimental sctcomtask module which allows to define communication tasks against a scriptcontext. This is a new feature which should facilitate writing sequential scripts using asynchronous communication. - A fix to make spss7 work when there are no switches - ORION support for single X. TRICS measures crystals hanging down, ORION standing up SKIPPED: psi/ease.c psi/faverage.c psi/jvlprot.c psi/make_gen psi/pardef.c psi/polterwrite.c psi/psi.c psi/sinq.c psi/spss7.c
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "macro.h"
|
||||
#include "syncedprot.h"
|
||||
#include "scriptcontext.h"
|
||||
#include "sctcomtask.h"
|
||||
|
||||
typedef struct ContextItem {
|
||||
struct ContextItem *next;
|
||||
@@ -862,7 +863,7 @@ static hdbCallbackReturn SctActionCallback(Hdb * node, void *userData,
|
||||
return hdbContinue;
|
||||
}
|
||||
|
||||
static char *ParText(Hdb * cmdNode, char *name,
|
||||
char *ParText(Hdb * cmdNode, char *name,
|
||||
int nPar, char *defaultValue)
|
||||
{
|
||||
Hdb *par;
|
||||
@@ -1412,16 +1413,7 @@ static char *TransactionHandler(void *actionData, char *lastReply,
|
||||
return st->command;
|
||||
} else {
|
||||
st->sent = 2;
|
||||
/*
|
||||
if (st->controller->verbose) {
|
||||
SCPrintf(st->con, eLog, "%6.3f reply : %s", secondsOfMinute(), lastReply);
|
||||
}
|
||||
if (st->controller->fd != NULL) {
|
||||
fprintf(st->controller->fd,"%6.3f reply : %s\n", secondsOfMinute(), lastReply);
|
||||
}
|
||||
*/
|
||||
/* printf("Transact: %s got %s\n", st->command, lastReply); */
|
||||
if (lastReply == NULL) {
|
||||
if (lastReply == NULL) {
|
||||
lastReply = "";
|
||||
}
|
||||
if(st->controller != NULL){
|
||||
@@ -1487,12 +1479,6 @@ static int SctTransactCmd(pSICSOBJ ccmd, SConnection * con,
|
||||
TransactionHandler, SctTransactMatch, NULL, NULL);
|
||||
while (st->sent != 2) {
|
||||
TaskYield(pServ->pTasker);
|
||||
/* not yet tested:
|
||||
if (SCGetInterrupt(con) != eContinue) {
|
||||
DevUnschedule(c->devser, st, TransactionHandler, SctTransactMatch);
|
||||
break;
|
||||
}
|
||||
*/
|
||||
}
|
||||
if (st->reply != NULL) {
|
||||
SCWrite(con,st->reply,eValue);
|
||||
@@ -1722,7 +1708,7 @@ static void SctKillController(void *c)
|
||||
}
|
||||
|
||||
if (pServ->pTasker) {
|
||||
TaskRegister(pServ->pTasker, SctDeferredTask, NULL, SctDeferredFree,
|
||||
TaskRegisterN(pServ->pTasker,"killsct", SctDeferredTask, NULL, SctDeferredFree,
|
||||
controller, 0);
|
||||
} else {
|
||||
free(controller);
|
||||
@@ -1899,6 +1885,7 @@ void SctInit(void)
|
||||
sct->desc = CreateDescriptor("ScriptContext");
|
||||
AddCommand(pServ->pSics, "sct", SctCommand, SctKill, sct);
|
||||
AddCmd("makesctcontroller", SctMakeController);
|
||||
AddCmd("makesctcomtask", SctMakeComTask);
|
||||
}
|
||||
|
||||
int SctVerbose(SctController * c)
|
||||
@@ -1906,3 +1893,15 @@ int SctVerbose(SctController * c)
|
||||
return c->verbose;
|
||||
}
|
||||
|
||||
DevSer *SctGetDevser(void *data)
|
||||
{
|
||||
SctController *c;
|
||||
|
||||
pSICSOBJ ccmd = (pSICSOBJ)data;
|
||||
assert(ccmd);
|
||||
assert(strcmp(ccmd->pDes->name,"SctController") == 0);
|
||||
|
||||
|
||||
c = (SctController *) ccmd->pPrivate;
|
||||
return c->devser;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user