summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysStat.h
blob: 79b36051e0df1cfeb87a77983e6a2333c358286f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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