- Added a SICS to Hipadaba adapter

- Added a separate polling module to SICS
This commit is contained in:
koennecke
2006-12-07 14:04:17 +00:00
parent 5b727dc784
commit 78fce0127d
32 changed files with 1899 additions and 183 deletions

View File

@ -20,6 +20,8 @@
* copyright: GPL
*
* Mark Koennecke, June 2006
*
* Added treeChange callback, Mark Koennecke, November 2006
*/
#ifndef HIPADABA
#define HIPADABA
@ -38,6 +40,7 @@
#define HCBSET 0
#define HCBUPDATE 1
#define HCBREAD 2
#define HCBTREE 3
/*--------- error codes */
#define HDBTYPEMISMATCH -7701
#define HDBLENGTHMISMATCH -7702
@ -63,12 +66,14 @@ typedef struct __hipadaba {
struct __hdbcallback *writeCallbacks;
struct __hdbcallback *updateCallbacks;
struct __hdbcallback *readCallbacks;
struct __hdbcallback *treeChangeCallbacks;
char *name;
hdbValue value;
int protected;
}Hdb, *pHdb;
/*-------------------------------------------------------------------------------*/
typedef int (*hdbCallbackFunction)(void *userData, void *callData,
pHdb currentNode, hdbValue v );
pHdb currentNode, hdbValue v);
typedef void (*killUserData)(void *data);
/*-------------------------------------------------------------------------------*/
typedef struct __hdbcallback {
@ -179,13 +184,15 @@ pHdb MakeHipadabaNode(char *name, int datatype, int length);
* add a child to a node at the end of the child list.
* @param parent The node to which to add the child
* @param child The node to add
* @param callData User data for the tree chnage callback. Can be NULL.
*/
void AddHipadabaChild(pHdb parent, pHdb child);
void AddHipadabaChild(pHdb parent, pHdb child, void *callData);
/**
* delete a hipadaba node and all its children
* @parma node The node to delete
* @param callData User data for the tree change callback
*/
void DeleteHipadabaNode(pHdb node);
void DeleteHipadabaNode(pHdb node, void *callData);
/*
* checks if a Hdb node is valid
* @param node The node to check
@ -209,8 +216,9 @@ char *GetHipadabaPath(pHdb node);
/**
* removes a node from the parents child list.
* @node the node to remove
* @param callData User data for the tree change callback
*/
void RemoveHdbNodeFromParent(pHdb node);
void RemoveHdbNodeFromParent(pHdb node, void *callData);
/**
* delete a callback chain
* @param root The callback chain to delete
@ -300,7 +308,7 @@ int SetHdbPar(pHdb node, int dataType, void *data, int length,
void *callData);
/**
* Updates a hipadaba parameter. This does not cause an active parameter to
* start driving but invokes all nitifications which may be regsitered on
* start driving but invokes all notifications which may be registered on
* this parameter.
* @param node The node for which to set the parameter
* param dataType The datatype the value ought to have