mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Модуль Benchmark
This commit is contained in:
30
include/classes/IoTBench.h
Normal file
30
include/classes/IoTBench.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
#include "Global.h"
|
||||
#include "classes/IoTItem.h"
|
||||
#include <map>
|
||||
|
||||
struct ItemBench
|
||||
{
|
||||
uint32_t sumloopTime = 0;
|
||||
uint32_t loopTime = 0;
|
||||
uint32_t loopTimeMax_p = 0;
|
||||
uint32_t loopTimeMax_glob = 0;
|
||||
uint32_t count = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class IoTBench : public IoTItem
|
||||
{
|
||||
public:
|
||||
IoTBench(const String ¶meters);
|
||||
~IoTBench();
|
||||
|
||||
virtual void preLoadFunction();
|
||||
virtual void postLoadFunction();
|
||||
virtual void preTaskFunction(const String &id);
|
||||
virtual void postTaskFunction(const String &id);
|
||||
protected:
|
||||
std::map<String, ItemBench *> banchItems;
|
||||
};
|
||||
@@ -1,5 +1,8 @@
|
||||
#pragma once
|
||||
#include "classes/IoTGpio.h"
|
||||
//#include "classes/IoTBench.h"
|
||||
|
||||
class IoTBench;
|
||||
|
||||
struct IoTValue {
|
||||
float valD = 0;
|
||||
@@ -53,6 +56,9 @@ class IoTItem {
|
||||
virtual IoTItem* getRtcDriver();
|
||||
//virtual IoTItem* getCAMDriver();
|
||||
virtual IoTItem* getTlgrmDriver();
|
||||
//virtual IoTBench* getBenchmark();
|
||||
virtual IoTBench*getBenchmarkTask();
|
||||
virtual IoTBench*getBenchmarkLoad();
|
||||
virtual unsigned long getRtcUnixTime();
|
||||
|
||||
// делаем доступным модулям отправку сообщений в телеграм
|
||||
|
||||
Reference in New Issue
Block a user