DPsim
SignalGenerator.cpp
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 #include <dpsim-models/Signal/SignalGenerator.h>
10 
11 using namespace CPS;
12 
13 Signal::SignalGenerator::SignalGenerator(String uid, String name,
14  Logger::Level logLevel)
15  : SimSignalComp(name, logLevel),
16  mSigOut(mAttributes->create<Complex>("sigOut")),
17  mFreq(mAttributes->createDynamic<Real>("freq")) {
18 
19  SPDLOG_LOGGER_INFO(mSLog, "Create {} {}", type(), name);
20 }
21 
22 Complex Signal::SignalGenerator::getSignal() { return **mSigOut; }