DPsim
Loading...
Searching...
No Matches
TopologicalSignalComp.h
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
9#pragma once
10
14
15namespace CPS {
19protected:
24
25public:
26 typedef std::shared_ptr<TopologicalSignalComp> Ptr;
27 typedef std::vector<Ptr> List;
28
31 Logger::Level logLevel = Logger::Level::off)
33 /* We also want to set the CLI loglevel according to the logLevel
34 * std::max(Logger::Level::info, logLevel). But because of excessive
35 * logging to Level::info that is currently infeasible. */
36 mSLog(Logger::get(name, logLevel, Logger::Level::warn)),
37 mLogLevel(logLevel) {}
38
41 Logger::Level logLevel = Logger::Level::off)
42 : TopologicalSignalComp(name, name, logLevel) {}
43
45};
46} // namespace CPS
String uid()
Returns unique id.
spdlog::level::level_enum Level
Definition Logger.h:33
std::shared_ptr< spdlog::logger > Log
Definition Logger.h:34
TopologicalSignalComp(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Basic constructor that takes UID, name and log level.
TopologicalSignalComp(String name, Logger::Level logLevel=Logger::Level::off)
Basic constructor that takes name and log level and sets the UID to name as well.
std::shared_ptr< TopologicalSignalComp > Ptr
Logger::Level mLogLevel
Component logger control for internal variables.
Logger::Log mSLog
Component logger.
std::string String
Definition Definitions.h:65