diff --git a/RCUSCC-DS/RCUSCC.py b/RCUSCC-DS/RCUSCC.py new file mode 100644 index 0000000000000000000000000000000000000000..27536abade828e7f5505878883a976b6f37c925f --- /dev/null +++ b/RCUSCC-DS/RCUSCC.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +# +# This file is part of the RCUSCC project +# +# +# +# Distributed under the terms of the APACHE license. +# See LICENSE.txt for more info. + +""" RCU-SCC Device Server for LOFAR2.0 + +""" + +# PyTango imports +import tango +from tango import DebugIt +from tango.server import run +from tango.server import Device +from tango.server import command +from tango import AttrQuality, DispLevel, DevState +from tango import AttrWriteType, PipeWriteType +# Additional import +# PROTECTED REGION ID(RCUSCC.additionnal_import) ENABLED START # +# PROTECTED REGION END # // RCUSCC.additionnal_import + +__all__ = ["RCUSCC", "main"] + + +class RCUSCC(Device): + """ + """ + # PROTECTED REGION ID(RCUSCC.class_variable) ENABLED START # + # PROTECTED REGION END # // RCUSCC.class_variable + + # --------------- + # General methods + # --------------- + + def init_device(self): + """Initialises the attributes and properties of the RCUSCC.""" + Device.init_device(self) + # PROTECTED REGION ID(RCUSCC.init_device) ENABLED START # + # PROTECTED REGION END # // RCUSCC.init_device + + def always_executed_hook(self): + """Method always executed before any TANGO command is executed.""" + # PROTECTED REGION ID(RCUSCC.always_executed_hook) ENABLED START # + # PROTECTED REGION END # // RCUSCC.always_executed_hook + + def delete_device(self): + """Hook to delete resources allocated in init_device. + + This method allows for any memory or other resources allocated in the + init_device method to be released. This method is called by the device + destructor and by the device Init command. + """ + # PROTECTED REGION ID(RCUSCC.delete_device) ENABLED START # + # PROTECTED REGION END # // RCUSCC.delete_device + # -------- + # Commands + # -------- + +# ---------- +# Run server +# ---------- + + +def main(args=None, **kwargs): + """Main function of the RCUSCC module.""" + # PROTECTED REGION ID(RCUSCC.main) ENABLED START # + return run((RCUSCC,), args=args, **kwargs) + # PROTECTED REGION END # // RCUSCC.main + + +if __name__ == '__main__': + main() diff --git a/RCUSCC-DS/RCUSCC.xmi b/RCUSCC-DS/RCUSCC.xmi new file mode 100644 index 0000000000000000000000000000000000000000..7cc84cea78d1aad76f89003bfc8f129adb7830a9 --- /dev/null +++ b/RCUSCC-DS/RCUSCC.xmi @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="ASCII"?> +<pogoDsl:PogoSystem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pogoDsl="http://www.esrf.fr/tango/pogo/PogoDsl"> + <classes name="RCUSCC" pogoRevision="9.6"> + <description description="" title="RCU-SCC Device Server for LOFAR2.0" sourcePath="/opt/tango/RCUSCC-DS" language="PythonHL" filestogenerate="XMI file,Code files,Protected Regions" license="APACHE" copyright="" hasMandatoryProperty="false" hasConcreteProperty="false" hasAbstractCommand="false" hasAbstractAttribute="false"> + <inheritances classname="Device_Impl" sourcePath=""/> + <identification contact="at astron.nl - jurges" author="jurges" emailDomain="astron.nl" classFamily="OtherInstruments" siteSpecific="" platform="Unix Like" bus="Socket" manufacturer="ASTRON" reference=""/> + </description> + <commands name="State" description="This command gets the device state (stored in its device_state data member) and returns it to the caller." execMethod="dev_state" displayLevel="OPERATOR" polledPeriod="0"> + <argin description="none"> + <type xsi:type="pogoDsl:VoidType"/> + </argin> + <argout description="Device state"> + <type xsi:type="pogoDsl:StateType"/> + </argout> + <status abstract="true" inherited="true" concrete="true"/> + </commands> + <commands name="Status" description="This command gets the device status (stored in its device_status data member) and returns it to the caller." execMethod="dev_status" displayLevel="OPERATOR" polledPeriod="0"> + <argin description="none"> + <type xsi:type="pogoDsl:VoidType"/> + </argin> + <argout description="Device status"> + <type xsi:type="pogoDsl:ConstStringType"/> + </argout> + <status abstract="true" inherited="true" concrete="true"/> + </commands> + <preferences docHome="./doc_html" makefileHome="/usr/local/share/pogo/preferences"/> + </classes> +</pogoDsl:PogoSystem>