Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Dynamics / BlockInputReference.py
blobe0f2dabdcf7125dac7b889ac94f3525663f45a45
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 BlockInputReference(IdentifiedObject):
24 """Used at the meta dynamics level. This is how the internal definiton of a block references the input of another block.
25 """
27 def __init__(self, metaBlockReference0=None, metaBlockInput0=None, BlockConnectable=None, *args, **kw_args):
28 """Initialises a new 'BlockInputReference' instance.
30 @param metaBlockReference0:
31 @param metaBlockInput0: References the idenfiied input for the block reference.
32 @param BlockConnectable: Each block reference input is usually tied to one (sometimes zero for optional inputs) external block inputs or internal block reference outputs.
33 """
34 self._metaBlockReference0 = None
35 self.metaBlockReference0 = metaBlockReference0
37 self._metaBlockInput0 = None
38 self.metaBlockInput0 = metaBlockInput0
40 self._BlockConnectable = None
41 self.BlockConnectable = BlockConnectable
43 super(BlockInputReference, self).__init__(*args, **kw_args)
45 _attrs = []
46 _attr_types = {}
47 _defaults = {}
48 _enums = {}
49 _refs = ["metaBlockReference0", "metaBlockInput0", "BlockConnectable"]
50 _many_refs = []
52 def getmetaBlockReference0(self):
54 return self._metaBlockReference0
56 def setmetaBlockReference0(self, value):
57 if self._metaBlockReference0 is not None:
58 filtered = [x for x in self.metaBlockReference0.blockInputReference0 if x != self]
59 self._metaBlockReference0._blockInputReference0 = filtered
61 self._metaBlockReference0 = value
62 if self._metaBlockReference0 is not None:
63 if self not in self._metaBlockReference0._blockInputReference0:
64 self._metaBlockReference0._blockInputReference0.append(self)
66 metaBlockReference0 = property(getmetaBlockReference0, setmetaBlockReference0)
68 def getmetaBlockInput0(self):
69 """References the idenfiied input for the block reference.
70 """
71 return self._metaBlockInput0
73 def setmetaBlockInput0(self, value):
74 if self._metaBlockInput0 is not None:
75 filtered = [x for x in self.metaBlockInput0.blockInputReference0 if x != self]
76 self._metaBlockInput0._blockInputReference0 = filtered
78 self._metaBlockInput0 = value
79 if self._metaBlockInput0 is not None:
80 if self not in self._metaBlockInput0._blockInputReference0:
81 self._metaBlockInput0._blockInputReference0.append(self)
83 metaBlockInput0 = property(getmetaBlockInput0, setmetaBlockInput0)
85 def getBlockConnectable(self):
86 """Each block reference input is usually tied to one (sometimes zero for optional inputs) external block inputs or internal block reference outputs.
87 """
88 return self._BlockConnectable
90 def setBlockConnectable(self, value):
91 if self._BlockConnectable is not None:
92 filtered = [x for x in self.BlockConnectable.BlockInputReference if x != self]
93 self._BlockConnectable._BlockInputReference = filtered
95 self._BlockConnectable = value
96 if self._BlockConnectable is not None:
97 if self not in self._BlockConnectable._BlockInputReference:
98 self._BlockConnectable._BlockInputReference.append(self)
100 BlockConnectable = property(getBlockConnectable, setBlockConnectable)