Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_flood_detector

Driver flood detector. More...

Typedefs

typedef struct bc_flood_detector_t bc_flood_detector_t
 Instance.
 

Enumerations

enum  bc_flood_detector_type_t {
  BC_FLOOD_DETECTOR_TYPE_LD_81_SENSOR_MODULE_CHANNEL_A,
  BC_FLOOD_DETECTOR_TYPE_LD_81_SENSOR_MODULE_CHANNEL_B
}
 Type sensor.
 
enum  bc_flood_detector_event_t {
  BC_FLOOD_DETECTOR_EVENT_ERROR,
  BC_FLOOD_DETECTOR_EVENT_UPDATE
}
 Callback events.
 

Functions

void bc_flood_detector_init (bc_flood_detector_t *self, bc_flood_detector_type_t type)
 Initialize flood detector. More...
 
void bc_flood_detector_set_event_handler (bc_flood_detector_t *self, void(*event_handler)(bc_flood_detector_t *, bc_flood_detector_event_t, void *), void *event_param)
 Set callback function. More...
 
void bc_flood_detector_set_update_interval (bc_flood_detector_t *self, bc_tick_t interval)
 Set measurement interval. More...
 
bool bc_flood_detector_measure (bc_flood_detector_t *self)
 Start measurement manually. More...
 
bool bc_flood_detector_is_alarm (bc_flood_detector_t *self)
 Is alarm. More...
 

Detailed Description

Driver flood detector.

Function Documentation

void bc_flood_detector_init ( bc_flood_detector_t self,
bc_flood_detector_type_t  type 
)

Initialize flood detector.

Parameters
[in]selfInstance
[in]typesenzor

Definition at line 9 of file bc_flood_detector.c.

Here is the call graph for this function:

bool bc_flood_detector_is_alarm ( bc_flood_detector_t self)

Is alarm.

Parameters
[in]selfInstance
Returns
true
false

Definition at line 51 of file bc_flood_detector.c.

bool bc_flood_detector_measure ( bc_flood_detector_t self)

Start measurement manually.

Parameters
[in]selfInstance
Returns
true On success
false When other measurement is in progress

Definition at line 37 of file bc_flood_detector.c.

Here is the call graph for this function:

void bc_flood_detector_set_event_handler ( bc_flood_detector_t self,
void(*)(bc_flood_detector_t *, bc_flood_detector_event_t, void *)  event_handler,
void *  event_param 
)

Set callback function.

Parameters
[in]selfInstance
[in]event_handlerFunction address
[in]event_paramOptional event parameter (can be NULL)

Definition at line 17 of file bc_flood_detector.c.

void bc_flood_detector_set_update_interval ( bc_flood_detector_t self,
bc_tick_t  interval 
)

Set measurement interval.

Parameters
[in]selfInstance
[in]intervalMeasurement interval

Definition at line 23 of file bc_flood_detector.c.

Here is the call graph for this function: