Files
sics/scriptcontext.h
zolliker a56838b90d - simplified devser queue
- added inherited sct variables starting with @
- inserted SctIsPending / DevIsPending
- some general improvements in scriptcontext.c/sctdriveobj.c
2010-01-27 13:39:33 +00:00

50 lines
1.4 KiB
C

#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);
/**
* test the controller verbose flag
* \param c The SctController to test
* \return 1 for verbose, 0 for silent
*/
int SctVerbose(SctController * c);
/**
* check if the specified action is pending
* \param controller the SctController
* \param node the node
* \param name the action
* \param kind 0 for queued action, 1 for polled action
* \return 1 for pending, 0 for not pending
*/
int SctIsPending(SctController *controller, Hdb * node, char *name, int kind);
#endif