osmocom-bb[fixeria/trx]: fake_trx/ctrl_if_bb.py: add FAKE_RSSI and FAKE_TOA commands

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Tue Feb 27 16:06:54 UTC 2018


Patch Set 2:

Hi Harald,

> I'm completely fine with FAKE_TOA, but why would you ever
> intenionally use a float value?  The Burst data carries int16_t. IF
> you input a float value, you may end up having conversion/rounding
> differences in how python rounds the float to how the Test suite
> rounds the float - they may even run on different machines, etc.
>
> In the end, we want to generate an int16_t from fake_trx inside the
> bursts.  Why would you use a different type as the input parameter?

I am agree with you, and I don't even sure about portability level
of the current field coding implemented in the DATAMSG API. Moreover,
there is only have ToA 'float to bytes' conversation implemented,
while parsing 'ToA from raw bytes' is missing so far...

But in general, why the usage of 'raw' int16_t is better than
the usage of float ToA value? I think, e.g. '-1.6' value is much
easier to keep in mind, which means that a signal arrived 1.6
symbols earlier than it was expected...

Following your idea, OsmoTRX does use exactly symbols, and
before sending a burst, converts double value to int16_t:

> TOAint = (int) (TOA * 256.0 + 0.5);
> burstString[6] = (TOAint >> 8) & 0x0ff;
> burstString[7] = TOAint & 0x0ff;

and OsmoBTS then also recovers raw bytes to float:

> float toa = ((int16_t)(buf[6] << 8) | buf[7]) / 256.0F;

Isn't there any possible incompatibility, e.g. in case
of both OsmoTRX and OsmoBTS are working on different machines?

-- 
To view, visit https://gerrit.osmocom.org/6846
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia23becec4104d47e7b22350db67b8834d6f1ad1b
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-HasComments: No



More information about the gerrit-log mailing list