- added scriptcontext.h

- killing a node using sct should now be safe
- sctdrive adapter object might be dynamic
- default for the checkstatus script: returning the status property
- introduced <sctcon> unpoll
- changed <sctcon> queuecon to <sctcon> send
- some more improvements in sct
This commit is contained in:
zolliker
2008-06-13 11:22:13 +00:00
parent d75eee789b
commit 9e7a6cfd74
7 changed files with 366 additions and 150 deletions

33
scriptcontext.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef SCRIPTCONTEXT_H
#define SCRIPTCONTEXT_H
#include "sics.h"
#include "devser.h"
/* \brief an sct controller
*/
typedef struct SctController SctController;
/** \brief queue node action to a controller
*
* \param controller the controller
* \param node the node
* \param prio the priority
* \param action the initial state
* \param con an optional connection to be used by the action scripts
*/
void SctQueueNode(SctController *controller, Hdb *node,
DevPrio prio, char *action, SConnection *con);
/** \brief call a script and configure the sct command to be used
* in connection with the given node and controller
*
* \param con the connection
* \param script a tcl script
* \param the node to which the sct command
* \return 0 when this was a new action, > 0 when an action was overwritten
*/
int SctCallInContext(SConnection *con, char *script, Hdb *node,
SctController *controller, char **resPtr);
#endif