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
21 from CIM14
.IEC61970
.Core
.IdentifiedObject
import IdentifiedObject
23 class MetaBlockConSignal(IdentifiedObject
):
25 def __init__(self
, MetaBlockConInput
=None, MemberOf_MetaBlockConnectivity
=None, MetaBlockConOutput
=None, metaBlockConnectivity0
=None, *args
, **kw_args
):
26 """Initialises a new 'MetaBlockConSignal' instance.
28 @param MetaBlockConInput:
29 @param MemberOf_MetaBlockConnectivity:
30 @param MetaBlockConOutput:
31 @param metaBlockConnectivity0:
33 self
._MetaBlockConInput
= None
34 self
.MetaBlockConInput
= MetaBlockConInput
36 self
._MemberOf
_MetaBlockConnectivity
= None
37 self
.MemberOf_MetaBlockConnectivity
= MemberOf_MetaBlockConnectivity
39 self
._MetaBlockConOutput
= None
40 self
.MetaBlockConOutput
= MetaBlockConOutput
42 self
._metaBlockConnectivity
0 = None
43 self
.metaBlockConnectivity0
= metaBlockConnectivity0
45 super(MetaBlockConSignal
, self
).__init
__(*args
, **kw_args
)
51 _refs
= ["MetaBlockConInput", "MemberOf_MetaBlockConnectivity", "MetaBlockConOutput", "metaBlockConnectivity0"]
54 def getMetaBlockConInput(self
):
56 return self
._MetaBlockConInput
58 def setMetaBlockConInput(self
, value
):
59 if self
._MetaBlockConInput
is not None:
60 self
._MetaBlockConInput
._MetaBlockConSignal
= None
62 self
._MetaBlockConInput
= value
63 if self
._MetaBlockConInput
is not None:
64 self
._MetaBlockConInput
.MetaBlockConSignal
= None
65 self
._MetaBlockConInput
._MetaBlockConSignal
= self
67 MetaBlockConInput
= property(getMetaBlockConInput
, setMetaBlockConInput
)
69 def getMemberOf_MetaBlockConnectivity(self
):
71 return self
._MemberOf
_MetaBlockConnectivity
73 def setMemberOf_MetaBlockConnectivity(self
, value
):
74 if self
._MemberOf
_MetaBlockConnectivity
is not None:
75 filtered
= [x
for x
in self
.MemberOf_MetaBlockConnectivity
.MetaBlockConSignal
if x
!= self
]
76 self
._MemberOf
_MetaBlockConnectivity
._MetaBlockConSignal
= filtered
78 self
._MemberOf
_MetaBlockConnectivity
= value
79 if self
._MemberOf
_MetaBlockConnectivity
is not None:
80 if self
not in self
._MemberOf
_MetaBlockConnectivity
._MetaBlockConSignal
:
81 self
._MemberOf
_MetaBlockConnectivity
._MetaBlockConSignal
.append(self
)
83 MemberOf_MetaBlockConnectivity
= property(getMemberOf_MetaBlockConnectivity
, setMemberOf_MetaBlockConnectivity
)
85 def getMetaBlockConOutput(self
):
87 return self
._MetaBlockConOutput
89 def setMetaBlockConOutput(self
, value
):
90 if self
._MetaBlockConOutput
is not None:
91 filtered
= [x
for x
in self
.MetaBlockConOutput
.MetaBlockConSignal
if x
!= self
]
92 self
._MetaBlockConOutput
._MetaBlockConSignal
= filtered
94 self
._MetaBlockConOutput
= value
95 if self
._MetaBlockConOutput
is not None:
96 if self
not in self
._MetaBlockConOutput
._MetaBlockConSignal
:
97 self
._MetaBlockConOutput
._MetaBlockConSignal
.append(self
)
99 MetaBlockConOutput
= property(getMetaBlockConOutput
, setMetaBlockConOutput
)
101 def getmetaBlockConnectivity0(self
):
103 return self
._metaBlockConnectivity
0
105 def setmetaBlockConnectivity0(self
, value
):
106 if self
._metaBlockConnectivity
0 is not None:
107 filtered
= [x
for x
in self
.metaBlockConnectivity0
.metaBlockConSignal0
if x
!= self
]
108 self
._metaBlockConnectivity
0._metaBlockConSignal
0 = filtered
110 self
._metaBlockConnectivity
0 = value
111 if self
._metaBlockConnectivity
0 is not None:
112 if self
not in self
._metaBlockConnectivity
0._metaBlockConSignal
0:
113 self
._metaBlockConnectivity
0._metaBlockConSignal
0.append(self
)
115 metaBlockConnectivity0
= property(getmetaBlockConnectivity0
, setmetaBlockConnectivity0
)