DPsim
Loading...
Searching...
No Matches
SignalGenerator.cpp
Go to the documentation of this file.
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
10
11using namespace CPS;
12
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
String uid()
Returns unique id.
String type()
Get component type (cross-platform)
AttributeList::Ptr mAttributes
Attribute List.
spdlog::level::level_enum Level
Definition Logger.h:33
Complex getSignal()
returns current signal value without updating it
SignalGenerator(String uid, String name, Logger::Level logLevel=Logger::Level::off)
const CPS::Attribute< Real >::Ptr mFreq
const CPS::Attribute< Complex >::Ptr mSigOut
SimSignalComp(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Logger::Log mSLog
Component logger.
std::string String
Definition Definitions.h:65
double Real
Definition Definitions.h:62
std::complex< Real > Complex
Definition Definitions.h:63