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

Multiple modifications

- Change temp_r -> temperature_r
- Enable attribute handling code for all attributes
- Still keep *dither* disabled
parent 52432b91
No related branches found
No related tags found
No related merge requests found
......@@ -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"
]
}
}
......
......@@ -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"
]
}
}
......
......@@ -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
# --------
......
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