Files
vrpmdv-yocto-recipes/recipes-vrpmdv/recipes-base/vrpmdv-web/files/rt_service/include/IChannelDesc.h
Markus Lehr 96308eb092 added the rtservice, Webserver, webfrontend with:
1. Monitoring
2. Monitoringfiles
3. Download
2024-07-10 11:36:16 +02:00

60 lines
960 B
C++

/*
* Copyright (c) 2024 Markus Lehr.
*
*
* SPDX-License-Identifier: Owend property of Markus Lehr
*
*/
#ifndef RTS_INCLUDE_ICHANNELDESC_H_
#define RTS_INCLUDE_ICHANNELDESC_H_
#include <string>
#include <list>
enum VALUEFORMAT {
UINT32 = 0,
INT32,
FLOAT,
DOUBLE,
};
union rtsSensorValue
{
uint32_t vUINT32;
int32_t vINT32;
float vFLOAT;
double vDOUBLE;
};
static const std::string RTSMONCHANNELNAME("name");
static const std::string RTSMONCHANNELVALUE("value");
static const std::string RTSMONCHANNELVALUETYPE("valuetype");
class IChannelDesc
{
public:
virtual u_int32_t GetId() = 0;
virtual const std::string& GetName() = 0;
virtual VALUEFORMAT GetValueFormat() = 0;
/**
* return the length of the data that is neeeded for one value of the channel in UINT32
*
*/
virtual u_int32_t GetValueByteSpace() = 0;
};
#endif /* RTS_INCLUDE_ICHANNELDESC_H_ */