Skip to content

Commit

Permalink
Merge pull request #875 from Wireless-Innovation-Forum/mcp_oop_check
Browse files Browse the repository at this point in the history
check for always activated DPA frequency range
  • Loading branch information
arhannan authored Mar 30, 2019
2 parents caa6b90 + d208f45 commit c923216
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/harness/testcases/WINNF_FT_S_MCP_testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

DELTA_IAP = 1 # Threshold value in dBm
ONE_MHZ = 1000000

LOW_FREQUENCY_LIMIT_HZ = 3550000000

class McpXprCommonTestcase(sas_testcase.SasTestCase):

Expand Down Expand Up @@ -483,13 +483,25 @@ def executeSingleMCPIteration(self, iteration_content):
# Step 21: ESC Test harness deactivates previously-activated DPAs.
logging.info('Step 21: activating and deactivating DPAs.')
for dpa in iteration_content['dpaActivationList']:
if dpa['frequencyRange']['lowFrequency'] < LOW_FREQUENCY_LIMIT_HZ:
logging.warning('DPA %s is always-active in frequency, so there is no need to activate.', dpa['dpaId'])
if dpa not in self.active_dpas:
self.active_dpas.append(dpa)
continue

if dpa in self.active_dpas:
logging.warning('DPA is already active, skipping activation: %s', dpa)
continue

logging.info('Activating: %s', dpa)
self._sas_admin.TriggerDpaActivation(dpa)
self.active_dpas.append(dpa)
for dpa in iteration_content['dpaDeactivationList']:
if dpa['frequencyRange']['lowFrequency'] < LOW_FREQUENCY_LIMIT_HZ:
logging.warning('DPA %s is always-active in frequency, so there is no need to deactivate.', dpa['dpaId'])
self.active_dpas.remove(dpa)
continue

logging.info('Deactivating: %s', dpa)
self._sas_admin.TriggerDpaDeactivation(dpa)
self.active_dpas.remove(dpa)
Expand Down

0 comments on commit c923216

Please sign in to comment.