* RFC: Neighbouring Cell Info, take 2
@ 2010-02-11 0:23 Bastian, Waldo
2010-02-11 7:52 ` Aki Niemi
0 siblings, 1 reply; 5+ messages in thread
From: Bastian, Waldo @ 2010-02-11 0:23 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 4424 bytes --]
Hi,
Revisited proposal for neighbouring cell info based on previous feedback:
- Low-level driver API instead of oFono.org DBUS API
- Polling based, no automatic periodic updates
- Follows definitions in OMA SUPL v2.0
I'm not particular fond of the nested list -> wcdma. measured_results_list[].cell_measured_results[], maybe flatten that into a single list?
Cheers,
Waldo
/*
*
* oFono - Open Source Telephony
*
* Copyright (C) 2010 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __OFONO_CELL_INFO_H
#define __OFONO_CELL_INFO_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ofono/types.h>
struct ofono_cell_info;
enum ofono_cell_info_type {
OFONO_CELL_INFO_GSM = 0,
OFONO_CELL_INFO_WCDMA = 1,
};
struct ofono_cell_info_results {
enum ofono_cell_info_type rat;
char mcc[OFONO_MAX_MCC_LENGTH + 1];
char mnc[OFONO_MAX_MNC_LENGTH + 1];
union {
struct {
int lac; /* Location Area Code (0.65535) */
int ci; /* Cell Identity (0..65535) */
int ta; /* Timing Advance (0..255), -1 = unsupported */
int no_cells; /* Number of valid nmr entries (1..15) */
struct {
int arfcn; /* ARFCN of the channel (0..1023) */
int bsic; /* BSIC of the channel (0..63) */
int rxlev; /* Measured power of the channel (0..63) Subtract 110 to get power in dBm */
} nmr[15];
} gsm;
struct {
int uc; /* Cell Identity, composed of RNC-ID and C-ID (0..268435455) */
int dl_frequency; /* (0..16383), -1 = unsupported */
int ul_frequency; /* (0..16383), -1 = unsupported */
int scrambling_code; /* Primary scrambling code (0..511) */
int no_freq; /* Number of valid measured_results_list entries (1..8) */
struct {
int dl_frequency; /* (0..16383), -1 = unsupported */
int ul_frequency; /* (0..16383), -1 = unsupported */
int rssi; /* UTRA-CarrierRSSI (0..76), -1 = unsupported */
int no_cells; /* Number of valid cell_measured_results entries (0..32) */
struct {
int ci; /* Cell Identity (0..268435455), -1 = unsupported */
int scrambling_code; /* Primary scrambling code (0..511) */
int ecn0; /* (0..49), -1 = unsupported */
int rscp; /* cpich-RSCP per [3GPP RRC] (0..127), -1 = unsupported */
int pathloss; /* (46..158), -1 = unsupported */
} cell_measured_results[32];
} measured_results_list[8];
} wcdma;
};
};
typedef void (*ofono_cell_info_query_cb_t)(const struct ofono_error *error,
const struct ofono_cell_info_results results,
void *data);
struct ofono_cell_info_driver {
const char *name;
int (*probe)(struct ofono_cell_info *ci, unsigned int vendor,
void *data);
void (*remove)(struct ofono_cell_info *ci);
void (*query)(struct ofono_cell_info *ci,
ofono_cell_info_query_cb_t cb,
void *data);
};
void ofono_cell_info_query(struct ofono_cell_info *ci, ofono_cell_info_query_cb_t cb, void *data);
int ofono_cell_info_driver_register(const struct ofono_cell_info_driver *d);
void ofono_cel_info_driver_unregister(const struct ofono_cell_info_driver *d);
struct ofono_cell_info *ofono_cell_info_create(struct ofono_modem *modem,
unsigned int vendor,
const char *driver,
void *data);
void ofono_cell_info_register(struct ofono_cell_info *ci);
void ofono_cell_info_remove(struct ofono_cell_info *ci);
void ofono_cell_info_set_data(struct ofono_radio_settings *ci, void *data);
void *ofono_cell_info_get_data(struct ofono_radio_settings *ci);
#ifdef __cplusplus
}
#endif
#endif /* __OFONO_CELL_INFO_H */
Cheers,
Waldo
--
Intel Corporation - Hillsboro, Oregon
Ultra Mobility Group - Platform Software Architecture
Tel: +1 503 264 6237 - Mobile: +1 503 703-7327
[-- Attachment #2: cell-info.h --]
[-- Type: text/plain, Size: 3755 bytes --]
/*
*
* oFono - Open Source Telephony
*
* Copyright (C) 2010 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __OFONO_CELL_INFO_H
#define __OFONO_CELL_INFO_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ofono/types.h>
struct ofono_cell_info;
enum ofono_cell_info_type {
OFONO_CELL_INFO_GSM = 0,
OFONO_CELL_INFO_WCDMA = 1,
};
struct ofono_cell_info_results {
enum ofono_cell_info_type rat;
char mcc[OFONO_MAX_MCC_LENGTH + 1];
char mnc[OFONO_MAX_MNC_LENGTH + 1];
union {
struct {
int lac; /* Location Area Code (0.65535) */
int ci; /* Cell Identity (0..65535) */
int ta; /* Timing Advance (0..255), -1 = unsupported */
int no_cells; /* Number of valid nmr entries (1..15) */
struct {
int arfcn; /* ARFCN of the channel (0..1023) */
int bsic; /* BSIC of the channel (0..63) */
int rxlev; /* Measured power of the channel (0..63) Subtract 110 to get power in dBm */
} nmr[15];
} gsm;
struct {
int uc; /* Cell Identity, composed of RNC-ID and C-ID (0..268435455) */
int dl_frequency; /* (0..16383), -1 = unsupported */
int ul_frequency; /* (0..16383), -1 = unsupported */
int scrambling_code; /* Primary scrambling code (0..511) */
int no_freq; /* Number of valid measured_results_list entries (1..8) */
struct {
int dl_frequency; /* (0..16383), -1 = unsupported */
int ul_frequency; /* (0..16383), -1 = unsupported */
int rssi; /* UTRA-CarrierRSSI (0..76), -1 = unsupported */
int no_cells; /* Number of valid cell_measured_results entries (0..32) */
struct {
int ci; /* Cell Identity (0..268435455), -1 = unsupported */
int scrambling_code; /* Primary scrambling code (0..511) */
int ecn0; /* (0..49), -1 = unsupported */
int rscp; /* cpich-RSCP per [3GPP RRC] (0..127), -1 = unsupported */
int pathloss; /* (46..158), -1 = unsupported */
} cell_measured_results[32];
} measured_results_list[8];
} wcdma;
};
};
typedef void (*ofono_cell_info_query_cb_t)(const struct ofono_error *error,
const struct ofono_cell_info_results results,
void *data);
struct ofono_cell_info_driver {
const char *name;
int (*probe)(struct ofono_cell_info *ci, unsigned int vendor,
void *data);
void (*remove)(struct ofono_cell_info *ci);
void (*query)(struct ofono_cell_info *ci,
ofono_cell_info_query_cb_t cb,
void *data);
};
void ofono_cell_info_query(struct ofono_cell_info *ci, ofono_cell_info_query_cb_t cb, void *data);
int ofono_cell_info_driver_register(const struct ofono_cell_info_driver *d);
void ofono_cel_info_driver_unregister(const struct ofono_cell_info_driver *d);
struct ofono_cell_info *ofono_cell_info_create(struct ofono_modem *modem,
unsigned int vendor,
const char *driver,
void *data);
void ofono_cell_info_register(struct ofono_cell_info *ci);
void ofono_cell_info_remove(struct ofono_cell_info *ci);
void ofono_cell_info_set_data(struct ofono_radio_settings *ci, void *data);
void *ofono_cell_info_get_data(struct ofono_radio_settings *ci);
#ifdef __cplusplus
}
#endif
#endif /* __OFONO_CELL_INFO_H */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFC: Neighbouring Cell Info, take 2
2010-02-11 0:23 RFC: Neighbouring Cell Info, take 2 Bastian, Waldo
@ 2010-02-11 7:52 ` Aki Niemi
2010-02-11 19:25 ` Bastian, Waldo
0 siblings, 1 reply; 5+ messages in thread
From: Aki Niemi @ 2010-02-11 7:52 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]
to, 2010-02-11 kello 01:23 +0100, ext Bastian, Waldo kirjoitti:
> Revisited proposal for neighbouring cell info based on previous
> feedback:
> - Low-level driver API instead of oFono.org DBUS API
> - Polling based, no automatic periodic updates
> - Follows definitions in OMA SUPL v2.0
I like it.
> I'm not particular fond of the nested list -> wcdma.
> measured_results_list[].cell_measured_results[], maybe flatten that
> into a single list?
I agree it's ugly, but I'd keep it like that in the driver API, and
possibly flatten it in the D-Bus API if necessary.
> struct ofono_cell_info_driver {
> const char *name;
> int (*probe)(struct ofono_cell_info *ci, unsigned int vendor,
> void *data);
> void (*remove)(struct ofono_cell_info *ci);
> void (*query)(struct ofono_cell_info *ci,
> ofono_cell_info_query_cb_t cb,
> void *data);
> };
>
> void ofono_cell_info_query(struct ofono_cell_info *ci, ofono_cell_info_query_cb_t cb, void *data);
What's this for?
Cheers,
Aki
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: RFC: Neighbouring Cell Info, take 2
2010-02-11 7:52 ` Aki Niemi
@ 2010-02-11 19:25 ` Bastian, Waldo
2010-02-12 8:26 ` Aki Niemi
0 siblings, 1 reply; 5+ messages in thread
From: Bastian, Waldo @ 2010-02-11 19:25 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
> > struct ofono_cell_info_driver {
> > const char *name;
> > int (*probe)(struct ofono_cell_info *ci, unsigned int vendor,
> > void *data);
> > void (*remove)(struct ofono_cell_info *ci);
> > void (*query)(struct ofono_cell_info *ci,
> > ofono_cell_info_query_cb_t cb,
> > void *data);
> > };
> >
> > void ofono_cell_info_query(struct ofono_cell_info *ci,
> ofono_cell_info_query_cb_t cb, void *data);
>
> What's this for?
It's basically ofono_cell_info_driver->query(...) for use by a plugin after it has acquired the atom, something like:
cell_info_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_CELL_INFO);
cell_info = __ofono_atom_get_data(cell_info_atom);
ofono_cell_info_query(cell_info, plugin_query_cb, plugin_data);
Cheers,
Waldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: RFC: Neighbouring Cell Info, take 2
2010-02-11 19:25 ` Bastian, Waldo
@ 2010-02-12 8:26 ` Aki Niemi
2010-02-12 16:03 ` Bastian, Waldo
0 siblings, 1 reply; 5+ messages in thread
From: Aki Niemi @ 2010-02-12 8:26 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
to, 2010-02-11 kello 20:25 +0100, ext Bastian, Waldo kirjoitti:
> > > void ofono_cell_info_query(struct ofono_cell_info *ci,
> > ofono_cell_info_query_cb_t cb, void *data);
> >
> > What's this for?
>
> It's basically ofono_cell_info_driver->query(...) for use by a plugin after it has acquired the atom, something like:
> cell_info_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_CELL_INFO);
> cell_info = __ofono_atom_get_data(cell_info_atom);
> ofono_cell_info_query(cell_info, plugin_query_cb, plugin_data);
Right, but if the atom already exposes a D-Bus API, what is the purpose
of this plugin interface?
Cheers,
Aki
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: RFC: Neighbouring Cell Info, take 2
2010-02-12 8:26 ` Aki Niemi
@ 2010-02-12 16:03 ` Bastian, Waldo
0 siblings, 0 replies; 5+ messages in thread
From: Bastian, Waldo @ 2010-02-12 16:03 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 950 bytes --]
> to, 2010-02-11 kello 20:25 +0100, ext Bastian, Waldo kirjoitti:
> > > > void ofono_cell_info_query(struct ofono_cell_info *ci,
> > > ofono_cell_info_query_cb_t cb, void *data);
> > >
> > > What's this for?
> >
> > It's basically ofono_cell_info_driver->query(...) for use by a plugin
> after it has acquired the atom, something like:
> > cell_info_atom = __ofono_modem_find_atom(modem,
> OFONO_ATOM_TYPE_CELL_INFO);
> > cell_info = __ofono_atom_get_data(cell_info_atom);
> > ofono_cell_info_query(cell_info, plugin_query_cb, plugin_data);
>
> Right, but if the atom already exposes a D-Bus API, what is the purpose
> of this plugin interface?
It's either a D-Bus API or a plugin interface and Denis indicated a preference for a plugin interface over a D-Bus API. I think his main concern was over the maturity of the API, so maybe he can be pursuaded otherwise now that this is based off the OMA SUPL standard.
Cheers,
Waldo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-12 16:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11 0:23 RFC: Neighbouring Cell Info, take 2 Bastian, Waldo
2010-02-11 7:52 ` Aki Niemi
2010-02-11 19:25 ` Bastian, Waldo
2010-02-12 8:26 ` Aki Niemi
2010-02-12 16:03 ` Bastian, Waldo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.