- added makeauxub to tasub
- fixes for MARS - extended maximize to honour maxpts and the in360 flag - added regression histmem driver
This commit is contained in:
@ -26,6 +26,7 @@
|
||||
#include "splitter.h"
|
||||
|
||||
#define MAXSLAVE 16
|
||||
#define NOCOUNTERS -2727
|
||||
/*=============== code for the driver ======================================*/
|
||||
typedef struct {
|
||||
void *slaveData[MAXSLAVE];
|
||||
@ -103,6 +104,11 @@ static int MMCCStatus(void *pData, SConnection *pCon){
|
||||
}
|
||||
assert(self);
|
||||
|
||||
if(self->nSlaves == 0) {
|
||||
pCount->pDriv->iErrorCode = NOCOUNTERS;
|
||||
return HWFault;
|
||||
}
|
||||
|
||||
status = self->slaves[0]->CheckCountStatus(self->slaveData[0],pCon);
|
||||
if(status == HWIdle || status == HWFault){
|
||||
/*
|
||||
@ -256,6 +262,43 @@ static void MMCCParameter(void *pData, float fPreset, CounterMode eMode ){
|
||||
eMode);
|
||||
}
|
||||
}
|
||||
/*======================= Driver Interface ==============================*/
|
||||
static int MultiCounterSet(struct __COUNTER *self, char *name,
|
||||
int iCter, float fVal){
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------------------*/
|
||||
static int MultiCounterGet(struct __COUNTER *self, char *name,
|
||||
int iCter, float *fVal){
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------------------*/
|
||||
static int MultiCounterSend(struct __COUNTER *self, char *pText,
|
||||
char *reply, int replylen){
|
||||
|
||||
strncpy(reply,"NOT Implemented",replylen);
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
static int MultiCounterError(struct __COUNTER *pData, int *iCode,
|
||||
char *error, int errlen){
|
||||
pCounter pCount = NULL;
|
||||
|
||||
pCount = (pCounter)pData;
|
||||
|
||||
if(pCount->pDriv->iErrorCode == NOCOUNTERS){
|
||||
strncpy(error,"NO counters configured!",errlen);
|
||||
} else {
|
||||
strncpy(error,"Not Implemented", errlen);
|
||||
}
|
||||
return COTERM;
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
static int MultiCounterFix(struct __COUNTER *self, int iCode){
|
||||
return COTERM;
|
||||
}
|
||||
/*=============== Interpreter Interface ================================ */
|
||||
int MultiCounterAction(SConnection *pCon, SicsInterp *pSics,
|
||||
void *pData, int argc, char *argv[]){
|
||||
@ -327,6 +370,12 @@ int MakeMultiCounter(SConnection *pCon, SicsInterp *pSics,
|
||||
SCWrite(pCon,"ERROR: out of memory in MakeMultiCounter",eError);
|
||||
return 0;
|
||||
}
|
||||
pDriv->Get = MultiCounterGet;
|
||||
pDriv->GetError = MultiCounterError;
|
||||
pDriv->TryAndFixIt = MultiCounterFix;
|
||||
pDriv->Set = MultiCounterSet;
|
||||
pDriv->Send
|
||||
= MultiCounterSend;
|
||||
|
||||
/*
|
||||
assign interface functions
|
||||
|
Reference in New Issue
Block a user