Merged in f5soh/librepilot/update_credits (pull request #529)
[librepilot.git] / flight / libraries / inc / alarms.h
blobafcbfac24d1b66e7cdf2dc5df451086ec10027fb
1 /**
2 ******************************************************************************
3 * @addtogroup OpenPilotSystem OpenPilot System
4 * @{
5 * @addtogroup OpenPilotLibraries OpenPilot System Libraries
6 * @{
7 * @file alarms.h
8 * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
9 * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
10 * @brief Include file of the alarm library
11 * @see The GNU Public License (GPL) Version 3
13 *****************************************************************************/
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 3 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful, but
21 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 * for more details.
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #ifndef ALARMS_H
30 #define ALARMS_H
32 #include <systemalarms.h>
33 #define SYSTEMALARMS_ALARM_DEFAULT SYSTEMALARMS_ALARM_UNINITIALISED
35 int32_t AlarmsInitialize(void);
36 int32_t AlarmsSet(SystemAlarmsAlarmElem alarm, SystemAlarmsAlarmOptions severity);
37 int32_t ExtendedAlarmsSet(SystemAlarmsAlarmElem alarm,
38 SystemAlarmsAlarmOptions severity,
39 SystemAlarmsExtendedAlarmStatusOptions status,
40 uint8_t subStatus);
41 SystemAlarmsAlarmOptions AlarmsGet(SystemAlarmsAlarmElem alarm);
42 int32_t AlarmsDefault(SystemAlarmsAlarmElem alarm);
43 void AlarmsDefaultAll();
44 int32_t AlarmsClear(SystemAlarmsAlarmElem alarm);
45 void AlarmsClearAll();
47 int32_t AlarmsHasWarnings();
48 int32_t AlarmsHasErrors();
49 int32_t AlarmsHasCritical();
50 SystemAlarmsAlarmOptions AlarmsGetHighestSeverity();
52 size_t AlarmString(SystemAlarmsData *alarm, char *buffer, size_t buffer_size, SystemAlarmsAlarmOptions level, SystemAlarmsAlarmOptions *highestSeverity);
54 #endif // ALARMS_H
56 /**
57 * @}
58 * @}