6#include <sfh/util/CircularBuffer.h>
87 Samplifier(
const string& simObjectName, ISimObjectCreator*
const creator);
90 virtual void OdeFcn(
const double T,
const double*
const X,
double*
const XDot,
const bool IsMajorTimeStep);
91 virtual void InitialConditionSetup(
const double T,
const double*
const currentIC,
double*
const updatedIC, ISimObjectCreator*
const creator);
92 virtual void FinalSetup(
const double T,
const double*
const X, ISimObjectCreator*
const creator) { m_IsSettingUp =
false; };
93 const double* Output(
const double T,
const double*
const X,
const int Index);
95#ifdef FH_VISUALIZATION
97 virtual void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator) { }
100 virtual void RenderUpdate(
const double T,
const double*
const X) { }
104 std::unique_ptr<ISignalPort*[]> m_Input_i;
105 void SetOutputPortValues(
const double T,
const double*
const X);
106 ICommonComputation* m_SetOutputPortValues;
109 bool isOutlier(
double probability);
111 double getNoise(
const int PortNo,
const int PortIndex);
114 int m_PortWidth, m_seed, m_DummyIndex;
115 std::unique_ptr<int[]> m_PortSize_i;
117 std::vector<std::unique_ptr<double[]>> m_noiseBias;
118 std::vector<std::unique_ptr<double[]>> m_noiseStdDev;
119 std::vector<std::unique_ptr<double[]>> m_samplingPeriod;
120 std::vector<std::unique_ptr<double[]>> m_signalSampleTime;
121 std::vector<std::unique_ptr<double[]>> m_firstSampleTime;
122 std::vector<std::unique_ptr<double[]>> m_outlierProbability;
123 std::vector<std::unique_ptr<double[]>> m_lossProbability;
124 std::vector<std::unique_ptr<int[]>> m_lostSamples;
125 std::vector<std::unique_ptr<int[]>> m_avgLostSamples;
126 std::vector<std::unique_ptr<double[]>> m_timeDelay;
127 std::vector<std::unique_ptr<double[]>> m_WriteBuffer;
128 std::vector<std::unique_ptr<double[]>> m_ReadBuffer;
130 std::mutex m_SignalResource;
131 std::vector<std::unique_ptr<CircularBuffer<std::pair<double, double>, 1024>[]>> m_measurementBuffer;
133 std::mt19937 m_generator;
134 std::uniform_real_distribution<double> m_uniform;
135 std::vector<std::unique_ptr<std::normal_distribution<double>[]>> m_normals;
Definition: Samplifier.h:85