fixups
Change-Id: If1377ef41f8d500ccab0e2a0979343b4c090c036
This commit is contained in:
@ -59,8 +59,15 @@ Merge datatype and validator
|
|||||||
* ["string", <maximum_allowed_length>] or ["string", <max_size_in_bytes>, <minimum_size_in_bytes>]
|
* ["string", <maximum_allowed_length>] or ["string", <max_size_in_bytes>, <minimum_size_in_bytes>]
|
||||||
* ["array", <basic_data_type>, <max_elements>] or ["array", <dtype>, <max_elements>, <min_elements>]
|
* ["array", <basic_data_type>, <max_elements>] or ["array", <dtype>, <max_elements>, <min_elements>]
|
||||||
|
|
||||||
|
|
||||||
Interface_class
|
Interface_class
|
||||||
+++++++++++++++
|
+++++++++++++++
|
||||||
|
|
||||||
* Drivable, Writable, Readable, Module (first character uppercase, no middle 'e')
|
* Drivable, Writable, Readable, Module (first character uppercase, no middle 'e')
|
||||||
|
|
||||||
|
|
||||||
|
transfer_of_blob
|
||||||
|
++++++++++++++++
|
||||||
|
|
||||||
|
* transport-encoding as base64-encoded string (no prefixed number of bytes....)
|
||||||
|
|
||||||
|
@ -200,3 +200,18 @@ Examples
|
|||||||
(SEC-node) 'update T1 [3.49,{"t":"149128945.921397","e":0.01897}]'
|
(SEC-node) 'update T1 [3.49,{"t":"149128945.921397","e":0.01897}]'
|
||||||
...
|
...
|
||||||
|
|
||||||
|
merge datatype and validator:
|
||||||
|
-----------------------------
|
||||||
|
* enum, int, double, bool, tuple, struct as before
|
||||||
|
* ["blob", <maximum_size_in_bytes>] or ["blob", <maximum_size_in_bytes>, <minimum_size_in_bytes>]
|
||||||
|
* ["string", <maximum_allowed_length>] or ["string", <max_size_in_bytes>, <minimum_size_in_bytes>]
|
||||||
|
* ["array", <basic_data_type>, <max_elements>] or ["array", <dtype>, <max_elements>, <min_elements>]
|
||||||
|
|
||||||
|
interface_class
|
||||||
|
---------------
|
||||||
|
* Drivable, Writable, Readable, Module (first character uppercase, no middle 'e')
|
||||||
|
|
||||||
|
transfer_of_blob
|
||||||
|
----------------
|
||||||
|
* transport-encoding as base64-encoded string (no prefixed number of bytes....)
|
||||||
|
|
||||||
|
@ -5,6 +5,10 @@ description = short description
|
|||||||
|
|
||||||
This is a very long description providing all the glory details in all the glory details about the stuff we are describing
|
This is a very long description providing all the glory details in all the glory details about the stuff we are describing
|
||||||
|
|
||||||
|
.description = short description
|
||||||
|
|
||||||
|
This is a very long description providing all the glory details in all the glory details about the stuff we are describing
|
||||||
|
|
||||||
|
|
||||||
[interface tcp]
|
[interface tcp]
|
||||||
interface=tcp
|
interface=tcp
|
||||||
@ -18,6 +22,9 @@ encoding=demo
|
|||||||
[device cryo]
|
[device cryo]
|
||||||
# some (non-defaut) module properties
|
# some (non-defaut) module properties
|
||||||
.group=very important/stuff
|
.group=very important/stuff
|
||||||
|
.description=A simulated cc cryostat with heat-load, specific heat for the sample
|
||||||
|
and a temperature dependend heat-link between sample and regulation.
|
||||||
|
|
||||||
# class of module:
|
# class of module:
|
||||||
class=secop_demo.cryo.Cryostat
|
class=secop_demo.cryo.Cryostat
|
||||||
|
|
||||||
|
@ -52,6 +52,8 @@ class TCPConnection(object):
|
|||||||
# disguise a TCP connection as serial one
|
# disguise a TCP connection as serial one
|
||||||
|
|
||||||
def __init__(self, host, port):
|
def __init__(self, host, port):
|
||||||
|
import mlzlog
|
||||||
|
self.log = mlzlog.getLogger('TCPConnection')
|
||||||
self._host = host
|
self._host = host
|
||||||
self._port = int(port)
|
self._port = int(port)
|
||||||
self._thread = None
|
self._thread = None
|
||||||
|
@ -43,6 +43,7 @@ class NodeCtrl(QWidget):
|
|||||||
self.contactPointLabel.setText(self._node.contactPoint)
|
self.contactPointLabel.setText(self._node.contactPoint)
|
||||||
self.equipmentIdLabel.setText(self._node.equipmentId)
|
self.equipmentIdLabel.setText(self._node.equipmentId)
|
||||||
self.protocolVersionLabel.setText(self._node.protocolVersion)
|
self.protocolVersionLabel.setText(self._node.protocolVersion)
|
||||||
|
self.nodeDescriptionLabel.setText(self._node.describingData.get('description','no description available'))
|
||||||
self._clearLog()
|
self._clearLog()
|
||||||
|
|
||||||
# now populate modules tab
|
# now populate modules tab
|
||||||
@ -197,7 +198,9 @@ class ReadableWidget(QWidget):
|
|||||||
if pname in params:
|
if pname in params:
|
||||||
return params[pname].value
|
return params[pname].value
|
||||||
try:
|
try:
|
||||||
return self._node.getParameter(self._module, pname)
|
# if queried, we get the qualifiers as well, but don't want them here
|
||||||
|
val = self._node.getParameter(self._module, pname)[0]
|
||||||
|
return val
|
||||||
except Exception:
|
except Exception:
|
||||||
self.log.exception()
|
self.log.exception()
|
||||||
if fallback is not Ellipsis:
|
if fallback is not Ellipsis:
|
||||||
|
@ -20,6 +20,68 @@
|
|||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="consoleTab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Console</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QTextBrowser" name="logTextBrowser">
|
||||||
|
<property name="html">
|
||||||
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'Noto Sans'; font-size:12pt; font-weight:400; font-style:normal;">
|
||||||
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:11pt;"><br /></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QPushButton" name="clearPushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Clear</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="msgLineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>>>></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QPushButton" name="sendPushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Send</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="default">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="nodeInfoTab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>NodeInfo</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
@ -82,63 +144,48 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="3" column="0">
|
||||||
</item>
|
<widget class="QLabel" name="label_5">
|
||||||
<item row="1" column="0">
|
<property name="font">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<font>
|
||||||
<property name="currentIndex">
|
<weight>75</weight>
|
||||||
<number>1</number>
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="consoleTab">
|
<property name="text">
|
||||||
<attribute name="title">
|
<string>Description:</string>
|
||||||
<string>Console</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QTextBrowser" name="logTextBrowser">
|
|
||||||
<property name="html">
|
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'Noto Sans'; font-size:12pt; font-weight:400; font-style:normal;">
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:11pt;"><br /></p></body></html></string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="4" column="0" colspan="2">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<widget class="QLabel" name="nodeDescriptionLabel">
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QPushButton" name="clearPushButton">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Clear</string>
|
<string>Description
|
||||||
|
long line</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="wordWrap">
|
||||||
</item>
|
<bool>true</bool>
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="msgLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>>>></string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="textInteractionFlags">
|
||||||
</item>
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QPushButton" name="sendPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Send</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="default">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="modulesTab">
|
<widget class="QWidget" name="modulesTab">
|
||||||
@ -160,7 +207,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>610</width>
|
<width>610</width>
|
||||||
<height>324</height>
|
<height>413</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
|
@ -33,7 +33,7 @@ from secop.lib.sequence import SequencerMixin, Step
|
|||||||
from secop.protocol import status
|
from secop.protocol import status
|
||||||
from secop.datatypes import *
|
from secop.datatypes import *
|
||||||
from secop.errors import SECoPServerError, ConfigError, ProgrammingError, CommunicationError, HardwareError, DisabledError
|
from secop.errors import SECoPServerError, ConfigError, ProgrammingError, CommunicationError, HardwareError, DisabledError
|
||||||
from secop.modules import PARAM, CMD, OVERRIDE, Module, Readable, Drivable
|
from secop.modules import PARAM, CMD, OVERRIDE, Readable, Drivable
|
||||||
|
|
||||||
|
|
||||||
class GarfieldMagnet(SequencerMixin, Drivable):
|
class GarfieldMagnet(SequencerMixin, Drivable):
|
||||||
|
Reference in New Issue
Block a user