stat: Add global stat group

Add a global stat_item group for measurement values and a
corresponding macro to get and set the values.
Add a stat_item STAT_MS_PRESET to monitor the number of
MS objects in the storage.

Sponsored-by: On-Waves ehf
diff --git a/src/bts.cpp b/src/bts.cpp
index 2d8a91a..edae737 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -86,6 +86,19 @@
 	bts_ctr_description,
 };
 
+static const struct osmo_stat_item_desc bts_stat_item_description[] = {
+	{ "ms.present",		"MS Present           ",
+		OSMO_STAT_ITEM_NO_UNIT, 4, 0},
+};
+
+static const struct osmo_stat_item_group_desc bts_statg_desc = {
+	"bts",
+	"BTS Statistics",
+	OSMO_STATS_CLASS_GLOBAL,
+	ARRAY_SIZE(bts_stat_item_description),
+	bts_stat_item_description,
+};
+
 BTS* BTS::main_bts()
 {
 	return &s_bts;
@@ -132,6 +145,7 @@
 	}
 
 	m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 0);
+	m_statg = osmo_stat_item_group_alloc(tall_pcu_ctx, &bts_statg_desc, 0);
 }
 
 BTS::~BTS()