Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Dynamics / TieToMeasurement.py
blob834c4a2924948d9d692861cf49beccd98623ced0
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.IEC61970.Core.IdentifiedObject import IdentifiedObject
23 class TieToMeasurement(IdentifiedObject):
24 """Ties a block input to a specific state variable measurment. Thus giving a unit type, a location in the network (typically a terminal). A specific value is not given, just enough information to obtain the value from the model during a solution. This has nothing to do with SCADA.
25 """
27 def __init__(self, measurement0=None, block0=None, metaBlockInput0=None, *args, **kw_args):
28 """Initialises a new 'TieToMeasurement' instance.
30 @param measurement0:
31 @param block0:
32 @param metaBlockInput0: The identified block input to which this measurement applies. Note this applies only to the external interface of blocks.
33 """
34 self._measurement0 = None
35 self.measurement0 = measurement0
37 self._block0 = None
38 self.block0 = block0
40 self._metaBlockInput0 = None
41 self.metaBlockInput0 = metaBlockInput0
43 super(TieToMeasurement, self).__init__(*args, **kw_args)
45 _attrs = []
46 _attr_types = {}
47 _defaults = {}
48 _enums = {}
49 _refs = ["measurement0", "block0", "metaBlockInput0"]
50 _many_refs = []
52 def getmeasurement0(self):
54 return self._measurement0
56 def setmeasurement0(self, value):
57 if self._measurement0 is not None:
58 filtered = [x for x in self.measurement0.tieToMeasurement0 if x != self]
59 self._measurement0._tieToMeasurement0 = filtered
61 self._measurement0 = value
62 if self._measurement0 is not None:
63 if self not in self._measurement0._tieToMeasurement0:
64 self._measurement0._tieToMeasurement0.append(self)
66 measurement0 = property(getmeasurement0, setmeasurement0)
68 def getblock0(self):
70 return self._block0
72 def setblock0(self, value):
73 if self._block0 is not None:
74 filtered = [x for x in self.block0.tieToMeasurement0 if x != self]
75 self._block0._tieToMeasurement0 = filtered
77 self._block0 = value
78 if self._block0 is not None:
79 if self not in self._block0._tieToMeasurement0:
80 self._block0._tieToMeasurement0.append(self)
82 block0 = property(getblock0, setblock0)
84 def getmetaBlockInput0(self):
85 """The identified block input to which this measurement applies. Note this applies only to the external interface of blocks.
86 """
87 return self._metaBlockInput0
89 def setmetaBlockInput0(self, value):
90 if self._metaBlockInput0 is not None:
91 filtered = [x for x in self.metaBlockInput0.tieToMeasurement0 if x != self]
92 self._metaBlockInput0._tieToMeasurement0 = filtered
94 self._metaBlockInput0 = value
95 if self._metaBlockInput0 is not None:
96 if self not in self._metaBlockInput0._tieToMeasurement0:
97 self._metaBlockInput0._tieToMeasurement0.append(self)
99 metaBlockInput0 = property(getmetaBlockInput0, setmetaBlockInput0)