Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Dynamics / SlotConnection.py
blob0856a42710932765a34d0b3b313e0185d1f53d43
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 SlotConnection(IdentifiedObject):
24 """Standard connectivity if not specified at the instance level..
25 """
27 def __init__(self, connectionFrame0=None, slotInput0=None, slotOutput0=None, *args, **kw_args):
28 """Initialises a new 'SlotConnection' instance.
30 @param connectionFrame0:
31 @param slotInput0:
32 @param slotOutput0:
33 """
34 self._connectionFrame0 = None
35 self.connectionFrame0 = connectionFrame0
37 self._slotInput0 = None
38 self.slotInput0 = slotInput0
40 self._slotOutput0 = None
41 self.slotOutput0 = slotOutput0
43 super(SlotConnection, self).__init__(*args, **kw_args)
45 _attrs = []
46 _attr_types = {}
47 _defaults = {}
48 _enums = {}
49 _refs = ["connectionFrame0", "slotInput0", "slotOutput0"]
50 _many_refs = []
52 def getconnectionFrame0(self):
54 return self._connectionFrame0
56 def setconnectionFrame0(self, value):
57 if self._connectionFrame0 is not None:
58 filtered = [x for x in self.connectionFrame0.slotConnection0 if x != self]
59 self._connectionFrame0._slotConnection0 = filtered
61 self._connectionFrame0 = value
62 if self._connectionFrame0 is not None:
63 if self not in self._connectionFrame0._slotConnection0:
64 self._connectionFrame0._slotConnection0.append(self)
66 connectionFrame0 = property(getconnectionFrame0, setconnectionFrame0)
68 def getslotInput0(self):
70 return self._slotInput0
72 def setslotInput0(self, value):
73 if self._slotInput0 is not None:
74 self._slotInput0._slotConnection0 = None
76 self._slotInput0 = value
77 if self._slotInput0 is not None:
78 self._slotInput0.slotConnection0 = None
79 self._slotInput0._slotConnection0 = self
81 slotInput0 = property(getslotInput0, setslotInput0)
83 def getslotOutput0(self):
85 return self._slotOutput0
87 def setslotOutput0(self, value):
88 if self._slotOutput0 is not None:
89 filtered = [x for x in self.slotOutput0.slotConnection0 if x != self]
90 self._slotOutput0._slotConnection0 = filtered
92 self._slotOutput0 = value
93 if self._slotOutput0 is not None:
94 if self not in self._slotOutput0._slotConnection0:
95 self._slotOutput0._slotConnection0.append(self)
97 slotOutput0 = property(getslotOutput0, setslotOutput0)