- use dig for resolving host names - ascon.c: fix terminator parsing - property callback: change property before callback - logger.c:default for logger period must be the old value instead of 1 - add frappy type history writing - increase max. logreader line length - HIPNONE returns "null" with json protocol - encode strings properly in formatNameValue - fix memory leak in json2tcl - scriptcontext: do not show debug messages when script starts with underscore or when the "send" property is empty - scriptcontext: remove args for action timestamp - scriptcontext: "que" function will replace an already queued action, e.g. for 'halt - introduced updatestatus script
46 lines
1.4 KiB
C
46 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 replace 0 queue does not replace, 1: entries with the same node and action are replaced
|
|
* \param con an optional connection to be used by the action scripts
|
|
*/
|
|
void SctQueueNode(SctController * controller, Hdb * node,
|
|
DevPrio prio, char *action, int replace, 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);
|
|
/**
|
|
* get the controller debug connection (if any)
|
|
* \param c The SctController
|
|
* \return the connection for verbose, NULL for silent
|
|
*/
|
|
SConnection *SctDebugConn(SctController * c);
|
|
/**
|
|
* retrieve the device serializer
|
|
* \param data A pointer to a SICSObject representing a SctController
|
|
* \param A pointer the the device serializer
|
|
*/
|
|
DevSer *SctGetDevser(void *data);
|
|
#endif
|