-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMonitoringTemp.h
More file actions
38 lines (29 loc) · 1022 Bytes
/
Copy pathMonitoringTemp.h
File metadata and controls
38 lines (29 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*****************************************************************//**
* \file MonitoringTemp.h
* \brief: Derived class from template SharedQueue
* \author F.Morani
* \date May 2023
***********************************************************************/
#ifndef MONITORINGTEMP_H
#define MONITORINGTEMP_H
#include "SharedQueue.h"
#include <sstream>
#include <vector>
#include <list>
typedef std::pair<std::string, std::string> MonitoringTemp;
template<typename T>
inline void insert(MonitoringTemp &o, const T &value, const std::string &unitOfMeasure)
{
std::ostringstream oss;
oss << value;
o.push_front(std::pair<std::string, std::string>(oss.str(), unitOfMeasure));
}
template<>
inline void insert(MonitoringTemp &o, const std::string &value, const std::string &unitOfMeasure)
{
o.first = value;
o.second = unitOfMeasure;
// o.push(std::pair<std::string, std::string>(value, unitOfMeasure));
}
typedef SharedQueue<MonitoringTemp> MonitoringDataQueue;
#endif // MONITORINGTEMP_H