Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Dynamics / MetaBlockInput.py
blobed2b1747e5e253e49a969301a55f37164a2d6868
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.Dynamics.MetaBlockConnectable import MetaBlockConnectable
23 class MetaBlockInput(MetaBlockConnectable):
24 """Linkage at the dynanics meta model level. The output of a block could link to this. This is a public interface external to the block.
25 """
27 def __init__(self, blockInputReference0=None, MemberOf_MetaBlock=None, blockUsageInputReference0=None, blockInputType0=None, tieToMeasurement0=None, *args, **kw_args):
28 """Initialises a new 'MetaBlockInput' instance.
30 @param blockInputReference0: References the idenfiied input for the block reference.
31 @param MemberOf_MetaBlock: Inputs belong to a block.
32 @param blockUsageInputReference0:
33 @param blockInputType0:
34 @param tieToMeasurement0: The identified block input to which this measurement applies. Note this applies only to the external interface of blocks.
35 """
36 self._blockInputReference0 = []
37 self.blockInputReference0 = [] if blockInputReference0 is None else blockInputReference0
39 self._MemberOf_MetaBlock = None
40 self.MemberOf_MetaBlock = MemberOf_MetaBlock
42 self._blockUsageInputReference0 = []
43 self.blockUsageInputReference0 = [] if blockUsageInputReference0 is None else blockUsageInputReference0
45 self._blockInputType0 = None
46 self.blockInputType0 = blockInputType0
48 self._tieToMeasurement0 = []
49 self.tieToMeasurement0 = [] if tieToMeasurement0 is None else tieToMeasurement0
51 super(MetaBlockInput, self).__init__(*args, **kw_args)
53 _attrs = []
54 _attr_types = {}
55 _defaults = {}
56 _enums = {}
57 _refs = ["blockInputReference0", "MemberOf_MetaBlock", "blockUsageInputReference0", "blockInputType0", "tieToMeasurement0"]
58 _many_refs = ["blockInputReference0", "blockUsageInputReference0", "tieToMeasurement0"]
60 def getblockInputReference0(self):
61 """References the idenfiied input for the block reference.
62 """
63 return self._blockInputReference0
65 def setblockInputReference0(self, value):
66 for x in self._blockInputReference0:
67 x.metaBlockInput0 = None
68 for y in value:
69 y._metaBlockInput0 = self
70 self._blockInputReference0 = value
72 blockInputReference0 = property(getblockInputReference0, setblockInputReference0)
74 def addblockInputReference0(self, *blockInputReference0):
75 for obj in blockInputReference0:
76 obj.metaBlockInput0 = self
78 def removeblockInputReference0(self, *blockInputReference0):
79 for obj in blockInputReference0:
80 obj.metaBlockInput0 = None
82 def getMemberOf_MetaBlock(self):
83 """Inputs belong to a block.
84 """
85 return self._MemberOf_MetaBlock
87 def setMemberOf_MetaBlock(self, value):
88 if self._MemberOf_MetaBlock is not None:
89 filtered = [x for x in self.MemberOf_MetaBlock.MetaBlockInput if x != self]
90 self._MemberOf_MetaBlock._MetaBlockInput = filtered
92 self._MemberOf_MetaBlock = value
93 if self._MemberOf_MetaBlock is not None:
94 if self not in self._MemberOf_MetaBlock._MetaBlockInput:
95 self._MemberOf_MetaBlock._MetaBlockInput.append(self)
97 MemberOf_MetaBlock = property(getMemberOf_MetaBlock, setMemberOf_MetaBlock)
99 def getblockUsageInputReference0(self):
101 return self._blockUsageInputReference0
103 def setblockUsageInputReference0(self, value):
104 for x in self._blockUsageInputReference0:
105 x.metaBlockInput0 = None
106 for y in value:
107 y._metaBlockInput0 = self
108 self._blockUsageInputReference0 = value
110 blockUsageInputReference0 = property(getblockUsageInputReference0, setblockUsageInputReference0)
112 def addblockUsageInputReference0(self, *blockUsageInputReference0):
113 for obj in blockUsageInputReference0:
114 obj.metaBlockInput0 = self
116 def removeblockUsageInputReference0(self, *blockUsageInputReference0):
117 for obj in blockUsageInputReference0:
118 obj.metaBlockInput0 = None
120 def getblockInputType0(self):
122 return self._blockInputType0
124 def setblockInputType0(self, value):
125 if self._blockInputType0 is not None:
126 filtered = [x for x in self.blockInputType0.metaBlockInput0 if x != self]
127 self._blockInputType0._metaBlockInput0 = filtered
129 self._blockInputType0 = value
130 if self._blockInputType0 is not None:
131 if self not in self._blockInputType0._metaBlockInput0:
132 self._blockInputType0._metaBlockInput0.append(self)
134 blockInputType0 = property(getblockInputType0, setblockInputType0)
136 def gettieToMeasurement0(self):
137 """The identified block input to which this measurement applies. Note this applies only to the external interface of blocks.
139 return self._tieToMeasurement0
141 def settieToMeasurement0(self, value):
142 for x in self._tieToMeasurement0:
143 x.metaBlockInput0 = None
144 for y in value:
145 y._metaBlockInput0 = self
146 self._tieToMeasurement0 = value
148 tieToMeasurement0 = property(gettieToMeasurement0, settieToMeasurement0)
150 def addtieToMeasurement0(self, *tieToMeasurement0):
151 for obj in tieToMeasurement0:
152 obj.metaBlockInput0 = self
154 def removetieToMeasurement0(self, *tieToMeasurement0):
155 for obj in tieToMeasurement0:
156 obj.metaBlockInput0 = None