Stats.h
Go to the documentation of this file.
1 /****
2  * Stats.h - Maintain useful statistics for actions performed by a Hue Bridge
3  *
4  * Copyright 2019 mikee47 <mike@sillyhouse.net>
5  *
6  * This file is part of the HueEmulator Library
7  *
8  * This library is free software: you can redistribute it and/or modify it under the terms of the
9  * GNU General Public License as published by the Free Software Foundation, version 3 or later.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  * See the GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along with this library.
16  * If not, see <https://www.gnu.org/licenses/>.
17  *
18  ****/
19 
20 #pragma once
21 
22 #include <stdint.h>
23 #include <ArduinoJson6.h>
24 
25 namespace Hue
26 {
27 struct Stats {
28  struct {
29  uint16_t count;
30  uint16_t root;
35  } request;
36  struct {
38  size_t size;
39  } response;
40  struct {
45  } error;
46 
47  void serialize(JsonObject json) const;
48 };
49 
50 } // namespace Hue
uint16_t resourceNotAvailable
Definition: Stats.h:76
uint16_t ignored
Requests not starting with /api.
Definition: Stats.h:82
uint16_t unauthorizedUser
Definition: Stats.h:78
uint16_t count
Total number of HTTP requests.
Definition: Stats.h:80
uint16_t getDeviceInfo
Definition: Stats.h:84
void serialize(JsonObject json) const
size_t size
Total size of response data.
Definition: Stats.h:72
uint16_t getAllDeviceInfo
Definition: Stats.h:83
uint16_t methodNotAvailable
Definition: Stats.h:77
Json json
uint16_t root
eRequests handled by root UPnP device
Definition: Stats.h:81
struct Hue::Stats::@79 request
Definition: Bridge.h:29
struct Hue::Stats::@81 error
uint16_t setDeviceInfo
Definition: Stats.h:85
struct Hue::Stats::@80 response