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
This commit is contained in:
23
hipadaba.h
23
hipadaba.h
@ -1,4 +1,4 @@
|
||||
/** @file
|
||||
/** @file
|
||||
* Hipadaba is a hierarchical database of parameters. Parameters can be of
|
||||
* various types. What happens when a parameter is being set, updated or read
|
||||
* is largely determined through callbacks which can be registered on
|
||||
@ -26,6 +26,8 @@
|
||||
* Added support for properties, Mark Koennecke, January 2007
|
||||
*
|
||||
* Refactored callback handling, Markus Zolliker, Mark Koennecke, March 2008
|
||||
*
|
||||
* Added property chnage events. Mark Koennecke, February 2015
|
||||
*/
|
||||
#ifndef HIPADABA
|
||||
#define HIPADABA
|
||||
@ -72,11 +74,12 @@ typedef struct __hipadaba {
|
||||
char *name;
|
||||
char *path;
|
||||
hdbValue value;
|
||||
int protected;
|
||||
int iprotected;
|
||||
pStringDict properties;
|
||||
} Hdb, *pHdb;
|
||||
/*-------------- return values for callback functions -------------------------*/
|
||||
typedef enum { hdbContinue,
|
||||
typedef enum {
|
||||
hdbContinue,
|
||||
hdbAbort,
|
||||
hdbKill
|
||||
} hdbCallbackReturn;
|
||||
@ -102,6 +105,12 @@ typedef struct {
|
||||
void *result;
|
||||
} hdbDataSearch, *pHdbDataSearch;
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
typedef struct {
|
||||
char *type;
|
||||
char *key;
|
||||
char *value;
|
||||
} hdbPropertyChange, *pHdbPropertyChange;
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
typedef hdbCallbackReturn(*hdbCallbackFunction) (pHdb currentNode,
|
||||
void *userData,
|
||||
pHdbMessage message);
|
||||
@ -157,6 +166,14 @@ pHdbDataSearch GetHdbDataSearchMessage(pHdbMessage toTest);
|
||||
* pointer if it is.
|
||||
*/
|
||||
pHdbMessage GetHdbKillNodeMessage(pHdbMessage toTest);
|
||||
/**
|
||||
* Test a message if it is a property change message
|
||||
* @param toTest The message to test.
|
||||
* @return NULL if the message is no property chnage message or a message
|
||||
* pointer if it is.
|
||||
*/
|
||||
pHdbPropertyChange GetPropertyChangeMessage(pHdbMessage toTest);
|
||||
|
||||
/*======================== Function protoypes: hdbData ========================*/
|
||||
/**
|
||||
* make a hdbValue with the given datatype and length
|
||||
|
Reference in New Issue
Block a user