diff --git a/CDB/LOFAR_ConfigDb.json b/CDB/LOFAR_ConfigDb.json index 927cd08300020d8d70dfda97c89935abc2af8185..a992a3fa197b2e2d158d55ca57b3bdf7149bd733 100644 --- a/CDB/LOFAR_ConfigDb.json +++ b/CDB/LOFAR_ConfigDb.json @@ -195,26 +195,23 @@ "1" ] }, - "Temp_R": { + "State": { "event_period": [ "0" - ], - "format": [ - "%6.8f" - ], - "rel_change": [ - "-0.1", - "0.1" ] }, - "State": { + "Status": { "event_period": [ "0" ] }, - "Status": { + "Temperature_R": { "event_period": [ "0" + ], + "rel_change": [ + "-1", + "1" ] } }, @@ -233,49 +230,41 @@ ], "polled_attr": [ "attenuator1_r", - "0", + "60000", "attenuator1_rw", - "0", + "60000", "attenuator2_r", - "0", + "60000", "attenuator2_rw", - "0", + "60000", "attenuator3_r", - "0", + "60000", "attenuator3_rw", - "0", + "60000", "band1_r", - "0", + "60000", "band1_rw", - "0", + "60000", "band2_r", - "0", + "60000", "band2_rw", - "0", + "60000", "band3_r", - "0", + "60000", "band3_rw", - "0", - "dither1_frequency_r", - "0", - "dither1_frequency_rw", - "0", - "dither2_frequency_r", - "0", - "dither2_frequency_rw", - "0", + "60000", "led0_r", - "0", + "60000", "led0_rw", - "0", + "60000", "pwr_dig_r", - "0", - "temp_r", - "0", + "60000", "state", "1000", "status", - "1000" + "1000", + "temperature_r", + "60000" ] } } diff --git a/CDB/thomas_ConfigDb.json b/CDB/thomas_ConfigDb.json index 6888a539c76a7aaf7fccb91a5bee9d50cee274ae..7b3fbfe9d31a29ac65832edea0e3543691a39a21 100644 --- a/CDB/thomas_ConfigDb.json +++ b/CDB/thomas_ConfigDb.json @@ -195,26 +195,23 @@ "1" ] }, - "Temp_R": { + "State": { "event_period": [ "0" - ], - "format": [ - "%6.8f" - ], - "rel_change": [ - "-0.1", - "0.1" ] }, - "State": { + "Status": { "event_period": [ "0" ] }, - "Status": { + "Temperature_R": { "event_period": [ "0" + ], + "rel_change": [ + "-1", + "1" ] } }, @@ -233,49 +230,41 @@ ], "polled_attr": [ "attenuator1_r", - "0", + "60000", "attenuator1_rw", - "0", + "60000", "attenuator2_r", - "0", + "60000", "attenuator2_rw", - "0", + "60000", "attenuator3_r", - "0", + "60000", "attenuator3_rw", - "0", + "60000", "band1_r", - "0", + "60000", "band1_rw", - "0", + "60000", "band2_r", - "0", + "60000", "band2_rw", - "0", + "60000", "band3_r", - "0", + "60000", "band3_rw", - "0", - "dither1_frequency_r", - "0", - "dither1_frequency_rw", - "0", - "dither2_frequency_r", - "0", - "dither2_frequency_rw", - "0", + "60000", "led0_r", - "0", + "60000", "led0_rw", - "0", + "60000", "pwr_dig_r", - "0", - "temp_r", - "0", + "60000", "state", "1000", "status", - "1000" + "1000", + "temperature_r", + "60000" ] } } diff --git a/RCUSCC/RCUSCC/RCUSCC.py b/RCUSCC/RCUSCC/RCUSCC.py index 8460c7b44fc3ab0c487edb0a4793527a3eee2501..0f0c2bd51563ea70b4042b982e342a16c3730748 100644 --- a/RCUSCC/RCUSCC/RCUSCC.py +++ b/RCUSCC/RCUSCC/RCUSCC.py @@ -164,10 +164,10 @@ class RCUSCC(Device): dtype='DevLong64', ) -# Temp_R = attribute( -# dtype='DevDouble', -# ) -# + Temperature_R = attribute( + dtype='DevDouble', + ) + # --------------- @@ -221,17 +221,17 @@ class RCUSCC(Device): self._Band3_RW = 0 self.attribute_mapping["Band3_RW"] = {} -# self._Dither1_Frequency_R = 0 -# self.attribute_mapping["Dither1_Frequency_R"] = {} -# -# self._Dither1_Frequency_RW = 0 -# self.attribute_mapping["Dither1_Frequency_RW"] = {} -# -# self._Dither2_Frequency_R = 0 -# self.attribute_mapping["Dither2_Frequency_R"] = {} -# -# self._Dither2_Frequency_RW = 0 -# self.attribute_mapping["Dither2_Frequency_RW"] = {} + self._Dither1_Frequency_R = 0 + self.attribute_mapping["Dither1_Frequency_R"] = {} + + self._Dither1_Frequency_RW = 0 + self.attribute_mapping["Dither1_Frequency_RW"] = {} + + self._Dither2_Frequency_R = 0 + self.attribute_mapping["Dither2_Frequency_R"] = {} + + self._Dither2_Frequency_RW = 0 + self.attribute_mapping["Dither2_Frequency_RW"] = {} self._LED0_R = 0 self.attribute_mapping["LED0_R"] = {} @@ -242,9 +242,9 @@ class RCUSCC(Device): self._Pwr_dig_R = 0 self.attribute_mapping["Pwr_dig_R"] = {} -# self._Temp_R = 0 -# self.attribute_mapping["Temp_R"] = {} -# + self._Temperature_R = 0 + self.attribute_mapping["Temperature_R"] = {} + # Set defaults to property values. @@ -291,11 +291,11 @@ class RCUSCC(Device): self.attribute_mapping["Band3_RW"] = self.pcc_node.get_child(["{}:RCU{:02d}_Band3_RW".format(self.name_space_index, self.RCU)]) # self.attribute_mapping["Dither1_Frequency_R"] = self.pcc_node.get_child(["{}:RCU{:02d}_Dither1_Frequency_R".format(self.name_space_index, self.RCU)]) -# + # self.attribute_mapping["Dither1_Frequency_RW"] = self.pcc_node.get_child(["{}:RCU{:02d}_Dither1_Frequency_RW".format(self.name_space_index, self.RCU)]) -# + # self.attribute_mapping["Dither2_Frequency_R"] = self.pcc_node.get_child(["{}:RCU{:02d}_Dither2_Frequency_R".format(self.name_space_index, self.RCU)]) -# + # self.attribute_mapping["Dither2_Frequency_RW"] = self.pcc_node.get_child(["{}:RCU{:02d}_Dither2_Frequency_RW".format(self.name_space_index, self.RCU)]) self.attribute_mapping["LED0_R"] = self.pcc_node.get_child(["{}:RCU{:02d}_LED0_R".format(self.name_space_index, self.RCU)]) @@ -304,11 +304,11 @@ class RCUSCC(Device): self.attribute_mapping["Pwr_dig_R"] = self.pcc_node.get_child(["{}:RCU{:02d}_Pwr_dig_R".format(self.name_space_index, self.RCU)]) -# self.attribute_mapping["Temp_R"] = self.pcc_node.get_child(["{}:RCU{:02d}_Temp_R".format(self.name_space_index, self.RCU)]) -# -# self.attribute_mapping["RCU_off"] = self.pcc_node.get_child(["{}:RCU{:02d}_RCU_off".format(self.name_space_index, self.RCU)]) -# -# self.attribute_mapping["RCU_on"] = self.pcc_node.get_child(["{}:RCU{:02d}_RCU_on".format(self.name_space_index, self.RCU)]) + self.attribute_mapping["Temperature_R"] = self.pcc_node.get_child(["{}:RCU{:02d}_Temperature_R".format(self.name_space_index, self.RCU)]) + + self.attribute_mapping["RCU_off"] = self.pcc_node.get_child(["{}:RCU{:02d}_RCU_off".format(self.name_space_index, self.RCU)]) + + self.attribute_mapping["RCU_on"] = self.pcc_node.get_child(["{}:RCU{:02d}_RCU_on".format(self.name_space_index, self.RCU)]) self.debug_stream("Mapping OPC-UA MP/CP to attributes done.") @@ -469,47 +469,47 @@ class RCUSCC(Device): self._Band3_RW = value # PROTECTED REGION END # // RCUSCC.Band3_RW_write -# def read_Dither1_Frequency_R(self): -# # PROTECTED REGION ID(RCUSCC.Dither1_Frequency_R_read) ENABLED START # -# """Return the Dither1_Frequency_R attribute.""" -# self._Dither1_Frequency_R = self.attribute_mapping["Dither1_Frequency_R"].get_value() -# return self._Dither1_Frequency_R -# # PROTECTED REGION END # // RCUSCC.Dither1_Frequency_R_read -# -# def read_Dither1_Frequency_RW(self): -# # PROTECTED REGION ID(RCUSCC.Dither1_Frequency_RW_read) ENABLED START # -# """Return the Dither1_Frequency_R attribute.""" -# self._Dither1_Frequency_RW = self.attribute_mapping["Dither1_Frequency_RW"].get_value() -# return self._Dither1_Frequency_RW -# # PROTECTED REGION END # // RCUSCC.Dither1_Frequency_RW_read -# -# def write_Dither1_Frequency_RW(self, value): -# # PROTECTED REGION ID(RCUSCC.Dither1_Frequency_RW_write) ENABLED START # -# """Set the Dither1_Frequency_RW attribute.""" -# self.attribute_mapping["Dither1_Frequency_RW"].set_value(value) -# self._Dither1_Frequency_RW = value -# # PROTECTED REGION END # // RCUSCC.Dither1_Frequency_RW_write -# -# def read_Dither2_Frequency_R(self): -# # PROTECTED REGION ID(RCUSCC.Dither2_Frequency_R_read) ENABLED START # -# """Return the Dither2_Frequency_R attribute.""" -# self._Dither2_Frequency_R = self.attribute_mapping["Dither2_Frequency_R"].get_value() -# return self._Dither2_Frequency_R -# # PROTECTED REGION END # // RCUSCC.Dither2_Frequency_R_read -# -# def read_Dither2_Frequency_RW(self): -# # PROTECTED REGION ID(RCUSCC.Dither2_Frequency_RW_read) ENABLED START # -# """Return the Dither2_Frequency_R attribute.""" -# self._Dither2_Frequency_RW = self.attribute_mapping["Dither2_Frequency_RW"].get_value() -# return self._Dither2_Frequency_RW -# # PROTECTED REGION END # // RCUSCC.Dither2_Frequency_RW_read -# -# def write_Dither2_Frequency_RW(self, value): -# # PROTECTED REGION ID(RCUSCC.Dither2_Frequency_RW_write) ENABLED START # -# """Set the Dither2_Frequency_RW attribute.""" -# self.attribute_mapping["Dither2_Frequency_RW"].set_value(value) -# self._Dither2_Frequency_RW = value -# # PROTECTED REGION END # // RCUSCC.Dither2_Frequency_RW_write + def read_Dither1_Frequency_R(self): + # PROTECTED REGION ID(RCUSCC.Dither1_Frequency_R_read) ENABLED START # + """Return the Dither1_Frequency_R attribute.""" + self._Dither1_Frequency_R = self.attribute_mapping["Dither1_Frequency_R"].get_value() + return self._Dither1_Frequency_R + # PROTECTED REGION END # // RCUSCC.Dither1_Frequency_R_read + + def read_Dither1_Frequency_RW(self): + # PROTECTED REGION ID(RCUSCC.Dither1_Frequency_RW_read) ENABLED START # + """Return the Dither1_Frequency_R attribute.""" + self._Dither1_Frequency_RW = self.attribute_mapping["Dither1_Frequency_RW"].get_value() + return self._Dither1_Frequency_RW + # PROTECTED REGION END # // RCUSCC.Dither1_Frequency_RW_read + + def write_Dither1_Frequency_RW(self, value): + # PROTECTED REGION ID(RCUSCC.Dither1_Frequency_RW_write) ENABLED START # + """Set the Dither1_Frequency_RW attribute.""" + self.attribute_mapping["Dither1_Frequency_RW"].set_value(value) + self._Dither1_Frequency_RW = value + # PROTECTED REGION END # // RCUSCC.Dither1_Frequency_RW_write + + def read_Dither2_Frequency_R(self): + # PROTECTED REGION ID(RCUSCC.Dither2_Frequency_R_read) ENABLED START # + """Return the Dither2_Frequency_R attribute.""" + self._Dither2_Frequency_R = self.attribute_mapping["Dither2_Frequency_R"].get_value() + return self._Dither2_Frequency_R + # PROTECTED REGION END # // RCUSCC.Dither2_Frequency_R_read + + def read_Dither2_Frequency_RW(self): + # PROTECTED REGION ID(RCUSCC.Dither2_Frequency_RW_read) ENABLED START # + """Return the Dither2_Frequency_R attribute.""" + self._Dither2_Frequency_RW = self.attribute_mapping["Dither2_Frequency_RW"].get_value() + return self._Dither2_Frequency_RW + # PROTECTED REGION END # // RCUSCC.Dither2_Frequency_RW_read + + def write_Dither2_Frequency_RW(self, value): + # PROTECTED REGION ID(RCUSCC.Dither2_Frequency_RW_write) ENABLED START # + """Set the Dither2_Frequency_RW attribute.""" + self.attribute_mapping["Dither2_Frequency_RW"].set_value(value) + self._Dither2_Frequency_RW = value + # PROTECTED REGION END # // RCUSCC.Dither2_Frequency_RW_write def read_LED0_R(self): # PROTECTED REGION ID(RCUSCC.LED0_R_read) ENABLED START # @@ -539,12 +539,12 @@ class RCUSCC(Device): return self._Pwr_dig_R # PROTECTED REGION END # // RCUSCC.Pwr_dig_R_read -# def read_Temp_R(self): -# # PROTECTED REGION ID(RCUSCC.Temp_R_read) ENABLED START # -# """Return the Temp_R attribute.""" -# self._Temp_R = self.attribute_mapping["Temp_R"].get_value() -# return self._Temp_R -# # PROTECTED REGION END # // RCUSCC.Temp_R_read + def read_Temperature_R(self): + # PROTECTED REGION ID(RCUSCC.Temperature_R_read) ENABLED START # + """Return the Temperature_R attribute.""" + self._Temperature_R = self.attribute_mapping["Temperature_R"].get_value() + return self._Temperature_R + # PROTECTED REGION END # // RCUSCC.Temperature_R_read # --------