Skip to content
Snippets Groups Projects
Commit 0b97116d authored by Taya Snijder's avatar Taya Snijder
Browse files

Merge branch 'L2SS-1103_add_DAB_filter' into 'master'

Resolve L2SS-1103 "Add dab filter"

Closes L2SS-1103

See merge request !535
parents 6864ebc1 a2aa10d8
Branches
Tags
1 merge request!535Resolve L2SS-1103 "Add dab filter"
......@@ -23,5 +23,5 @@ services:
max-file: "10"
networks:
- control
entrypoint: hwtr --simulator --port 4840 --config RECVTR
entrypoint: hwtr --simulator --port 4840 --config RECVTR_HB,RECVTR_LB,PPS
restart: on-failure
......@@ -615,6 +615,34 @@ class AntennaField(LOFARDevice):
dtype=(bool,),
max_dim_x=MAX_ANTENNA,
)
RCU_DTH_PWR_R = MappedAttribute(
"RCU_DTH_PWR_R",
dtype=(numpy.float64,),
max_dim_x=MAX_ANTENNA,
doc="RCU Dither source power (dBm). Range -25 to -4.",
min_value=-25,
max_value=-4,
)
RCU_DTH_PWR_RW = MappedAttribute(
"RCU_DTH_PWR_RW",
dtype=(numpy.float64,),
max_dim_x=MAX_ANTENNA,
access=AttrWriteType.READ_WRITE,
doc="RCU Dither source power (dBm). Range -25 to -4.",
min_value=-25,
max_value=-4,
)
RCU_DAB_filter_on_R = MappedAttribute(
"RCU_DAB_filter_on_R",
dtype=(bool,),
max_dim_x=MAX_ANTENNA,
)
RCU_DAB_filter_on_RW = MappedAttribute(
"RCU_DAB_filter_on_RW",
dtype=(bool,),
max_dim_x=MAX_ANTENNA,
access=AttrWriteType.READ_WRITE,
)
# ----- Attributes mapped on SDP
......@@ -1550,6 +1578,10 @@ class AntennaToRecvMapper(object):
"RCU_DTH_freq_R": self._control_mapping,
"RCU_DTH_freq_RW": self._control_mapping,
"RCU_DTH_on_R": self._control_mapping,
"RCU_DTH_PWR_R": self._control_mapping,
"RCU_DTH_PWR_RW": self._control_mapping,
"RCU_DAB_filter_on_R": self._control_mapping,
"RCU_DAB_filter_on_RW": self._control_mapping,
}
self._default_value_mapping_read = {
"ANT_mask_RW": value_map_ant_bool,
......@@ -1570,6 +1602,10 @@ class AntennaToRecvMapper(object):
"RCU_DTH_freq_R": numpy.zeros(number_of_antennas, dtype=numpy.float64),
"RCU_DTH_freq_RW": numpy.zeros(number_of_antennas, dtype=numpy.float64),
"RCU_DTH_on_R": value_map_ant_bool,
"RCU_DTH_PWR_R": numpy.zeros(number_of_antennas, dtype=numpy.float64),
"RCU_DTH_PWR_RW": numpy.zeros(number_of_antennas, dtype=numpy.float64),
"RCU_DAB_filter_on_R": value_map_ant_bool,
"RCU_DAB_filter_on_RW": value_map_ant_bool,
}
self._masked_value_mapping_write = {
"ANT_mask_RW": AntennaToRecvMapper._VALUE_MAP_NONE_96,
......@@ -1582,6 +1618,8 @@ class AntennaToRecvMapper(object):
"RCU_attenuator_dB_R": AntennaToRecvMapper._VALUE_MAP_NONE_96,
"RCU_attenuator_dB_RW": AntennaToRecvMapper._VALUE_MAP_NONE_96,
"RCU_DTH_freq_RW": AntennaToRecvMapper._VALUE_MAP_NONE_96,
"RCU_DTH_PWR_RW": AntennaToRecvMapper._VALUE_MAP_NONE_96,
"RCU_DAB_filter_on_RW": AntennaToRecvMapper._VALUE_MAP_NONE_96,
}
self._reshape_attributes_in = {
"ANT_mask_RW": (MAX_ANTENNA,),
......@@ -1595,6 +1633,10 @@ class AntennaToRecvMapper(object):
"RCU_DTH_freq_R": (MAX_ANTENNA,),
"RCU_DTH_freq_RW": (MAX_ANTENNA,),
"RCU_DTH_on_R": (MAX_ANTENNA,),
"RCU_DTH_PWR_R": (MAX_ANTENNA,),
"RCU_DTH_PWR_RW": (MAX_ANTENNA,),
"RCU_DAB_filter_on_R": (MAX_ANTENNA,),
"RCU_DAB_filter_on_RW": (MAX_ANTENNA,),
}
self._reshape_attributes_out = {
"ANT_mask_RW": (N_rcu, N_rcu_inp),
......@@ -1608,6 +1650,10 @@ class AntennaToRecvMapper(object):
"RCU_DTH_freq_R": (N_rcu, N_rcu_inp),
"RCU_DTH_freq_RW": (N_rcu, N_rcu_inp),
"RCU_DTH_on_R": (N_rcu, N_rcu_inp),
"RCU_DTH_PWR_R": (N_rcu, N_rcu_inp),
"RCU_DTH_PWR_RW": (N_rcu, N_rcu_inp),
"RCU_DAB_filter_on_R": (N_rcu, N_rcu_inp),
"RCU_DAB_filter_on_RW": (N_rcu, N_rcu_inp),
}
def map_read(self, mapped_attribute: str, recv_results: List[any]) -> List[any]:
......
......@@ -251,6 +251,23 @@ class RECV(OPCUADevice):
RCU_DTH_on_R = AttributeWrapper(
comms_annotation=["RCU_DTH_on_R"], datatype=bool, dims=(N_rcu, N_rcu_inp)
)
RCU_DTH_PWR_R = AttributeWrapper(
comms_annotation=["RCU_DTH_PWR_R"],
datatype=numpy.float64,
dims=(N_rcu, N_rcu_inp),
doc="RCU Dither source power (dBm). Range -25 to -4.",
min_value=-25,
max_value=-4,
)
RCU_DTH_PWR_RW = AttributeWrapper(
comms_annotation=["RCU_DTH_PWR_RW"],
datatype=numpy.float64,
access=AttrWriteType.READ_WRITE,
dims=(N_rcu, N_rcu_inp),
doc="RCU Dither source power (dBm). Range -25 to -4.",
min_value=-25,
max_value=-4,
)
RCU_LED_green_on_R = AttributeWrapper(
comms_annotation=["RCU_LED_green_on_R"], datatype=bool, dims=(N_rcu,)
)
......@@ -341,6 +358,18 @@ class RECV(OPCUADevice):
comms_annotation=["RECVTR_translator_busy_R"], datatype=bool
)
RCU_DAB_filter_on_R = AttributeWrapper(
comms_annotation=["RCU_DAB_filter_on_R"],
datatype=bool,
dims=(N_rcu, N_rcu_inp),
)
RCU_DAB_filter_on_RW = AttributeWrapper(
comms_annotation=["RCU_DAB_filter_on_RW"],
datatype=bool,
access=AttrWriteType.READ_WRITE,
dims=(N_rcu, N_rcu_inp),
)
# ----------
# Summarising Attributes
# ----------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment