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
- Flow
- Volume
- Date and Time
- Cycles
- Period The flow and volume values are the configuration for the dosage process that is triggered at a certain time. The date and time value configures The absolute date and time, when this dosage will be triggered the first time. The number of cycles configures how often this dosage should be repeated. A value of 0 indicates an infinite repetition. The period configures the time between two consecutive dosages.
|
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...
|
|
◆ 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] | hPump | Valid pump handle |
[in] | Time | The time that triggers first start of this dosage |
[in] | Volume | The volume to dose |
[in] | Flow | The flow rate to use for dosage |
[in] | Cycles | The number of cycles to repeat this dosage. A value of 0 indicates an infinite repetition |
[in] | PeriodSecs | The 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] | hPump | Valid 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] | hPump | Valid pump handle |
[in] | Time | Time value ( |
- See also
- LCP_MakeTime())
- Parameters
-
[out] | pBatchEntryHdl | Handle 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] | hPump | Valid pump handle |
[in] | Index | Index into internal array of batch entries |
[out] | pBatchEntryHdl | Handle 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] | BatchEntryHdl | Valid batch entry handle |
[out] | pVolume | Returns the volume value |
[out] | pFlow | Returns the flow value |
[out] | pTime | Returns the first start time of this batch entry |
[out] | pCycles | Returns the number of cycles this batch entry should be executed |
[out] | pPeriodSecs | Returns 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] | hPump | Valid pump handle |
- Return values
-
>= | 0 Number of entries in batch list |
<0 | Error 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] | hPump | Valid pump handle of pump to check |
- Return values
-
>=0 | Time value of next dosage event |
<0 | Error code |
◆ LCP_IsBatchRunning()
LCP_Func long LCP_CALL LCP_IsBatchRunning |
( |
dev_hdl |
hPump | ) |
|
Check if batch processing is active.
- Parameters
-
[in] | hPump | Valid pump handle of pump to check |
- Return values
-
0 | Batch processing is inactive |
>0 | Batch processing is active |
<0 | Error 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] | hPump | Valid pump handle |
[in] | Time | Indicates 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] | hPump | Valid 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] | hPump | Valid pump handle of pump to stop |
- Returns
- Error code - ERR_NOERR indicates success