- Adapted indenation to new agreed upon system
- Added support for second generation scriptcontext based counter
This commit is contained in:
31
devser.h
31
devser.h
@ -31,7 +31,8 @@ typedef void DevKillActionData(void *actionData);
|
||||
* NullPRIO and NumberOfPRIO must not be used as priority
|
||||
*/
|
||||
typedef enum {
|
||||
NullPRIO, SlowPRIO, ReadPRIO, ProgressPRIO, WritePRIO, HaltPRIO, NumberOfPRIO
|
||||
NullPRIO, SlowPRIO, ReadPRIO, ProgressPRIO, WritePRIO, HaltPRIO,
|
||||
NumberOfPRIO
|
||||
} DevPrio;
|
||||
|
||||
/** \brief Make a new device serializer and async connection.
|
||||
@ -40,24 +41,24 @@ typedef enum {
|
||||
* \param argv the args
|
||||
* \return the created device serializer or NULL on failure
|
||||
*/
|
||||
DevSer *DevMake(SConnection *con, int argc, char *argv[]);
|
||||
DevSer *DevMake(SConnection * con, int argc, char *argv[]);
|
||||
|
||||
/** \brief put the device serializer into debug mode
|
||||
* \param devser the device serializer
|
||||
* \param steps the number of steps to be executed or -1 for disable debugging mode
|
||||
*/
|
||||
void DevDebugMode(DevSer *devser, int steps);
|
||||
void DevDebugMode(DevSer * devser, int steps);
|
||||
|
||||
/** \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);
|
||||
void DevKill(DevSer * devser);
|
||||
/** \brief Disconnect
|
||||
* \param devser The device serializer to disconnect
|
||||
*/
|
||||
void DevDisconnect(DevSer *devser);
|
||||
void DevDisconnect(DevSer * devser);
|
||||
|
||||
/** \brief Queue an action
|
||||
*
|
||||
@ -74,9 +75,9 @@ void DevDisconnect(DevSer *devser);
|
||||
* \return 0 when not queued because a similar action is already on the queue,
|
||||
* 1 on success.
|
||||
*/
|
||||
int DevQueue(DevSer *devser, void *actionData, DevPrio prio,
|
||||
DevActionHandler hdl, DevActionMatch *matchFunc,
|
||||
DevKillActionData *killFunc) ;
|
||||
int DevQueue(DevSer * devser, void *actionData, DevPrio prio,
|
||||
DevActionHandler hdl, DevActionMatch * matchFunc,
|
||||
DevKillActionData * killFunc);
|
||||
|
||||
/** \brief Schedule a periodic action
|
||||
*
|
||||
@ -92,10 +93,10 @@ int DevQueue(DevSer *devser, void *actionData, DevPrio prio,
|
||||
* from DevUnschedule) or NULL if no kill function is needed.
|
||||
* \return 0 when this was a new action, > 0 when an action was overwritten
|
||||
*/
|
||||
int DevSchedule(DevSer *devser, void *actionData,
|
||||
DevPrio prio, double interval,
|
||||
DevActionHandler hdl, DevActionMatch *matchFunc,
|
||||
DevKillActionData *killFunc);
|
||||
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
|
||||
@ -104,14 +105,14 @@ int DevSchedule(DevSer *devser, void *actionData,
|
||||
* \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);
|
||||
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);
|
||||
int DevRemoveAction(DevSer * devser, void *actionData);
|
||||
|
||||
/** \brief Convert integer priority to text
|
||||
* \param prio
|
||||
|
Reference in New Issue
Block a user