alarm.h 650 B

12345678910111213141516171819
  1. #ifndef ALARM_H
  2. #define ALARM_H
  3. #include "common.h"
  4. #include "isup_sdk.h"
  5. typedef enum { ALARM_MOVE=1, ALARM_BLOCK, ALARM_FACE, ALARM_FIRE, ALARM_SMOKE,
  6. ALARM_INLINE, ALARM_REGION, ALARM_AUDIO, ALARM_OTHER } AlarmType;
  7. typedef struct {
  8. int used; int id; int channel; AlarmType type; int64_t ts_ms; int acked;
  9. char desc[128];
  10. } AlarmEvent;
  11. int alarm_init(void);
  12. int alarm_start_listen(void);
  13. int alarm_stop_listen(void);
  14. int alarm_ingest(int channel, AlarmType t, const char*desc, int*out_id);
  15. int alarm_ack(int id);
  16. int alarm_pending_count(void);
  17. void alarm_stats(int*total,int*pending);
  18. void alarm_cleanup(void);
  19. #endif