2 ******************************************************************************
3 * @addtogroup OpenPilotSystem OpenPilot System
5 * @addtogroup OpenPilotLibraries OpenPilot System Libraries
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
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
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
,
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
);