Implementing RDF/XML serialisation using meta-data attributes.
[PyCIM.git] / schemata / CIM14 / IEC61970 / SCADA / RemoteControl.py
bloba86b37eda46589dc63d88a7769e8e6732658a7f6
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.SCADA.RemotePoint import RemotePoint
19 class RemoteControl(RemotePoint):
20 """Remote controls are ouputs that are sent by the remote unit to actuators in the process.
21 """
23 def __init__(self, actuatorMinimum=0.0, remoteControlled=False, actuatorMaximum=0.0, Control=None, *args, **kw_args):
24 """Initialises a new 'RemoteControl' instance.
26 @param actuatorMinimum: The minimum set point value accepted by the remote control point.
27 @param remoteControlled: Set to true if the actuator is remotely controlled.
28 @param actuatorMaximum: The maximum set point value accepted by the remote control point.
29 @param Control: The Control for the RemoteControl point.
30 """
31 #: The minimum set point value accepted by the remote control point.
32 self.actuatorMinimum = actuatorMinimum
34 #: Set to true if the actuator is remotely controlled.
35 self.remoteControlled = remoteControlled
37 #: The maximum set point value accepted by the remote control point.
38 self.actuatorMaximum = actuatorMaximum
40 self._Control = None
41 self.Control = Control
43 super(RemoteControl, self).__init__(*args, **kw_args)
45 _attrs = ["actuatorMinimum", "remoteControlled", "actuatorMaximum"]
46 _attr_types = {"actuatorMinimum": float, "remoteControlled": bool, "actuatorMaximum": float}
47 _defaults = {"actuatorMinimum": 0.0, "remoteControlled": False, "actuatorMaximum": 0.0}
48 _enums = {}
49 _refs = ["Control"]
50 _many_refs = []
52 def getControl(self):
53 """The Control for the RemoteControl point.
54 """
55 return self._Control
57 def setControl(self, value):
58 if self._Control is not None:
59 self._Control._RemoteControl = None
61 self._Control = value
62 if self._Control is not None:
63 self._Control._RemoteControl = self
65 Control = property(getControl, setControl)