summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysStat.h
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-26 17:36:00 +0100
committerFlorent Duchon2013-02-13 21:21:12 +0100
commitb24866225a6301d3a663f874725e83c012dc25d3 (patch)
treeca527a2aab9abcdfbaf244c53ca63f0c531892b0 /digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysStat.h
parent2ba279f4eb2f23fa08a7c13465d16ae6ba5d0f96 (diff)
digital/beacon: add bitcloud stack into common directory digital/zigbit
Diffstat (limited to 'digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysStat.h')
-rw-r--r--digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysStat.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysStat.h b/digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysStat.h
new file mode 100644
index 00000000..79b36051
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysStat.h
@@ -0,0 +1,53 @@
+/**************************************************************************//**
+\file sysStat.h
+
+\brief Collection of internal runtime data for report
+
+\author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+\internal
+ History:
+ 15/04/11 D. Loskutnikov - Created
+*******************************************************************************/
+#ifndef _SYS_STAT_H
+#define _SYS_STAT_H
+
+#ifdef _REPORT_STATS_
+/******************************************************************************
+ Types section
+******************************************************************************/
+typedef struct _SYS_StatGenerator_t
+{
+ void *next;
+ uint8_t (*gen)(uint8_t *buf, uint8_t maxSize);
+} SYS_StatGenerator_t;
+
+/******************************************************************************
+ Prototypes section
+******************************************************************************/
+
+/**************************************************************************//**
+\brief Register new generator of stat data
+
+\param[in] gen - generator
+******************************************************************************/
+extern void SYS_RegisterStatGenerator(SYS_StatGenerator_t *gen);
+
+/**************************************************************************//**
+\brief Collect stats from registered generators into the supplied buffer
+
+\param[out] buf - buffer to place stat report
+\param[in] maxSize - size limit of buffer
+\return number of actually placed bytes
+******************************************************************************/
+extern uint8_t SYS_GenerateStatReport(uint8_t *buf, uint8_t maxSize);
+
+#endif // _REPORT_STATS_
+
+#endif // _SYS_STAT_H
+// eof sysStat.h