- Fixed conflicts in ascon.c
- Supressed superfluous message from fmess - Expanded multicounter to deal with threshold commands nicely - Fixed an an issue with an uninitialized dummy connection in nserver - Many changes to simidex to make it work in a more reliable way. - Added hdbfactory path alias targetpath - Extended frame to deal with sinqhttp HM
This commit is contained in:
@ -14,6 +14,10 @@
|
||||
* copyright: see file COPYRIGHT
|
||||
*
|
||||
* Mark Koennecke, September 2006
|
||||
*
|
||||
* extended to forward parameter setting requests to the single counter driver
|
||||
*
|
||||
* Mark Koennecke, February 2009
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@ -290,30 +294,68 @@ static void MMCCParameter(void *pData, float fPreset, CounterMode eMode)
|
||||
}
|
||||
|
||||
/*======================= Driver Interface ==============================*/
|
||||
static int MultiCounterSet(struct __COUNTER *self, char *name,
|
||||
static int MultiCounterSet(struct __COUNTER *pCount, char *name,
|
||||
int iCter, float fVal)
|
||||
{
|
||||
pDummy pDum;
|
||||
int i;
|
||||
pMultiCounter self = NULL;
|
||||
pCounter pCter;
|
||||
|
||||
self = (pMultiCounter) pCount->pData;
|
||||
assert(self);
|
||||
|
||||
return 0;
|
||||
for (i = 0; i < self->nSlaves; i++) {
|
||||
pDum = (pDummy)self->slaveData[i];
|
||||
if(strcmp(pDum->pDescriptor->name, "SingleCounter") == 0){
|
||||
pCter = (pCounter)self->slaveData[i];
|
||||
return pCter->pDriv->Set(pCter->pDriv, name, iCter, fVal);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
static int MultiCounterGet(struct __COUNTER *self, char *name,
|
||||
static int MultiCounterGet(struct __COUNTER *pCount, char *name,
|
||||
int iCter, float *fVal)
|
||||
{
|
||||
pDummy pDum;
|
||||
int i;
|
||||
pMultiCounter self = NULL;
|
||||
pCounter pCter;
|
||||
|
||||
self = (pMultiCounter) pCount->pData;
|
||||
assert(self);
|
||||
|
||||
return 0;
|
||||
for (i = 0; i < self->nSlaves; i++) {
|
||||
pDum = (pDummy)self->slaveData[i];
|
||||
if(strcmp(pDum->pDescriptor->name, "SingleCounter") == 0){
|
||||
pCter = (pCounter)self->slaveData[i];
|
||||
return pCter->pDriv->Get(pCter->pDriv, name, iCter, fVal);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
static int MultiCounterSend(struct __COUNTER *self, char *pText,
|
||||
static int MultiCounterSend(struct __COUNTER *pCount, char *pText,
|
||||
char *reply, int replylen)
|
||||
{
|
||||
pDummy pDum;
|
||||
int i;
|
||||
pMultiCounter self = NULL;
|
||||
pCounter pCter;
|
||||
|
||||
self = (pMultiCounter) pCount->pData;
|
||||
assert(self);
|
||||
|
||||
strncpy(reply, "NOT Implemented", replylen);
|
||||
return 0;
|
||||
for (i = 0; i < self->nSlaves; i++) {
|
||||
pDum = (pDummy)self->slaveData[i];
|
||||
if(strcmp(pDum->pDescriptor->name, "SingleCounter") == 0){
|
||||
pCter = (pCounter)self->slaveData[i];
|
||||
return pCter->pDriv->Send(pCter->pDriv,pText, reply, replylen);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
static int MultiCounterError(struct __COUNTER *pDriv, int *iCode,
|
||||
char *error, int errlen)
|
||||
|
Reference in New Issue
Block a user