Qmix SDK  20200506
The software libraries for integration of all CETONI devices.
Time-triggered dosage

Overview

Functions to configure and control time-triggered dosage.

Time trigger dosage is a feature that enables time-triggered start of dosage processes. Each pump contains batch list. This list stores single batch entries. A batch entry contains the complete configuration for one single time-triggered dosage task. A batch entry contains

+ Collaboration diagram for Time-triggered dosage:

Functions

LCP_Func long LCP_CALL LCP_AddBatchEntry (dev_hdl hPump, double Volume, double Flow, unsigned long Time, unsigned long Cycles, unsigned long PeriodSecs)
 Adds a single entry to list of batch entries. More...
 
LCP_Func long LCP_CALL LCP_ClearBatchList (dev_hdl hPump)
 Deletes all entries from a pumps batch list. More...
 
LCP_Func long LCP_CALL LCP_GetBatchEntry (dev_hdl hPump, unsigned long Time, dev_hdl *pBatchEntryHdl)
 This function returns a handle to a certain batch entry. More...
 
LCP_Func long LCP_CALL LCP_GetBatchEntryAtIndex (dev_hdl hPump, unsigned long Index, dev_hdl *pBatchEntryHdl)
 This function returns a handle to a certain batch entry. More...
 
LCP_Func long LCP_CALL LCP_GetBatchEntryParam (dev_hdl BatchEntryHdl, double *pVolume, double *pFlow, unsigned long *pTime, unsigned long *pCycles, unsigned long *pPeriodSecs)
 This function returns the configuration of a certain batch entry. More...
 
LCP_Func long LCP_CALL LCP_GetBatchListSize (dev_hdl hPump)
 Query current number of entries in a pumps batch list. More...
 
LCP_Func long LCP_CALL LCP_GetNextDosageTime (dev_hdl hPump)
 Returns time of next dosage event. More...
 
LCP_Func long LCP_CALL LCP_IsBatchRunning (dev_hdl hPump)
 Check if batch processing is active. More...
 
LCP_Func long LCP_CALL LCP_RemoveBatchEntry (dev_hdl hPump, unsigned long Time)
 Remove batch entry from list of batch entries. More...
 
LCP_Func long LCP_CALL LCP_StartBatchProcessing (dev_hdl hPump)
 Start processing of batch list. More...
 
LCP_Func long LCP_CALL LCP_StopBatchProcessing (dev_hdl hPump)
 Stop processing of batch list. More...
 

Function Documentation

◆ LCP_AddBatchEntry()

LCP_Func long LCP_CALL LCP_AddBatchEntry ( dev_hdl  hPump,
double  Volume,
double  Flow,
unsigned long  Time,
unsigned long  Cycles,
unsigned long  PeriodSecs 
)

Adds a single entry to list of batch entries.

Parameters
[in]hPumpValid pump handle
[in]TimeThe time that triggers first start of this dosage
[in]VolumeThe volume to dose
[in]FlowThe flow rate to use for dosage
[in]CyclesThe number of cycles to repeat this dosage. A value of 0 indicates an infinite repetition
[in]PeriodSecsThe time in seconds between two consecutive execution of this dosage batch entry
Returns
Error code - ERR_NOERR indicates success

◆ LCP_ClearBatchList()

LCP_Func long LCP_CALL LCP_ClearBatchList ( dev_hdl  hPump)

Deletes all entries from a pumps batch list.

Parameters
[in]hPumpValid pump handle
Returns
Error code - ERR_NOERR indicates success

◆ LCP_GetBatchEntry()

LCP_Func long LCP_CALL LCP_GetBatchEntry ( dev_hdl  hPump,
unsigned long  Time,
dev_hdl pBatchEntryHdl 
)

This function returns a handle to a certain batch entry.

The functions searches for an entry with a certain starting time. The time value identifies the initial starting time.

Parameters
[in]hPumpValid pump handle
[in]TimeTime value (
See also
LCP_MakeTime())
Parameters
[out]pBatchEntryHdlHandle to the batch entry identified by Time param
Returns
Error code - ERR_NOERR indicates success

◆ LCP_GetBatchEntryAtIndex()

LCP_Func long LCP_CALL LCP_GetBatchEntryAtIndex ( dev_hdl  hPump,
unsigned long  Index,
dev_hdl pBatchEntryHdl 
)

This function returns a handle to a certain batch entry.

To access the parameters of a batch entry, a valid batch entry handle is required. This handle can be obtained by this function

Parameters
[in]hPumpValid pump handle
[in]IndexIndex into internal array of batch entries
[out]pBatchEntryHdlHandle to the batch entry indexed by Index param
Returns
Error code - ERR_NOERR indicates success
Return values
-ERR_PARAM_RANGE- Index parameter is out of range (>= size of batch list)
Note
An index does not always identify the same batch entry. The batch entries a stored in a certain order and this order may change during execution or after insertion/deletion of entries

◆ LCP_GetBatchEntryParam()

LCP_Func long LCP_CALL LCP_GetBatchEntryParam ( dev_hdl  BatchEntryHdl,
double *  pVolume,
double *  pFlow,
unsigned long *  pTime,
unsigned long *  pCycles,
unsigned long *  pPeriodSecs 
)

This function returns the configuration of a certain batch entry.

Parameters
[in]BatchEntryHdlValid batch entry handle
[out]pVolumeReturns the volume value
[out]pFlowReturns the flow value
[out]pTimeReturns the first start time of this batch entry
[out]pCyclesReturns the number of cycles this batch entry should be executed
[out]pPeriodSecsReturns the period in seconds
Returns
Error code - ERR_NOERR indicates success

◆ LCP_GetBatchListSize()

LCP_Func long LCP_CALL LCP_GetBatchListSize ( dev_hdl  hPump)

Query current number of entries in a pumps batch list.

Parameters
[in]hPumpValid pump handle
Return values
>=0 Number of entries in batch list
<0Error code

◆ LCP_GetNextDosageTime()

LCP_Func long LCP_CALL LCP_GetNextDosageTime ( dev_hdl  hPump)

Returns time of next dosage event.

Note
The function only returns a valid value if the batch is running (
See also
LCP_IsBatchRunning()). If the batch is not running, then the time value returned is undefined.
Parameters
[in]hPumpValid pump handle of pump to check
Return values
>=0Time value of next dosage event
<0Error code

◆ LCP_IsBatchRunning()

LCP_Func long LCP_CALL LCP_IsBatchRunning ( dev_hdl  hPump)

Check if batch processing is active.

Parameters
[in]hPumpValid pump handle of pump to check
Return values
0Batch processing is inactive
>0Batch processing is active
<0Error code - ERR_NOERR indicates success

◆ LCP_RemoveBatchEntry()

LCP_Func long LCP_CALL LCP_RemoveBatchEntry ( dev_hdl  hPump,
unsigned long  Time 
)

Remove batch entry from list of batch entries.

Parameters
[in]hPumpValid pump handle
[in]TimeIndicates the starting time of the batch entry to be removed
Returns
Error code - ERR_NOERR indicates success

◆ LCP_StartBatchProcessing()

LCP_Func long LCP_CALL LCP_StartBatchProcessing ( dev_hdl  hPump)

Start processing of batch list.

Parameters
[in]hPumpValid pump handle of pump to start
Returns
Error code - ERR_NOERR indicates success

◆ LCP_StopBatchProcessing()

LCP_Func long LCP_CALL LCP_StopBatchProcessing ( dev_hdl  hPump)

Stop processing of batch list.

Parameters
[in]hPumpValid pump handle of pump to stop
Returns
Error code - ERR_NOERR indicates success