OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Signal.h
Go to the documentation of this file.
1/*********************************************************************
2 * @file Signal.h
3 * @brief Container for properties of signal types. Frequencies are handled internally with the unit Herz.
4 *
5 * @author Jan Wagner
6 * @date July 2022
7 *********************************************************************/
8#pragma once
9#include <string>
10#include <map>
11
12#include "EntitySignalType.h"
13#include "PhysicalQuantities.h"
14
16
17class Signal
18{
19public:
20 Signal(std::string signalName, std::string type, PhysicalQuantities minFrequency, PhysicalQuantities maxFrequency)
21 : _signalName(signalName), _signalType(type), _minFrequency(minFrequency), _maxFrequency(maxFrequency){};
22 Signal() {};
23 Signal & operator=(const Signal& rhs);
24
25 const double GetFrequencyMin() const { return _minFrequency.GetInternalValue() ; }
26 const double GetFrequencyMax() const { return _maxFrequency.GetInternalValue() ; }
27 const signalType GetSignalType() const { return types.at(_signalType); }
28 const std::string GetSignalTypeName() const { return _signalType; }
29 const std::string GetSignalName() const { return _signalName; }
30
31 std::string Print();
32
33private:
34 std::map<std::string, signalType> types = { {EntitySignalType::GetValueSinGuasSignal(), sinusoidalGauss} };
35
36 std::string _signalType;
37 std::string _signalName;
38 PhysicalQuantities _minFrequency;
39 PhysicalQuantities _maxFrequency;
40};
signalType
Definition Signal.h:15
@ sinusoidalGauss
Definition Signal.h:15
Definition PhysicalQuantities.h:5
const double GetInternalValue(void) const
Definition PhysicalQuantities.h:23
Definition Signal.h:18
const signalType GetSignalType() const
Definition Signal.h:27
const double GetFrequencyMax() const
Definition Signal.h:26
const double GetFrequencyMin() const
Definition Signal.h:25
Signal()
Definition Signal.h:22
Signal & operator=(const Signal &rhs)
Definition Signal.cpp:4
const std::string GetSignalName() const
Definition Signal.h:29
std::string Print()
Definition Signal.cpp:17
const std::string GetSignalTypeName() const
Definition Signal.h:28
Signal(std::string signalName, std::string type, PhysicalQuantities minFrequency, PhysicalQuantities maxFrequency)
Definition Signal.h:20