Files
sics/genericcontroller.h
koennecke 91d4af0541 - Adapted indenation to new agreed upon system
- Added support for second generation scriptcontext based counter
2009-02-13 09:00:03 +00:00

38 lines
1.4 KiB
C

/**
* This is a generic controller for devices in SICS. In its default configuration it
* will be configurable via Tcl scripts and used AsynqQueue for communication. But
* it is suitably generic to support other mechanisms as well.
*
* copyright: see file COPYRIGHT
*
* Mark Koennecke, November 2007
*/
#ifndef GENERICCONTROLLER_H_
#define GENERICCONTROLLER_H_
#include <asyncqueue.h>
#include <sicshipadaba.h>
#define GCTIMEOUT 5001
#define GCDISCONNECT 5002
#define GCOK 5000
#define GCRECONNECT 5003
#define GCRETRY 5004
typedef struct {
int (*enqueueNode) (pSICSOBJ self, SConnection * pCon, pHdb node);
int (*enqueueNodeHead) (pSICSOBJ self, SConnection * pCon, pHdb node);
int (*replyCallback) (pSICSOBJ self, SConnection * pCon, pHdb node,
char *replyCommand, char *reply, int replylen);
void *comContext;
void (*killComContext) (void *data);
int comError;
} GenController, *pGenController;
/*---------------------------------------------------------------------------*/
int GenControllerFactory(SConnection * pCon, SicsInterp * pSics,
void *pData, int argc, char *argv[]);
/*---------------------------------------------------------------------------*/
int GenControllerConfigure(SConnection * pCon, SicsInterp * pSics,
void *pData, int argc, char *argv[]);
#endif /*GENERICCONTROLLER_H_ */