alarm.h 751 B

1234567891011121314151617181920212223242526272829303132
  1. /* Alarm get/set status values */
  2. #define ALARM_1 5
  3. #define ALARM_2 6
  4. #define AFLGS 0b11111111
  5. #ifndef _ALARM_DEFINED
  6. struct _alarm
  7. {
  8. struct _tm time;
  9. char ip[24];
  10. u_short port;
  11. char url[24];
  12. char name[16];
  13. int snooze;
  14. int id;
  15. int state;
  16. };
  17. #define _ALARM_DEFINED
  18. #endif
  19. void handleAlarm(int idx);
  20. int checkAlarms(void);
  21. void setAlarm(struct _tm time, char* name, char* ip, u_short port, char* url, int snooze, int id, int idx);
  22. int alarmExist(int id);
  23. void deleteAlarm(int idx);
  24. void eenmaligAlarmCheck(int idx);
  25. void eenmaligAlarm(struct _tm time, char* name, char* ip, u_short port, char* url, int snooze, int id, int idx);
  26. int compareTime(tm t1, tm t2);
  27. void setState(int idx);
  28. int getState(int idx);
  29. struct _alarm getAlarm(int idx);