DPsim
Loading...
Searching...
No Matches
Base_Ph1_VoltageSource.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
13
14namespace CPS {
15namespace Base {
16namespace Ph1 {
18public:
23
24 explicit VoltageSource(CPS::AttributeList::Ptr attributeList)
25 : mVoltageRef(attributeList->create<Complex>("V_ref")),
26 mSrcFreq(attributeList->create<Real>("f_src", -1)){};
27
29 void setParameters(Complex voltageRef, Real srcFreq = -1) {
30 **mVoltageRef = voltageRef;
31 **mSrcFreq = srcFreq;
32 }
33};
34} // namespace Ph1
35} // namespace Base
36} // namespace CPS
AttributePointer< Attribute< T > > Ptr
Definition Attribute.h:250
std::shared_ptr< AttributeList > Ptr
const Attribute< Complex >::Ptr mVoltageRef
Voltage set point [V].
void setParameters(Complex voltageRef, Real srcFreq=-1)
Sets model specific parameters.
const Attribute< Real >::Ptr mSrcFreq
Source frequency [Hz].
VoltageSource(CPS::AttributeList::Ptr attributeList)
double Real
Definition Definitions.h:62
std::complex< Real > Complex
Definition Definitions.h:63