Adding class meta-data attributes.
[PyCIM.git] / schemata / CIM14 / IEC61970 / StateVariables / SvTapStep.py
blob53e48062c3be48378f92ab1c55d22db269cfd743
1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14.IEC61970.StateVariables.StateVariable import StateVariable
19 class SvTapStep(StateVariable):
20 """State variable for transformer tap step. This class is to be used for taps of LTC (load tap changing) transformers, not fixed tap transformers. Normally a profile specifies only one of the attributes 'position'or 'tapRatio'.
21 """
23 def __init__(self, continuousPosition=0.0, position=0, TapChanger=None, *args, **kw_args):
24 """Initialises a new 'SvTapStep' instance.
26 @param continuousPosition: The floating point tap position.
27 @param position: The integer tap position.
28 @param TapChanger: The tap changer associated with the tap step state.
29 """
30 #: The floating point tap position.
31 self.continuousPosition = continuousPosition
33 #: The integer tap position.
34 self.position = position
36 self._TapChanger = None
37 self.TapChanger = TapChanger
39 super(SvTapStep, self).__init__(*args, **kw_args)
41 _attrs = ["continuousPosition", "position"]
42 _attr_types = {"continuousPosition": float, "position": int}
43 _defaults = {"continuousPosition": 0.0, "position": 0}
44 _enums = {}
45 _refs = ["TapChanger"]
46 _many_refs = []
48 def getTapChanger(self):
49 """The tap changer associated with the tap step state.
50 """
51 return self._TapChanger
53 def setTapChanger(self, value):
54 if self._TapChanger is not None:
55 self._TapChanger._SvTapStep = None
57 self._TapChanger = value
58 if self._TapChanger is not None:
59 self._TapChanger._SvTapStep = self
61 TapChanger = property(getTapChanger, setTapChanger)