Skyward boardcore
Loading...
Searching...
No Matches
TaskSchedulerData.h
Go to the documentation of this file.
1
/* Copyright (c) 2019 Skyward Experimental Rocketry
2
* Authors: Alain Carlucci, Federico Terraneo, Matteo Piazzolla
3
*
4
* Permission is hereby granted, free of charge, to any person obtaining a copy
5
* of this software and associated documentation files (the "Software"), to deal
6
* in the Software without restriction, including without limitation the rights
7
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
* copies of the Software, and to permit persons to whom the Software is
9
* furnished to do so, subject to the following conditions:
10
*
11
* The above copyright notice and this permission notice shall be included in
12
* all copies or substantial portions of the Software.
13
*
14
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
* THE SOFTWARE.
21
*/
22
23
#pragma once
24
25
#include <
logger/Logger.h
>
26
#include <
utils/Stats/Stats.h
>
27
28
#include <chrono>
29
#include <cstdint>
30
#include <ostream>
31
#include <reflect.hpp>
32
33
namespace
Boardcore
34
{
35
47
struct
TaskStatsResult
48
{
49
size_t
id
;
50
int64_t
period
;
//< this was a std::chrono::nanoseconds
51
StatsResult
activationStats
;
52
StatsResult
periodStats
;
53
StatsResult
workloadStats
;
54
uint32_t
missedEvents
;
55
uint32_t
failedEvents
;
56
57
static
constexpr
auto
reflect
()
58
{
59
return
STRUCT_DEF(
60
TaskStatsResult
,
61
FIELD_DEF(
id
) FIELD_DEF(
period
) FIELD_DEF2(
62
activationStats
, minValue) FIELD_DEF2(
activationStats
, maxValue)
63
FIELD_DEF2(
activationStats
, mean) FIELD_DEF2(
activationStats
,
64
stdDev)
65
FIELD_DEF2(
activationStats
, nSamples) FIELD_DEF2(
66
periodStats
, minValue) FIELD_DEF2(
periodStats
, maxValue)
67
FIELD_DEF2(
periodStats
, mean)
68
FIELD_DEF2(
periodStats
, stdDev) FIELD_DEF2(
69
periodStats
, nSamples)
70
FIELD_DEF2(
workloadStats
, minValue) FIELD_DEF2(
71
workloadStats
, maxValue)
72
FIELD_DEF2(
workloadStats
, mean)
73
FIELD_DEF2(
workloadStats
, stdDev)
74
FIELD_DEF2(
workloadStats
, nSamples)
75
FIELD_DEF(
missedEvents
)
76
FIELD_DEF(
failedEvents
));
77
}
78
};
79
80
}
// namespace Boardcore
Logger.h
Stats.h
Boardcore
Driver for the VN100S IMU.
Definition
ActiveObject.h:31
Boardcore::StatsResult
Statistics computed by the Stats class.
Definition
Stats.h:36
Boardcore::TaskStatsResult
Statistics over a single task.
Definition
TaskSchedulerData.h:48
Boardcore::TaskStatsResult::period
int64_t period
Definition
TaskSchedulerData.h:50
Boardcore::TaskStatsResult::failedEvents
uint32_t failedEvents
Definition
TaskSchedulerData.h:55
Boardcore::TaskStatsResult::periodStats
StatsResult periodStats
Definition
TaskSchedulerData.h:52
Boardcore::TaskStatsResult::activationStats
StatsResult activationStats
Definition
TaskSchedulerData.h:51
Boardcore::TaskStatsResult::id
size_t id
Definition
TaskSchedulerData.h:49
Boardcore::TaskStatsResult::missedEvents
uint32_t missedEvents
Definition
TaskSchedulerData.h:54
Boardcore::TaskStatsResult::reflect
static constexpr auto reflect()
Definition
TaskSchedulerData.h:57
Boardcore::TaskStatsResult::workloadStats
StatsResult workloadStats
Definition
TaskSchedulerData.h:53
src
shared
scheduler
TaskSchedulerData.h
Generated by
1.9.8