Video Core Feature Interface Reference Manual  jpl-r3.13.16
vftr_pfm.h File Reference

Core feature-lib for pet feeding monitor. More...

#include "mpi_base_types.h"
#include "mpi_dev.h"
#include "mpi_iva.h"
#include "mpi_dip_alg.h"

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...
 

Detailed Description

Core feature-lib for pet feeding monitor.

Note
Because the PFM feature is still evolving, this interface is experimental.

Macro Definition Documentation

#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.

Function Documentation

int VFTR_PFM_checkParam ( const VFTR_PFM_PARAM_S param)

Check whether the parameter is valid.

Parameters
[in]parampointer to parameter
Returns
Whether the parameter is valid.
Return values
0Valid input.
-EINVALInvalid input.
See also
VFTR_PFM_setParam()
int VFTR_PFM_deleteInstance ( VFTR_PFM_INSTANCE_S **  instance)

Destruct target pet feeding monitor instance.

Parameters
[in]instanceAddress of pointer to instance
Returns
The execution result.
Return values
0Success.
-EFAULTInput pointer is NULL.
See also
VFTR_PFM_newInstance()
int VFTR_PFM_detect ( VFTR_PFM_INSTANCE_S *  instance,
const VFTR_PFM_INPUT_S input,
VFTR_PFM_STATUS_S status 
)

Update status.

Parameters
[in]instancePointer to instance.
[in]inputVideo feature queried for PFM.
[out]statusPointer to status. Skipped writing status if the pointer is NULL. User can query the status again via VFTR_PFM_getStat().
Returns
The execution result.
Return values
0success.
-EFAULTReceived NULL pointer as input.
-EINVALInvalid PFM parameters. User should configure parameter before running detection.
See also
VFTR_PFM_getStat()
int VFTR_PFM_getParam ( const VFTR_PFM_INSTANCE_S *  instance,
VFTR_PFM_PARAM_S param 
)

Get parameters.

Parameters
[in]instancePointer to instance.
[out]paramPointer to parameters.
Returns
The execution result.
Return values
0success.
-EFAULTinput pointer is NULL.
See also
VFTR_PFM_setParam()
int VFTR_PFM_getStat ( const VFTR_PFM_INSTANCE_S *  instance,
VFTR_PFM_STATUS_S status 
)

Get status.

Parameters
[in]instancePointer to instance.
[out]statusPointer to status.
Returns
The execution result.
Return values
0success.
-EFAULTinput pointer is NULL.
VFTR_PFM_INSTANCE_S* VFTR_PFM_newInstance ( void  )

Construct new pet feeding monitor instance.

Returns
Pointer to instance
Return values
NotNULL Pointer to instance.
NULLNot enough memory to create new instance.
Note
  • User must set parameter after new instance are created. Otherwise unexpected error should be occurred.
See also
VFTR_PFM_deleteInstance()
int VFTR_PFM_setParam ( VFTR_PFM_INSTANCE_S *  instance,
const VFTR_PFM_PARAM_S param 
)

Set parameters.

Parameters
[in]instancePointer to instance.
[out]paramPointer to parameters.
Returns
The execution result.
Return values
0success.
-EFAULTinput pointer is NULL.
-EINVALinvalid parameters.
Note
  • Instance resets to initial state after PFM parameters are set.
See also
VFTR_PFM_checkParam()
VFTR_PFM_getParam()