Adding CIM15 package.
[PyCIM.git] / CIM15 / IEC61970 / SCADA / RemoteControl.py
blobe889ffa7472984b4cd7a7880c23df15cbb73efb3
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 CIM15.IEC61970.SCADA.RemotePoint import RemotePoint
23 class RemoteControl(RemotePoint):
24 """Remote controls are ouputs that are sent by the remote unit to actuators in the process.Remote controls are ouputs that are sent by the remote unit to actuators in the process.
25 """
27 def __init__(self, actuatorMaximum=0.0, actuatorMinimum=0.0, remoteControlled=False, Control=None, *args, **kw_args):
28 """Initialises a new 'RemoteControl' instance.
30 @param actuatorMaximum: The maximum set point value accepted by the remote control point.
31 @param actuatorMinimum: The minimum set point value accepted by the remote control point.
32 @param remoteControlled: Set to true if the actuator is remotely controlled.
33 @param Control: The Control for the RemoteControl point.
34 """
35 #: The maximum set point value accepted by the remote control point.
36 self.actuatorMaximum = actuatorMaximum
38 #: The minimum set point value accepted by the remote control point.
39 self.actuatorMinimum = actuatorMinimum
41 #: Set to true if the actuator is remotely controlled.
42 self.remoteControlled = remoteControlled
44 self._Control = None
45 self.Control = Control
47 super(RemoteControl, self).__init__(*args, **kw_args)
49 _attrs = ["actuatorMaximum", "actuatorMinimum", "remoteControlled"]
50 _attr_types = {"actuatorMaximum": float, "actuatorMinimum": float, "remoteControlled": bool}
51 _defaults = {"actuatorMaximum": 0.0, "actuatorMinimum": 0.0, "remoteControlled": False}
52 _enums = {}
53 _refs = ["Control"]
54 _many_refs = []
56 def getControl(self):
57 """The Control for the RemoteControl point.
58 """
59 return self._Control
61 def setControl(self, value):
62 if self._Control is not None:
63 self._Control._RemoteControl = None
65 self._Control = value
66 if self._Control is not None:
67 self._Control.RemoteControl = None
68 self._Control._RemoteControl = self
70 Control = property(getControl, setControl)