get data from Kernel driver

1st version of the json file with the header
This commit is contained in:
2024-06-24 20:34:18 +02:00
parent 454ae2f46e
commit 68a4f6bcbe
14 changed files with 833 additions and 111 deletions

View File

@@ -1,9 +1,19 @@
/*
*/
* Copyright (c) 2024 Markus Lehr.
*
*
* SPDX-License-Identifier: Owend property of Markus Lehr
*
*/
#ifndef RTS_INCLUDE_RTSMONFRAME_H_
#define RTS_INCLUDE_RTSMONFRAME_H_
#include <string>
#include <list>
#include <ISensorDesc.h>
using json = nlohmann::json;
class RTSMonFrame
{
@@ -14,59 +24,35 @@ private:
int samplerate;
int sampleperiod;
int downtime;
std::string status;
std::list<std::string> items;
std::list<std::shared_ptr<ISensorDesc>> mSenorDesriptions;
std::string path;
public:
RTSMonFrame(int id, std::string name, int samplerate, int sampleperiod, int downtime, std::string status) {
this->id = id;
this->name = name;
this->samplerate = samplerate;
this->sampleperiod = sampleperiod;
this->downtime = downtime;
this->status = status;
}
RTSMonFrame(int id, std::string name, int samplerate, int sampleperiod, int downtime, const std::list<std::shared_ptr<ISensorDesc>>& sensDesc, std::string path);
RTSMonFrame(int id) {
this->id = id;
}
RTSMonFrame(RTSMonFrame& rtsMonFrameCopy) {
this->id = rtsMonFrameCopy.GetId();
}
~RTSMonFrame();
void Add(std::string item){
this->items.push_back(item);
}
int GetId() {
return this->id;
}
int GetId();
std::string GetName() {
return this->name;
}
void SetName(const std::string& name);
const std::string& GetName();
int GetSampleRate() {
return this->samplerate;
}
void SetSampleRate(int samplerate);
int GetSamplePeriod(){
return this->sampleperiod;
}
int GetSampleRate();
void SetSamplePeriod(int sampleperiod);
int GetSamplePeriod();
int GetDownTime(){
return this->downtime;
}
std::string Gettatus() {
return this->status;
}
void SetDownTime(int downtime);
std::list<std::string>& GetItems() {
return this->items;
}
int GetDownTime();
bool generate(u_int32_t* values);
};
#endif /* RTS_INCLUDE_RTSMONFRAME_H_ */