1 /******************************************************************************
3 * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) *
5 * This program is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU General Public License *
7 * as published by the Free Software Foundation; either version 2 *
8 * of the License, or (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software Foundation *
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ******************************************************************************/
27 BunitB = 0, BunitkB = 1, BunitMB = 2, BunitGB = 3, BunitTB = 4
32 TunitMS, TunitS, TunitM, TunitH
37 OK = 0, WARNING = 1, CRITICAL = 2
43 //DOUBLEs are always enough for ANY 64 bit value
45 //TRUE means everything BELOW upper/outside [lower-upper] is fine
46 BOOL legal, perc, set;
50 threshold(CONST DOUBLE v, CONST DOUBLE c, BOOL l = TRUE, BOOL p = FALSE);
52 threshold(CONST std::wstring&);
54 //return TRUE if the threshold is broken
55 BOOL rend(CONST DOUBLE val, CONST DOUBLE max = 100.0);
57 //returns a printable string of the threshold
58 std::wstring pString(CONST DOUBLE max = 100.0);
61 std::wstring removeZero(DOUBLE);
62 std::vector<std::wstring> splitMultiOptions(std::wstring);
64 Bunit parseBUnit(CONST std::wstring&);
65 std::wstring BunitStr(CONST Bunit&);
66 Tunit parseTUnit(CONST std::wstring&);
67 std::wstring TunitStr(CONST Tunit&);
69 VOID die(DWORD err = 0);