[openbsc PATCH 1/5] openbsc/gsm_data_shared.h: Added the attribute reduce_power in TRX
From: Álvaro Neira Ayuso <anayuso@sysmocom.de> Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de> --- openbsc/include/openbsc/gsm_data_shared.h | 1 + 1 file changed, 1 insertion(+) diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index ae9e7d8..a4d3c54 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -371,6 +371,7 @@ struct gsm_bts_trx { uint16_t arfcn; int nominal_power; /* in dBm */ unsigned int max_power_red; /* in actual dB */ + int power_reduce; /* in dBm */ struct { void *l1h; -- 1.7.10.4
On Mon, Apr 28, 2014 at 01:38:47PM +0200, Alvaro Neira Ayuso wrote:
From: Álvaro Neira Ayuso <anayuso@sysmocom.de>
--- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -371,6 +371,7 @@ struct gsm_bts_trx { uint16_t arfcn; int nominal_power; /* in dBm */ unsigned int max_power_red; /* in actual dB */ + int power_reduce; /* in dBm */
any reason to make it use int and not unsigned int? As this is a relative value the right unit is dB (take this with a grain of salt as I am just a software guy)
On Tue, Apr 29, 2014 at 09:14:07AM +0200, Holger Hans Peter Freyther wrote:
On Mon, Apr 28, 2014 at 01:38:47PM +0200, Alvaro Neira Ayuso wrote:
From: Álvaro Neira Ayuso <anayuso@sysmocom.de>
--- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -371,6 +371,7 @@ struct gsm_bts_trx { uint16_t arfcn; int nominal_power; /* in dBm */ unsigned int max_power_red; /* in actual dB */ + int power_reduce; /* in dBm */
any reason to make it use int and not unsigned int? As this is a relative value the right unit is dB (take this with a grain of salt as I am just a software guy)
No, I don't have any reason for using int. But I have seen that that it's better to use unsigned int because it's a little bit strange accept to use negative values in a one attribute that we want to use for reducing the power transmitter. I'm going to change that and send you another version. Thanks Holger
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de> --- [changes in v2] * Changed power_reduce from int to unsigned int for not accepting negative value in a relative value. openbsc/include/openbsc/gsm_data_shared.h | 1 + 1 file changed, 1 insertion(+) diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 2b405a0..ec2cae2 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -371,6 +371,7 @@ struct gsm_bts_trx { uint16_t arfcn; int nominal_power; /* in dBm */ unsigned int max_power_red; /* in actual dB */ + unsigned int power_reduce; /* in dBm */ struct { void *l1h; -- 1.7.10.4
participants (2)
-
Alvaro Neira Ayuso -
Holger Hans Peter Freyther