Core feature-lib for pet feeding monitor. More...
Data Structures | |
struct | VFTR_PFM_PARAM_S |
Structure for the parameters of pet feeding monitor. More... | |
struct | VFTR_PFM_INPUT_S |
Structure for the pet feeding monitor video features. More... | |
struct | VFTR_PFM_STATUS_S |
Structure for the result of pet feeding monitor. More... | |
Macros | |
#define | VFTR_PFM_SENSITIVITY_MIN 0 |
#define | VFTR_PFM_SENSITIVITY_MAX 255 |
#define | VFTR_PFM_ENDURANCE_MIN 0 |
#define | VFTR_PFM_REMAINDER_MAX 100 |
#define | VFTR_PFM_REMAINDER_MIN 0 |
Typedefs | |
typedef struct vftr_pfm_instance | VFTR_PFM_INSTANCE_S |
Enumerations | |
enum | VFTR_PFM_EVENT_E { VFTR_PFM_EVENT_IDLE = 0, VFTR_PFM_EVENT_FILLED, VFTR_PFM_EVENT_EATING, VFTR_PFM_EVENT_FINISH } |
Enumeration of pet feeding monitor event. | |
Functions | |
VFTR_PFM_INSTANCE_S * | VFTR_PFM_newInstance (void) |
Construct new pet feeding monitor instance. More... | |
int | VFTR_PFM_deleteInstance (VFTR_PFM_INSTANCE_S **instance) |
Destruct target pet feeding monitor instance. More... | |
int | VFTR_PFM_checkParam (const VFTR_PFM_PARAM_S *param) |
Check whether the parameter is valid. More... | |
int | VFTR_PFM_setParam (VFTR_PFM_INSTANCE_S *instance, const VFTR_PFM_PARAM_S *param) |
Set parameters. More... | |
int | VFTR_PFM_getParam (const VFTR_PFM_INSTANCE_S *instance, VFTR_PFM_PARAM_S *param) |
Get parameters. More... | |
int | VFTR_PFM_getStat (const VFTR_PFM_INSTANCE_S *instance, VFTR_PFM_STATUS_S *status) |
Get status. More... | |
int | VFTR_PFM_detect (VFTR_PFM_INSTANCE_S *instance, const VFTR_PFM_INPUT_S *input, VFTR_PFM_STATUS_S *status) |
Update status. More... | |
Core feature-lib for pet feeding monitor.
#define VFTR_PFM_ENDURANCE_MIN 0 |
Minimal endurance.
#define VFTR_PFM_REMAINDER_MAX 100 |
Maximal remainder.
#define VFTR_PFM_REMAINDER_MIN 0 |
Minimal remainder.
#define VFTR_PFM_SENSITIVITY_MAX 255 |
Maximal sensitivity.
#define VFTR_PFM_SENSITIVITY_MIN 0 |
Minimal sensitivity.
int VFTR_PFM_checkParam | ( | const VFTR_PFM_PARAM_S * | param | ) |
Check whether the parameter is valid.
[in] | param | pointer to parameter |
0 | Valid input. |
-EINVAL | Invalid input. |
int VFTR_PFM_deleteInstance | ( | VFTR_PFM_INSTANCE_S ** | instance | ) |
Destruct target pet feeding monitor instance.
[in] | instance | Address of pointer to instance |
0 | Success. |
-EFAULT | Input pointer is NULL. |
int VFTR_PFM_detect | ( | VFTR_PFM_INSTANCE_S * | instance, |
const VFTR_PFM_INPUT_S * | input, | ||
VFTR_PFM_STATUS_S * | status | ||
) |
Update status.
[in] | instance | Pointer to instance. |
[in] | input | Video feature queried for PFM. |
[out] | status | Pointer to status. Skipped writing status if the pointer is NULL. User can query the status again via VFTR_PFM_getStat(). |
0 | success. |
-EFAULT | Received NULL pointer as input. |
-EINVAL | Invalid PFM parameters. User should configure parameter before running detection. |
int VFTR_PFM_getParam | ( | const VFTR_PFM_INSTANCE_S * | instance, |
VFTR_PFM_PARAM_S * | param | ||
) |
Get parameters.
[in] | instance | Pointer to instance. |
[out] | param | Pointer to parameters. |
0 | success. |
-EFAULT | input pointer is NULL. |
int VFTR_PFM_getStat | ( | const VFTR_PFM_INSTANCE_S * | instance, |
VFTR_PFM_STATUS_S * | status | ||
) |
Get status.
[in] | instance | Pointer to instance. |
[out] | status | Pointer to status. |
0 | success. |
-EFAULT | input pointer is NULL. |
VFTR_PFM_INSTANCE_S* VFTR_PFM_newInstance | ( | void | ) |
Construct new pet feeding monitor instance.
Not | NULL Pointer to instance. |
NULL | Not enough memory to create new instance. |
int VFTR_PFM_setParam | ( | VFTR_PFM_INSTANCE_S * | instance, |
const VFTR_PFM_PARAM_S * | param | ||
) |
Set parameters.
[in] | instance | Pointer to instance. |
[out] | param | Pointer to parameters. |
0 | success. |
-EFAULT | input pointer is NULL. |
-EINVAL | invalid parameters. |