Update README.rst
[PyCIM.git] / CIM14 / CDPSM / GIS_Connectivity / IEC61970 / StateVariables / SvTapStep.py
blob4925778e9a53e940dced340b280e90178182889d
1 # Copyright (C) 2010-2011 Richard Lincoln
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to
5 # deal in the Software without restriction, including without limitation the
6 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 # sell copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 # IN THE SOFTWARE.
21 from CIM14.CDPSM.GIS_Connectivity.Element import Element
23 class SvTapStep(Element):
24 """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'.
25 """
27 def __init__(self, continuousPosition=0.0, position=0, TapChanger=None, *args, **kw_args):
28 """Initialises a new 'SvTapStep' instance.
30 @param continuousPosition: The floating point tap position.
31 @param position: The integer tap position.
32 @param TapChanger: The tap changer associated with the tap step state.
33 """
34 #: The floating point tap position.
35 self.continuousPosition = continuousPosition
37 #: The integer tap position.
38 self.position = position
40 self._TapChanger = None
41 self.TapChanger = TapChanger
43 super(SvTapStep, self).__init__(*args, **kw_args)
45 _attrs = ["continuousPosition", "position"]
46 _attr_types = {"continuousPosition": float, "position": int}
47 _defaults = {"continuousPosition": 0.0, "position": 0}
48 _enums = {}
49 _refs = ["TapChanger"]
50 _many_refs = []
52 def getTapChanger(self):
53 """The tap changer associated with the tap step state.
54 """
55 return self._TapChanger
57 def setTapChanger(self, value):
58 if self._TapChanger is not None:
59 self._TapChanger._SvTapStep = None
61 self._TapChanger = value
62 if self._TapChanger is not None:
63 self._TapChanger.SvTapStep = None
64 self._TapChanger._SvTapStep = self
66 TapChanger = property(getTapChanger, setTapChanger)