DPsim
Loading...
Searching...
No Matches
dpsim-models
include
dpsim-models
Signal
SineWaveGenerator.h
1
/* Copyright 2017-2021 Institute for Automation of Complex Power Systems,
2
* EONERC, RWTH Aachen University
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7
*********************************************************************************/
8
9
#pragma once
10
11
#include <dpsim-models/Signal/SignalGenerator.h>
12
13
namespace
CPS {
14
namespace
Signal {
19
class
SineWaveGenerator
:
public
SignalGenerator,
20
public
SharedFactory
<SineWaveGenerator> {
21
private
:
23
Attribute<Real>::Ptr mPhase;
24
Attribute<Real>::Ptr mMagnitude;
25
26
public
:
27
const
Attribute<Complex>::Ptr mVoltageRef;
29
SineWaveGenerator
(String name, Logger::Level logLevel = Logger::Level::off);
31
void
setParameters
(Complex initialPhasor, Real frequency = 0.0);
33
void
step
(Real time);
34
};
35
}
// namespace Signal
36
}
// namespace CPS
CPS::Signal::SineWaveGenerator::setParameters
void setParameters(Complex initialPhasor, Real frequency=0.0)
set the source's parameters
Definition
SineWaveGenerator.cpp:20
CPS::Signal::SineWaveGenerator::SineWaveGenerator
SineWaveGenerator(String name, Logger::Level logLevel=Logger::Level::off)
init the identified object
Definition
SineWaveGenerator.cpp:13
CPS::Signal::SineWaveGenerator::step
void step(Real time)
implementation of inherited method step to update and return the current signal value
Definition
SineWaveGenerator.cpp:36
SharedFactory
Definition
PtrFactory.h:16
Generated by
1.13.2