diff --git a/StatsCrosslet-DS/StatsCrosslet.py b/StatsCrosslet-DS/StatsCrosslet.py index 2e0bb6ebe0b8b811971c50d1acc04d17ab172564..335c3783e217f4e91d15f4ac1468832127af67bc 100644 --- a/StatsCrosslet-DS/StatsCrosslet.py +++ b/StatsCrosslet-DS/StatsCrosslet.py @@ -44,6 +44,12 @@ class StatsCrosslet(Device): - Type:'DevULong' OPC_time_out - Type:'DevULong' + Default_pause_time + - Type:'DevDouble' + Default_subband + - Type:'DevULong' + Default_integration_time + - Type:'DevDouble' """ # PROTECTED REGION ID(StatsCrosslet.class_variable) ENABLED START # client = 0 @@ -97,6 +103,21 @@ class StatsCrosslet(Device): default_value=1000 ) + Default_pause_time = device_property( + dtype='DevDouble', + default_value=60.0 + ) + + Default_subband = device_property( + dtype='DevULong', + default_value=150 + ) + + Default_integration_time = device_property( + dtype='DevDouble', + default_value=1.0 + ) + # ---------- # Attributes # ---------- @@ -158,6 +179,12 @@ class StatsCrosslet(Device): ns = self.client.get_namespace_index("http://lofar.eu") self.obj = self.client.get_root_node().get_child(["0:Objects", "{}:StationMetrics".format(ns), "{}:RCU".format(ns)]) self.record_cross = "{}:record_cross".format(ns) + + # Set default values in the read/write attributes + self._pause_time = self.Default_pause_time + self._integration_time = self.Default_integration_time + self._subband = self.Default_subband + self.data_read_loop = threading.Thread(target = self.read_data) self.data_acquisition_is_active.set() self.stop_data_read_loop.clear() diff --git a/StatsCrosslet-DS/StatsCrosslet.xmi b/StatsCrosslet-DS/StatsCrosslet.xmi index 884ebb33d7a932c094ea3b0dde400bb1f1742cc3..6f8c58792b62da04082999815a368f304d9cdead 100644 --- a/StatsCrosslet-DS/StatsCrosslet.xmi +++ b/StatsCrosslet-DS/StatsCrosslet.xmi @@ -20,6 +20,21 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <DefaultPropValue>1000</DefaultPropValue> </deviceProperties> + <deviceProperties name="Default_pause_time" description=""> + <type xsi:type="pogoDsl:DoubleType"/> + <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> + <DefaultPropValue>60.0</DefaultPropValue> + </deviceProperties> + <deviceProperties name="Default_subband" description=""> + <type xsi:type="pogoDsl:UIntType"/> + <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> + <DefaultPropValue>150</DefaultPropValue> + </deviceProperties> + <deviceProperties name="Default_integration_time" description=""> + <type xsi:type="pogoDsl:DoubleType"/> + <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> + <DefaultPropValue>1.0</DefaultPropValue> + </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"/>