1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14
.IEC61970
.Core
.IdentifiedObject
import IdentifiedObject
19 class SlotInput(IdentifiedObject
):
21 def __init__(self
, blockInputType0
=None, slotConnection0
=None, slot0
=None, *args
, **kw_args
):
22 """Initialises a new 'SlotInput' instance.
24 @param blockInputType0:
25 @param slotConnection0:
28 self
._blockInputType
0 = None
29 self
.blockInputType0
= blockInputType0
31 self
._slotConnection
0 = None
32 self
.slotConnection0
= slotConnection0
37 super(SlotInput
, self
).__init
__(*args
, **kw_args
)
43 _refs
= ["blockInputType0", "slotConnection0", "slot0"]
46 def getblockInputType0(self
):
48 return self
._blockInputType
0
50 def setblockInputType0(self
, value
):
51 if self
._blockInputType
0 is not None:
52 filtered
= [x
for x
in self
.blockInputType0
.slotInput0
if x
!= self
]
53 self
._blockInputType
0._slotInput
0 = filtered
55 self
._blockInputType
0 = value
56 if self
._blockInputType
0 is not None:
57 self
._blockInputType
0._slotInput
0.append(self
)
59 blockInputType0
= property(getblockInputType0
, setblockInputType0
)
61 def getslotConnection0(self
):
63 return self
._slotConnection
0
65 def setslotConnection0(self
, value
):
66 if self
._slotConnection
0 is not None:
67 self
._slotConnection
0._slotInput
0 = None
69 self
._slotConnection
0 = value
70 if self
._slotConnection
0 is not None:
71 self
._slotConnection
0._slotInput
0 = self
73 slotConnection0
= property(getslotConnection0
, setslotConnection0
)
79 def setslot0(self
, value
):
80 if self
._slot
0 is not None:
81 filtered
= [x
for x
in self
.slot0
.slotInput0
if x
!= self
]
82 self
._slot
0._slotInput
0 = filtered
85 if self
._slot
0 is not None:
86 self
._slot
0._slotInput
0.append(self
)
88 slot0
= property(getslot0
, setslot0
)