trx_toolkit/fake_trx.py: introduce a TRXC command for C/I simulation
C/I (Carrier-to-Interference ratio) is a value in cB (centiBels), computed from the training sequence of each received burst, by comparing the "ideal" training sequence with the received one. This change introduces a new command similar to FAKE_TOA and FAKE_RSSI, so it can be used by TTCN-3 test case 'TC_pcu_data_ind_lqual_cb' to verify that the link quality measurements are delivered to the PCU. Change-Id: I7080effbbc1022d1884c6d6f0cb580eba8e514ff Related: OS#1855
This commit is contained in:
parent
13ec32d380
commit
3d9a1d6e48
|
@ -64,8 +64,16 @@ class FakeTRX(Transceiver):
|
|||
from (rssi_base - rssi_rand_threshold)
|
||||
to (rssi_base + rssi_rand_threshold).
|
||||
|
||||
Please note that randomization of both RSSI and ToA is optional,
|
||||
and can be enabled from the control interface.
|
||||
- C/I (Carrier-to-Interference ratio) - value in cB (centiBels),
|
||||
computed from the training sequence of each received burst, by
|
||||
comparing the "ideal" training sequence with the actual one.
|
||||
A pair of both base and threshold values defines a range of
|
||||
C/I randomization:
|
||||
|
||||
from (ci_base - ci_rand_threshold)
|
||||
to (ci_base + ci_rand_threshold).
|
||||
|
||||
Please note that the randomization is optional and disabled by default.
|
||||
|
||||
== Timing Advance handling
|
||||
|
||||
|
@ -263,6 +271,25 @@ class FakeTRX(Transceiver):
|
|||
self.rssi_base += int(request[1])
|
||||
return 0
|
||||
|
||||
# C/I simulation
|
||||
# Absolute form: CMD FAKE_CI <BASE> <THRESH>
|
||||
elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 2):
|
||||
log.debug("(%s) Recv FAKE_CI cmd" % self)
|
||||
|
||||
# Parse and apply both base and threshold
|
||||
self.ci_base = int(request[1])
|
||||
self.ci_rand_threshold = int(request[2])
|
||||
return 0
|
||||
|
||||
# C/I simulation
|
||||
# Relative form: CMD FAKE_CI <+-BASE_DELTA>
|
||||
elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 1):
|
||||
log.debug("(%s) Recv FAKE_CI cmd" % self)
|
||||
|
||||
# Parse and apply delta
|
||||
self.ci_base += int(request[1])
|
||||
return 0
|
||||
|
||||
# Path loss simulation: burst dropping
|
||||
# Syntax: CMD FAKE_DROP <AMOUNT>
|
||||
# Dropping pattern: fn % 1 == 0
|
||||
|
|
Loading…
Reference in New Issue