Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Dynamics / MetaBlockOutput.py
blob327b4a554f22da108c46be4714e9323b7b94a24a
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 MetaBlockOutput(MetaBlockConnectable):
24 """Output state of a block. This is a public interface external to the block. One or more block outputs should be specified in order to link blocks together. Certain block kinds might require a specific output. For example, an exciter block might require an output called 'Ea'.
25 """
27 def __init__(self, BlockOutputReference=None, MemberOf_MetaBlock=None, blockUsageOutputReference0=None, blockOutputType0=None, *args, **kw_args):
28 """Initialises a new 'MetaBlockOutput' instance.
30 @param BlockOutputReference: A block output reference for the block output. The output of the block is passed to the block output reference which is a block connectable and thus can be connected at the dynamics metadata level to another block.
31 @param MemberOf_MetaBlock: The block that contains the output.
32 @param blockUsageOutputReference0:
33 @param blockOutputType0:
34 """
35 self._BlockOutputReference = []
36 self.BlockOutputReference = [] if BlockOutputReference is None else BlockOutputReference
38 self._MemberOf_MetaBlock = None
39 self.MemberOf_MetaBlock = MemberOf_MetaBlock
41 self._blockUsageOutputReference0 = []
42 self.blockUsageOutputReference0 = [] if blockUsageOutputReference0 is None else blockUsageOutputReference0
44 self._blockOutputType0 = None
45 self.blockOutputType0 = blockOutputType0
47 super(MetaBlockOutput, self).__init__(*args, **kw_args)
49 _attrs = []
50 _attr_types = {}
51 _defaults = {}
52 _enums = {}
53 _refs = ["BlockOutputReference", "MemberOf_MetaBlock", "blockUsageOutputReference0", "blockOutputType0"]
54 _many_refs = ["BlockOutputReference", "blockUsageOutputReference0"]
56 def getBlockOutputReference(self):
57 """A block output reference for the block output. The output of the block is passed to the block output reference which is a block connectable and thus can be connected at the dynamics metadata level to another block.
58 """
59 return self._BlockOutputReference
61 def setBlockOutputReference(self, value):
62 for x in self._BlockOutputReference:
63 x.metaBlockOutput0 = None
64 for y in value:
65 y._metaBlockOutput0 = self
66 self._BlockOutputReference = value
68 BlockOutputReference = property(getBlockOutputReference, setBlockOutputReference)
70 def addBlockOutputReference(self, *BlockOutputReference):
71 for obj in BlockOutputReference:
72 obj.metaBlockOutput0 = self
74 def removeBlockOutputReference(self, *BlockOutputReference):
75 for obj in BlockOutputReference:
76 obj.metaBlockOutput0 = None
78 def getMemberOf_MetaBlock(self):
79 """The block that contains the output.
80 """
81 return self._MemberOf_MetaBlock
83 def setMemberOf_MetaBlock(self, value):
84 if self._MemberOf_MetaBlock is not None:
85 filtered = [x for x in self.MemberOf_MetaBlock.MetaBlockOutput if x != self]
86 self._MemberOf_MetaBlock._MetaBlockOutput = filtered
88 self._MemberOf_MetaBlock = value
89 if self._MemberOf_MetaBlock is not None:
90 if self not in self._MemberOf_MetaBlock._MetaBlockOutput:
91 self._MemberOf_MetaBlock._MetaBlockOutput.append(self)
93 MemberOf_MetaBlock = property(getMemberOf_MetaBlock, setMemberOf_MetaBlock)
95 def getblockUsageOutputReference0(self):
97 return self._blockUsageOutputReference0
99 def setblockUsageOutputReference0(self, value):
100 for x in self._blockUsageOutputReference0:
101 x.metaBlockOutput0 = None
102 for y in value:
103 y._metaBlockOutput0 = self
104 self._blockUsageOutputReference0 = value
106 blockUsageOutputReference0 = property(getblockUsageOutputReference0, setblockUsageOutputReference0)
108 def addblockUsageOutputReference0(self, *blockUsageOutputReference0):
109 for obj in blockUsageOutputReference0:
110 obj.metaBlockOutput0 = self
112 def removeblockUsageOutputReference0(self, *blockUsageOutputReference0):
113 for obj in blockUsageOutputReference0:
114 obj.metaBlockOutput0 = None
116 def getblockOutputType0(self):
118 return self._blockOutputType0
120 def setblockOutputType0(self, value):
121 if self._blockOutputType0 is not None:
122 filtered = [x for x in self.blockOutputType0.metaBlockOutput0 if x != self]
123 self._blockOutputType0._metaBlockOutput0 = filtered
125 self._blockOutputType0 = value
126 if self._blockOutputType0 is not None:
127 if self not in self._blockOutputType0._metaBlockOutput0:
128 self._blockOutputType0._metaBlockOutput0.append(self)
130 blockOutputType0 = property(getblockOutputType0, setblockOutputType0)