Skip to content
Snippets Groups Projects
Commit bfafcc0c authored by Thomas Juerges's avatar Thomas Juerges
Browse files

Add dummy devices RCU_SCC_Manager and StationMaster

parent fa41bbfc
No related branches found
No related tags found
No related merge requests found
Showing
with 1426 additions and 0 deletions
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
recursive-include RCU_SCC_Manager *.py
recursive-include test *.py
include *.rst
include RCU_SCC_Manager.xmi
include *.txt
graft docs
global-exclude *.pyc
global-exclude *.pyo
<?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="RCU_SCC_Manager" pogoRevision="9.6">
<description description="" title="" sourcePath="/opt/tango/RCU_SCC_Manager" language="PythonHL" filestogenerate="XMI file,Code files,Python Package,Protected Regions" license="APACHE" copyright="" hasMandatoryProperty="false" hasConcreteProperty="false" hasAbstractCommand="false" hasAbstractAttribute="false">
<inheritances classname="Device_Impl" sourcePath=""/>
<inheritances classname="SKABaseDevice" sourcePath="../../SKA/lmc-base-classes/pogo"/>
<inheritances classname="SKAObsDevice" sourcePath="/opt/SKA/lmc-base-classes/pogo"/>
<identification contact="at astron.nl - jurges" author="jurges" emailDomain="astron.nl" classFamily="System" siteSpecific="" platform="All Platforms" bus="Ethernet" manufacturer="none" reference=""/>
</description>
<deviceProperties name="SkaLevel" description="Indication of importance of the device in the SKA hierarchy &#xA;to support drill-down navigation: 1..6, with 1 highest.&#xA;Default is 4, making provision for &#xA;EltMaster, EltAlarms, EltTelState = 1&#xA;SubEltMaster = 2&#xA;Subarray, Capability = 2/3&#xA;Others = 4 (or 5 or 6)">
<type xsi:type="pogoDsl:ShortType"/>
<status abstract="false" inherited="true" concrete="true"/>
<DefaultPropValue>4</DefaultPropValue>
</deviceProperties>
<deviceProperties name="LoggingLevelDefault" description="Default logging level at device startup.&#xA;(0=OFF, 1=FATAL, 2=ERROR, 3=WARNING, 4=INFO, 5=DEBUG)">
<type xsi:type="pogoDsl:UShortType"/>
<status abstract="false" inherited="true" concrete="true"/>
<DefaultPropValue>4</DefaultPropValue>
</deviceProperties>
<deviceProperties name="LoggingTargetsDefault" description="Default logging targets at device startup.&#xA;Each item has the format: target_type::target_name.&#xA;To log to stdout, use 'console::cout'.&#xA;To log to syslog, use 'syslog::&lt;address>',&#xA; where &lt;address> is a file path,&#xA; for example 'syslog::/var/run/rsyslog/dev/log'.&#xA;To log to a file, use 'file::&lt;path>',&#xA; where &lt;path> is a file path,&#xA; for example 'file::/tmp/my_dev.log'.">
<type xsi:type="pogoDsl:StringVectorType"/>
<status abstract="false" inherited="true" concrete="true"/>
</deviceProperties>
<deviceProperties name="GroupDefinitions" description="Each string in the list is a JSON serialised dict defining the ``group_name``,&#xA;``devices`` and ``subgroups`` in the group. A TANGO Group object is created&#xA;for each item in the list, according to the hierarchy defined. This provides&#xA;easy access to the managed devices in bulk, or individually.&#xA;&#xA;The general format of the list is as follows, with optional ``devices`` and&#xA;``subgroups`` keys:&#xA; [ {``group_name``: ``&lt;name>``,&#xA; ``devices``: [``&lt;dev name>``, ...]},&#xA; {``group_name``: ``&lt;name>``,&#xA; ``devices``: [``&lt;dev name>``, ``&lt;dev name>``, ...],&#xA; ``subgroups`` : [{&lt;nested group>},&#xA; {&lt;nested group>}, ...]},&#xA; ...&#xA; ]&#xA;&#xA;For example, a hierarchy of racks, servers and switches:&#xA; [ {``group_name``: ``servers``,&#xA; ``devices``: [``elt/server/1``, ``elt/server/2``,&#xA; ``elt/server/3``, ``elt/server/4``]},&#xA; {``group_name``: ``switches``,&#xA; ``devices``: [``elt/switch/A``, ``elt/switch/B``]},&#xA; {``group_name``: ``pdus``,&#xA; ``devices``: [``elt/pdu/rackA``, ``elt/pdu/rackB``]},&#xA; {``group_name``: ``racks``,&#xA; ``subgroups``: [&#xA; {``group_name``: ``rackA``,&#xA; ``devices``: [``elt/server/1``, ``elt/server/2``,&#xA; ``elt/switch/A``, ``elt/pdu/rackA``]},&#xA; {``group_name``: ``rackB``,&#xA; ``devices``: [``elt/server/3``, ``elt/server/4``,&#xA; ``elt/switch/B``, ``elt/pdu/rackB``],&#xA; ``subgroups``: []}&#xA; ]} ]">
<type xsi:type="pogoDsl:StringVectorType"/>
<status abstract="false" inherited="true" concrete="true"/>
</deviceProperties>
<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>
<commands name="GetVersionInfo" description="Array of version strings of all entities modelled by this device. &#xA;(One level down only)&#xA;Each string in the array lists the version info for one entity&#xA;managed by this device. &#xA;The first entry is version info for this TANGO Device itself.&#xA;The entities may be TANGO devices, or hardware LRUs or &#xA;anything else this devices manages/models.&#xA;The intention with this command is that it can provide more &#xA;detailed information than can be captured in the versionId &#xA;and buildState attributes, if necessary.&#xA;In the minimal case the GetVersionInfo will contain only the &#xA;versionId and buildState attributes of the next lower level&#xA;entities." execMethod="get_version_info" displayLevel="OPERATOR" polledPeriod="0">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="[ name: EltTelState">
<type xsi:type="pogoDsl:StringArrayType"/>
</argout>
<status abstract="false" inherited="true" concrete="true"/>
</commands>
<commands name="Reset" description="Reset device to its default state" execMethod="reset" displayLevel="OPERATOR" polledPeriod="0">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:LongStringArrayType"/>
</argout>
<status abstract="false" inherited="true" concrete="true"/>
</commands>
<attributes name="obsState" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<changeEvent fire="true" libCheckCriteria="true"/>
<archiveEvent fire="true" libCheckCriteria="true"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Observing State" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="obsMode" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Observing Mode" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="configurationProgress" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:UShortType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Percentage configuration progress" label="" unit="%" standardUnit="" displayUnit="" format="" maxValue="100" minValue="0" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="configurationDelayExpected" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:UShortType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Configuration delay expected in seconds" label="" unit="seconds" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="buildState" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:StringType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Build state of this device" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="versionId" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:StringType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Build state of this device" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="loggingLevel" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Current logging level for this device - initialises to LoggingLevelDefault on startup" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="healthState" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="The health state reported for this device. It interprets the current device condition &#xA;and condition of all managed devices to set this. Most possibly an aggregate attribute." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="adminMode" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<changeEvent fire="true" libCheckCriteria="true"/>
<archiveEvent fire="true" libCheckCriteria="true"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="The admin mode reported for this device. It may interpret the current device condition &#xA;and condition of all managed devices to set this. Most possibly an aggregate attribute." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="controlMode" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="The control mode of the device. REMOTE, LOCAL&#xA;TANGO Device accepts only from a &#x2018;local&#x2019; client and ignores commands and queries received from TM&#xA;or any other &#x2018;remote&#x2019; clients. The Local clients has to release LOCAL control before REMOTE clients&#xA;can take control again." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="simulationMode" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Reports the simulation mode of the device. Some devices may implement both modes,&#xA;while others will have simulators that set simulationMode to True while the real&#xA;devices always set simulationMode to False." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="testMode" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="The test mode of the device. &#xA;Either no test mode (empty string) or an indication of the test mode." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="loggingTargets" attType="Spectrum" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="3" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:StringType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Logging targets for this device, excluding ska_logging defaults - &#xA;initialises to LoggingTargetsDefault on startup" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<states name="ON" description="This state could have been called OK or OPERATIONAL. It means that the device is in its operational state. (E.g. the power supply is giving its nominal current, th motor is ON and ready to move, the instrument is operating). This state is modified by the Attribute alarm checking of the DeviceImpl:dev_state method. i.e. if the State is ON and one attribute has its quality factor to ATTR_WARNING or ATTR_ALARM, then the State is modified to ALARM.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="OFF" description="The device is in normal condition but is not active. E.g. the power supply main circuit breaker is open; the RF transmitter has no power etc...">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="FAULT" description="The device has a major failure that prevents it to work. For instance, A power supply has stopped due to over temperature A motor cannot move because it has fault conditions. Usually we cannot get out from this state without an intervention on the hardware or a reset command.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="INIT" description="This state is reserved to the starting phase of the device server. It means that the software is not fully operational and that the user must wait">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="ALARM" description="ALARM - The device is operating but&#xA;at least one of the attributes is out of range. It can be linked to alarm conditions set by attribute properties or a specific case. (E.g. temperature alarm on a stepper motor, end switch pressed on a stepper motor, up water level in a tank, etc....). In alarm, usually the device does its job, but the operator has to perform an action to avoid a bigger problem that may switch the state to FAULT.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="UNKNOWN" description="The device cannot retrieve its state. It is the case when there is a communication problem to the hardware (network cut, broken cable etc...) It could also represent an incoherent situation">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="STANDBY" description="Equates to LOW-POWER mode. This is the initial transition from INIT if the device supports a low-power mode. The device is not fully active but is ready to operate.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="DISABLE" description="The device cannot be switched ON for an external reason. E.g. the power supply has its door open, the safety conditions are not satisfactory to allow the device to operate.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<preferences docHome="./doc_html" makefileHome="/usr/local/share/pogo/preferences"/>
</classes>
</pogoDsl:PogoSystem>
# -*- coding: utf-8 -*-
#
# This file is part of the RCU_SCC_Manager project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
"""
"""
# PyTango imports
import tango
from tango import DebugIt
from tango.server import run
from tango.server import Device
from tango.server import attribute, command
from tango.server import device_property
from tango import AttrQuality, DispLevel, DevState
from tango import AttrWriteType, PipeWriteType
import enum
from SKAObsDevice import SKAObsDevice
# Additional import
# PROTECTED REGION ID(RCU_SCC_Manager.additionnal_import) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.additionnal_import
__all__ = ["RCU_SCC_Manager", "main"]
class RCU_SCC_Manager(SKAObsDevice):
"""
**Properties:**
- Device Property
"""
# PROTECTED REGION ID(RCU_SCC_Manager.class_variable) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.class_variable
# -----------------
# Device Properties
# -----------------
# ----------
# Attributes
# ----------
# ---------------
# General methods
# ---------------
def init_device(self):
"""Initialises the attributes and properties of the RCU_SCC_Manager."""
SKAObsDevice.init_device(self)
self.set_change_event("obsState", True, True)
self.set_archive_event("obsState", True, True)
self.set_change_event("adminMode", True, True)
self.set_archive_event("adminMode", True, True)
# PROTECTED REGION ID(RCU_SCC_Manager.init_device) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.init_device
def always_executed_hook(self):
"""Method always executed before any TANGO command is executed."""
# PROTECTED REGION ID(RCU_SCC_Manager.always_executed_hook) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.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(RCU_SCC_Manager.delete_device) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.delete_device
# ------------------
# Attributes methods
# ------------------
# --------
# Commands
# --------
# ----------
# Run server
# ----------
def main(args=None, **kwargs):
"""Main function of the RCU_SCC_Manager module."""
# PROTECTED REGION ID(RCU_SCC_Manager.main) ENABLED START #
return run((RCU_SCC_Manager,), args=args, **kwargs)
# PROTECTED REGION END # // RCU_SCC_Manager.main
if __name__ == '__main__':
main()
# -*- coding: utf-8 -*-
#
# This file is part of the RCU_SCC_Manager project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
"""
"""
from . import release
from .RCU_SCC_Manager import RCU_SCC_Manager, main
__version__ = release.version
__version_info__ = release.version_info
__author__ = release.author
# -*- coding: utf-8 -*-
#
# This file is part of the RCU_SCC_Manager project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
from RCU_SCC_Manager import main
main()
# -*- coding: utf-8 -*-
#
# This file is part of the RCU_SCC_Manager project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
"""Release information for Python Package"""
name = """tangods-rcu_scc_manager"""
version = "1.0.0"
version_info = version.split(".")
description = """"""
author = "jurges"
author_email = "jurges at astron.nl"
license = """APACHE"""
url = """www.tango-controls.org"""
copyright = """"""
##
## Requirement
- PyTango >= 8.1.6
- devicetest (for using tests)
- sphinx (for building sphinx documentation)
## Installation
Run python setup.py install
If you want to build sphinx documentation,
run python setup.py build_sphinx
If you want to pass the tests,
run python setup.py test
## Usage
Now you can start your device server in any
Terminal or console by calling it :
RCU_SCC_Manager instance_name
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of the RCU_SCC_Manager project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
import os
import sys
from setuptools import setup
setup_dir = os.path.dirname(os.path.abspath(__file__))
# make sure we use latest info from local code
sys.path.insert(0, setup_dir)
readme_filename = os.path.join(setup_dir, 'README.rst')
with open(readme_filename) as file:
long_description = file.read()
release_filename = os.path.join(setup_dir, 'RCU_SCC_Manager', 'release.py')
exec(open(release_filename).read())
pack = ['RCU_SCC_Manager']
setup(name=name,
version=version,
description='',
packages=pack,
include_package_data=True,
test_suite="test",
entry_points={'console_scripts':['RCU_SCC_Manager = RCU_SCC_Manager:main']},
author='jurges',
author_email='jurges at astron.nl',
license='APACHE',
long_description=long_description,
url='www.tango-controls.org',
platforms="All Platforms"
)
#########################################################################################
# -*- coding: utf-8 -*-
#
# This file is part of the RCU_SCC_Manager project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
#########################################################################################
"""Contain the tests for the ."""
# Path
import sys
import os
path = os.path.join(os.path.dirname(__file__), os.pardir)
sys.path.insert(0, os.path.abspath(path))
# Imports
import pytest
from mock import MagicMock
from PyTango import DevState
# PROTECTED REGION ID(RCU_SCC_Manager.test_additional_imports) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_additional_imports
# Device test case
@pytest.mark.usefixtures("tango_context", "initialize_device")
# PROTECTED REGION ID(RCU_SCC_Manager.test_RCU_SCC_Manager_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_RCU_SCC_Manager_decorators
class TestRCU_SCC_Manager(object):
"""Test case for packet generation."""
properties = {
'SkaLevel': '4',
'LoggingLevelDefault': '4',
'LoggingTargetsDefault': '',
'GroupDefinitions': '',
}
@classmethod
def mocking(cls):
"""Mock external libraries."""
# Example : Mock numpy
# cls.numpy = RCU_SCC_Manager.numpy = MagicMock()
# PROTECTED REGION ID(RCU_SCC_Manager.test_mocking) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_mocking
def test_properties(self, tango_context):
# Test the properties
# PROTECTED REGION ID(RCU_SCC_Manager.test_properties) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_properties
pass
# PROTECTED REGION ID(RCU_SCC_Manager.test_State_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_State_decorators
def test_State(self, tango_context):
"""Test for State"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_State) ENABLED START #
assert tango_context.device.State() == DevState.UNKNOWN
# PROTECTED REGION END # // RCU_SCC_Manager.test_State
# PROTECTED REGION ID(RCU_SCC_Manager.test_Status_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_Status_decorators
def test_Status(self, tango_context):
"""Test for Status"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_Status) ENABLED START #
assert tango_context.device.Status() == "The device is in UNKNOWN state."
# PROTECTED REGION END # // RCU_SCC_Manager.test_Status
# PROTECTED REGION ID(RCU_SCC_Manager.test_GetVersionInfo_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_GetVersionInfo_decorators
def test_GetVersionInfo(self, tango_context):
"""Test for GetVersionInfo"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_GetVersionInfo) ENABLED START #
assert tango_context.device.GetVersionInfo() == [""]
# PROTECTED REGION END # // RCU_SCC_Manager.test_GetVersionInfo
# PROTECTED REGION ID(RCU_SCC_Manager.test_Reset_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_Reset_decorators
def test_Reset(self, tango_context):
"""Test for Reset"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_Reset) ENABLED START #
assert tango_context.device.Reset() == [[0], [""]]
# PROTECTED REGION END # // RCU_SCC_Manager.test_Reset
# PROTECTED REGION ID(RCU_SCC_Manager.test_obsState_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_obsState_decorators
def test_obsState(self, tango_context):
"""Test for obsState"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_obsState) ENABLED START #
assert tango_context.device.obsState == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_obsState
# PROTECTED REGION ID(RCU_SCC_Manager.test_obsMode_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_obsMode_decorators
def test_obsMode(self, tango_context):
"""Test for obsMode"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_obsMode) ENABLED START #
assert tango_context.device.obsMode == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_obsMode
# PROTECTED REGION ID(RCU_SCC_Manager.test_configurationProgress_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_configurationProgress_decorators
def test_configurationProgress(self, tango_context):
"""Test for configurationProgress"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_configurationProgress) ENABLED START #
assert tango_context.device.configurationProgress == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_configurationProgress
# PROTECTED REGION ID(RCU_SCC_Manager.test_configurationDelayExpected_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_configurationDelayExpected_decorators
def test_configurationDelayExpected(self, tango_context):
"""Test for configurationDelayExpected"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_configurationDelayExpected) ENABLED START #
assert tango_context.device.configurationDelayExpected == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_configurationDelayExpected
# PROTECTED REGION ID(RCU_SCC_Manager.test_buildState_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_buildState_decorators
def test_buildState(self, tango_context):
"""Test for buildState"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_buildState) ENABLED START #
assert tango_context.device.buildState == ''
# PROTECTED REGION END # // RCU_SCC_Manager.test_buildState
# PROTECTED REGION ID(RCU_SCC_Manager.test_versionId_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_versionId_decorators
def test_versionId(self, tango_context):
"""Test for versionId"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_versionId) ENABLED START #
assert tango_context.device.versionId == ''
# PROTECTED REGION END # // RCU_SCC_Manager.test_versionId
# PROTECTED REGION ID(RCU_SCC_Manager.test_loggingLevel_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_loggingLevel_decorators
def test_loggingLevel(self, tango_context):
"""Test for loggingLevel"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_loggingLevel) ENABLED START #
assert tango_context.device.loggingLevel == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_loggingLevel
# PROTECTED REGION ID(RCU_SCC_Manager.test_healthState_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_healthState_decorators
def test_healthState(self, tango_context):
"""Test for healthState"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_healthState) ENABLED START #
assert tango_context.device.healthState == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_healthState
# PROTECTED REGION ID(RCU_SCC_Manager.test_adminMode_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_adminMode_decorators
def test_adminMode(self, tango_context):
"""Test for adminMode"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_adminMode) ENABLED START #
assert tango_context.device.adminMode == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_adminMode
# PROTECTED REGION ID(RCU_SCC_Manager.test_controlMode_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_controlMode_decorators
def test_controlMode(self, tango_context):
"""Test for controlMode"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_controlMode) ENABLED START #
assert tango_context.device.controlMode == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_controlMode
# PROTECTED REGION ID(RCU_SCC_Manager.test_simulationMode_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_simulationMode_decorators
def test_simulationMode(self, tango_context):
"""Test for simulationMode"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_simulationMode) ENABLED START #
assert tango_context.device.simulationMode == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_simulationMode
# PROTECTED REGION ID(RCU_SCC_Manager.test_testMode_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_testMode_decorators
def test_testMode(self, tango_context):
"""Test for testMode"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_testMode) ENABLED START #
assert tango_context.device.testMode == 0
# PROTECTED REGION END # // RCU_SCC_Manager.test_testMode
# PROTECTED REGION ID(RCU_SCC_Manager.test_loggingTargets_decorators) ENABLED START #
# PROTECTED REGION END # // RCU_SCC_Manager.test_loggingTargets_decorators
def test_loggingTargets(self, tango_context):
"""Test for loggingTargets"""
# PROTECTED REGION ID(RCU_SCC_Manager.test_loggingTargets) ENABLED START #
assert tango_context.device.loggingTargets == ('',)
# PROTECTED REGION END # // RCU_SCC_Manager.test_loggingTargets
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
recursive-include StationMaster *.py
recursive-include test *.py
include *.rst
include StationMaster.xmi
include *.txt
graft docs
global-exclude *.pyc
global-exclude *.pyo
##
## Requirement
- PyTango >= 8.1.6
- devicetest (for using tests)
- sphinx (for building sphinx documentation)
## Installation
Run python setup.py install
If you want to build sphinx documentation,
run python setup.py build_sphinx
If you want to pass the tests,
run python setup.py test
## Usage
Now you can start your device server in any
Terminal or console by calling it :
StationMaster instance_name
This diff is collapsed.
# -*- coding: utf-8 -*-
#
# This file is part of the StationMaster project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
"""
"""
# PyTango imports
import tango
from tango import DebugIt
from tango.server import run
from tango.server import Device
from tango.server import attribute, command
from tango.server import device_property
from tango import AttrQuality, DispLevel, DevState
from tango import AttrWriteType, PipeWriteType
import enum
from SKAMaster import SKAMaster
# Additional import
# PROTECTED REGION ID(StationMaster.additionnal_import) ENABLED START #
# PROTECTED REGION END # // StationMaster.additionnal_import
__all__ = ["StationMaster", "main"]
class StationMaster(SKAMaster):
"""
**Properties:**
- Device Property
"""
# PROTECTED REGION ID(StationMaster.class_variable) ENABLED START #
# PROTECTED REGION END # // StationMaster.class_variable
# -----------------
# Device Properties
# -----------------
# ----------
# Attributes
# ----------
# ---------------
# General methods
# ---------------
def init_device(self):
"""Initialises the attributes and properties of the StationMaster."""
SKAMaster.init_device(self)
self.set_change_event("adminMode", True, True)
self.set_archive_event("adminMode", True, True)
# PROTECTED REGION ID(StationMaster.init_device) ENABLED START #
# PROTECTED REGION END # // StationMaster.init_device
def always_executed_hook(self):
"""Method always executed before any TANGO command is executed."""
# PROTECTED REGION ID(StationMaster.always_executed_hook) ENABLED START #
# PROTECTED REGION END # // StationMaster.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(StationMaster.delete_device) ENABLED START #
# PROTECTED REGION END # // StationMaster.delete_device
# ------------------
# Attributes methods
# ------------------
# --------
# Commands
# --------
# ----------
# Run server
# ----------
def main(args=None, **kwargs):
"""Main function of the StationMaster module."""
# PROTECTED REGION ID(StationMaster.main) ENABLED START #
return run((StationMaster,), args=args, **kwargs)
# PROTECTED REGION END # // StationMaster.main
if __name__ == '__main__':
main()
# -*- coding: utf-8 -*-
#
# This file is part of the StationMaster project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
"""
"""
from . import release
from .StationMaster import StationMaster, main
__version__ = release.version
__version_info__ = release.version_info
__author__ = release.author
# -*- coding: utf-8 -*-
#
# This file is part of the StationMaster project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
from StationMaster import main
main()
# -*- coding: utf-8 -*-
#
# This file is part of the StationMaster project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
"""Release information for Python Package"""
name = """tangods-stationmaster"""
version = "1.0.0"
version_info = version.split(".")
description = """"""
author = "jurges"
author_email = "jurges at astron.nl"
license = """APACHE"""
url = """www.tango-controls.org"""
copyright = """"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of the StationMaster project
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
import os
import sys
from setuptools import setup
setup_dir = os.path.dirname(os.path.abspath(__file__))
# make sure we use latest info from local code
sys.path.insert(0, setup_dir)
readme_filename = os.path.join(setup_dir, 'README.rst')
with open(readme_filename) as file:
long_description = file.read()
release_filename = os.path.join(setup_dir, 'StationMaster', 'release.py')
exec(open(release_filename).read())
pack = ['StationMaster']
setup(name=name,
version=version,
description='',
packages=pack,
include_package_data=True,
test_suite="test",
entry_points={'console_scripts':['StationMaster = StationMaster:main']},
author='jurges',
author_email='jurges at astron.nl',
license='APACHE',
long_description=long_description,
url='www.tango-controls.org',
platforms="Unix Like"
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment