Files
sics/obdes.h
Ferdi Franceschini 10d29d597c Cleaned up ANSTO code to merge with sinqdev.sics
This is our new RELEASE-4_0 branch which was taken from ansto/93d9a7c
Conflicts:
	.gitignore
	SICSmain.c
	asynnet.c
	confvirtualmot.c
	counter.c
	devexec.c
	drive.c
	event.h
	exebuf.c
	exeman.c
	histmem.c
	interface.h
	motor.c
	motorlist.c
	motorsec.c
	multicounter.c
	napi.c
	napi.h
	napi4.c
	network.c
	nwatch.c
	nxscript.c
	nxxml.c
	nxxml.h
	ofac.c
	reflist.c
	scan.c
	sicshipadaba.c
	sicsobj.c
	site_ansto/docs/Copyright.txt
	site_ansto/instrument/lyrebird/config/tasmad/sicscommon/nxsupport.tcl
	site_ansto/instrument/lyrebird/config/tasmad/taspub_sics/tasscript.tcl
	statusfile.c
	tasdrive.c
	tasub.c
	tasub.h
	tasublib.c
	tasublib.h
2015-04-23 20:49:26 +10:00

71 lines
2.6 KiB
C

#line 398 "interface.w"
#line 29 "interface.w"
/*--------------------------------------------------------------------------
In SICS there is the to find out what an
object is capable of at runtime. If this has been done a general
way to access those capabilities is needed. In order to do all
this each SICS-object is required to carry an object descriptor
struct as first parameter in its class/object struct. Additionslly
it is required to initialize this struct to something sensible.
This file defines this struct. Additionally a few functions of
general use are prototyped.
Mark Koennecke, June, 1997
copyrigth: see implementation file
----------------------------------------------------------------------------*/
#ifndef SICSDESCRIPTOR
#define SICSDESCRIPTOR
#include <stdio.h>
#include <ifile.h>
#include <hipadaba.h>
typedef struct {
char *name;
int (*SaveStatus)(void *self, char *name,FILE *fd);
void *(*GetInterface)(void *self, int iInterfaceID);
IPair *pKeys;
pHdb parNode;
} ObjectDescriptor, *pObjectDescriptor;
/*---------------------------------------------------------------------------*/
pObjectDescriptor CreateDescriptor(char *name);
void DeleteDescriptor(pObjectDescriptor self);
pObjectDescriptor FindDescriptor(void *pData);
/*============================================================================
Objects which do not carry data need a dummy descriptor. Otherwise
drive or scan will protection fault when trying to drive something
which should not be driven. This is defined below.
*/
typedef struct {
pObjectDescriptor pDescriptor;
}Dummy, *pDummy;
pDummy CreateDummy(char *name);
void KillDummy(void *pData);
int iHasType(void *pData, char *Type);
#endif
#line 399 "interface.w"
/*--------------------------------------------------------------------------*/
/* Additional properties used by the ANSTO site to provide more information
* about each object instance, especially devices.
*/
void SetDescriptorKey(pObjectDescriptor self, char *keyName, char *value);
void SetDescriptorGroup(pObjectDescriptor self, char *group);
void SetDescriptorDescription(pObjectDescriptor self, char *description);
char * GetDescriptorKey(pObjectDescriptor self, char *keyName);
char * GetDescriptorGroup(pObjectDescriptor self);
char * GetDescriptorDescription(pObjectDescriptor self);