- 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:
28
devser.h
28
devser.h
@ -15,12 +15,12 @@ typedef struct DevSer DevSer;
|
||||
*/
|
||||
typedef char *DevActionHandler(void *actionData, char *lastReply);
|
||||
|
||||
/** \brief Check if two actions match
|
||||
* \param actionData1 the first action data
|
||||
* \param actionData2 the second action data
|
||||
/** \brief Check if an action matches the call data
|
||||
* \param callData the callers data
|
||||
* \param actionData the action data
|
||||
* \return 1 on a match, 0 on no match
|
||||
*/
|
||||
typedef int DevActionMatch(void *actionData1, void *actionData2);
|
||||
typedef int DevActionMatch(void *callData, void *actionData);
|
||||
|
||||
/** \brief Kill ActionData
|
||||
* \param actionData action data
|
||||
@ -48,7 +48,9 @@ DevSer *DevMake(SConnection *con, int argc, char *argv[]);
|
||||
*/
|
||||
void DevDebugMode(DevSer *devser, int steps);
|
||||
|
||||
/** \brief Kill the device serializer and its async connection.
|
||||
/** \brief Kill the contents of the device serializer and its async connection.
|
||||
*
|
||||
* The data structure itself is killed at some time later
|
||||
* \param devser the device serializer
|
||||
*/
|
||||
void DevKill(DevSer *devser);
|
||||
@ -79,24 +81,32 @@ void DevQueue(DevSer *devser, void *actionData, DevPrio prio,
|
||||
* \param prio the priority
|
||||
* \param interval the interval in seconds (0 is allowed)
|
||||
* \param hdl the action handler
|
||||
* \param matchFunc the match function
|
||||
* \param matchFunc the match function (callData must be of the same type as actionData)
|
||||
* \param killFunc the action data kill function (called from DevKill and
|
||||
* from DevUnschedule) or NULL if no kill function is needed.
|
||||
* \return 0 when this was a new action, > 0 when an action was overwritten
|
||||
*/
|
||||
void DevSchedule(DevSer *devser, void *actionData,
|
||||
int DevSchedule(DevSer *devser, void *actionData,
|
||||
DevPrio prio, double interval,
|
||||
DevActionHandler hdl, DevActionMatch *matchFunc,
|
||||
DevKillActionData *killFunc);
|
||||
|
||||
/** \brief Unschedule matching actions
|
||||
* \param devser the device serializer
|
||||
* \param actionData the action data to be compared for a match
|
||||
* \param callData the callers data to be as first argument of the match function
|
||||
* \param hdl the action handler
|
||||
* \param matchFunc the match function
|
||||
* \param matchFunc the match function (callData does not need to have the same type as actionData)
|
||||
* \return the number of unscheduled actions
|
||||
*/
|
||||
int DevUnschedule(DevSer *devser, void *actionData,
|
||||
DevActionHandler hdl, DevActionMatch *matchFunc);
|
||||
|
||||
/** \brief remove action from the serializer
|
||||
* \param devser the device serializer
|
||||
* \param actionData the action data to be compared for a match
|
||||
*/
|
||||
int DevRemoveAction(DevSer *devser, void *actionData);
|
||||
|
||||
/** \brief Convert integer priority to text
|
||||
* \param prio
|
||||
* \return text
|
||||
|
Reference in New Issue
Block a user