[PATCH 2/2] qmicli: add support LOC

Thomas Weißschuh thomas at t-8ch.de
Wed Mar 7 09:01:50 UTC 2018


Hi,

one question is inline

On Fri, 2018-02-23T13:27+0100, Aleksander Morgado wrote:
> On 03/02/18 11:55, Thomas Weißschuh wrote:
>> ---
>>  src/qmicli/Makefile.am  |   1 +
>>  src/qmicli/qmicli-loc.c | 305 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  src/qmicli/qmicli.c     |  11 ++
>>  src/qmicli/qmicli.h     |   7 ++
>>  4 files changed, 324 insertions(+)
>>  create mode 100644 src/qmicli/qmicli-loc.c
>> 
>> +
>> +static GOptionEntry entries[] = {
>> +    {
>> +        "loc-location", 0, 0, G_OPTION_ARG_NONE, &show_location,
>> +        "Show location",
>> +        NULL,
>> +    },
>> +    {
>> +        "loc-satellites", 0, 0, G_OPTION_ARG_NONE, &show_satellites,
>> +        "Show satellite report",
>> +        NULL,
>> +    },
>> +    {
>> +        "loc-nmea", 0, 0, G_OPTION_ARG_NONE, &show_nmea,
>> +        "Show NMEA string",
>> +        NULL,
>> +    },
>> +    {
>> +        "loc-continuous", 0, 0, G_OPTION_ARG_NONE, &print_continuous,
>> +        "Print continuous updates",
>> +        NULL,
>> +    },
> 
> I would expect to see a "loc-start" command here (i.e. not automagically
> started by the other commands). Also, is there a way to "loc-stop"? The idea
> is that qmicli should provide actions as closest as possible to the actual
> QMI operations, nothing more than that.
> 
> Then, I see that we are getting all info via indications instead of request/response, so maybe something like:
> 
> loc-position-report     // following the "position-report" signal name
> loc-gnss-satellite-info // following the "gnss-satellite-info" signal name
> loc-nmea                // following the "nmea" signal name
> 
> And how about "loc-follow" instead of continuous? Just trying to find some
> name similar to the other option that enables some long-time monitoring
> (--wds-follow-network when given additionally to --wds-start-network).
> 
> One thing that we should definitely allow is to request all 3 things at the same time, e.g. if we want to leave monitoring for all events we could do:
> 
> qmicli --loc-position-report --loc-gnss-satellite-info --loc-nmea --loc-follow
> 
> Or if we just want to get max 1 of each, we would run the same without --loc-follow and stop as soon as we get one of each.

I am not sure about how to handle the NMEA signals.
NMEA actuall only makes sense in --loc-follow mode, as all different NMEA
messages are grouped into the same signal and are also emitted when no GPS fix
has been aquired. This makes a oneshot NMEA mode quite useless in my opinion.
For consistency I would error out if --loc-nmea is specified without
--loc-follow.
What do you think?

Thomas


More information about the libqmi-devel mailing list