Merge lp:~thomas-voss/location-service/adjust-documentation into lp:location-service

Proposed by Thomas Voß
Status: Merged
Approved by: Thomas Voß
Approved revision: 313
Merged at revision: 312
Proposed branch: lp:~thomas-voss/location-service/adjust-documentation
Merge into: lp:location-service
Diff against target: 112 lines (+83/-2)
1 file modified
doc/cli.md (+83/-2)
To merge this branch: bzr merge lp:~thomas-voss/location-service/adjust-documentation
Reviewer Review Type Date Requested Status
Simon Fels (community) Approve
Thomas Voß Pending
Review via email: mp+324034@code.launchpad.net

Commit message

Adjust documentation.

Description of the change

Adjust documentation.

To post a comment you must log in.
Revision history for this message
Simon Fels (morphis) wrote :

Minor comments inline.

review: Needs Fixing
312. By Thomas Voß

Add examples.

313. By Thomas Voß

Add example invocation for standalone tests.

Revision history for this message
Thomas Voß (thomas-voss) :
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'doc/cli.md'
--- doc/cli.md 2017-01-30 09:08:21 +0000
+++ doc/cli.md 2017-05-16 06:49:43 +0000
@@ -4,16 +4,18 @@
4and monitoring the service. The following commands are available:4and monitoring the service. The following commands are available:
55
6 - `list`: Lists all provider implementations known to the service.6 - `list`: Lists all provider implementations known to the service.
7 - `monitor`: Connects to a locationd instance, monitoring its activity.7 - `monitor`: Connects to a locationd instance, monitoring its activity. Supports KML or tabular data output of position/heading/velocity data.
8 - `provider`: Executes a known provider implementation in an out-of-process sandbox.8 - `provider`: Executes a known provider implementation in an out-of-process sandbox.
9 - `run`: Executes the service.9 - `run`: Executes the service.
10 - `set`: Persist the given key/value pair.
10 - `status`: Queries the status of a service instance.11 - `status`: Queries the status of a service instance.
11 - `test`: Executes runtime tests against known provider implementations.12 - `test`: Executes standalone runtime tests against individual provider implementations.
1213
13For all of the commands, an exit status of 0 indicates success. An exit status of 1 indicates14For all of the commands, an exit status of 0 indicates success. An exit status of 1 indicates
14an error. Normal output goes to stdout, while all errors/warnings are output to stderr.15an error. Normal output goes to stdout, while all errors/warnings are output to stderr.
1516
16## Snap-Specific Command Names17## Snap-Specific Command Names
18
17If you are using the cli from a snap (`snap install locationd --channel edge`), the commands will 19If you are using the cli from a snap (`snap install locationd --channel edge`), the commands will
18be wrapped up for you in a convenient way, following the pattern locationd.$COMMAND. With that, if 20be wrapped up for you in a convenient way, following the pattern locationd.$COMMAND. With that, if
19you want to check on the status of the service, simply run:21you want to check on the status of the service, simply run:
@@ -21,8 +23,87 @@
21$ locationd.status23$ locationd.status
22~~~24~~~
2325
26## Hotplug Support
27
28locationd itself does not interface with udev directly but instead delegates to the host
29system's udev setup and the user/administrator to define reasonable udev rules.
30
24## Testing Scenarios31## Testing Scenarios
32
25For testing purposes, it is often handy to inspect position/velocity/heading estimates on the command line.33For testing purposes, it is often handy to inspect position/velocity/heading estimates on the command line.
26The `monitor` command helps here. It connects to the service, starts the positioning engine and outputs 34The `monitor` command helps here. It connects to the service, starts the positioning engine and outputs
27position estimates to stdout until it receives a SIGTERM.35position estimates to stdout until it receives a SIGTERM.
2836
37~~~bash
38$ locationd.monitor
39I0516 08:36:56.752629 8124 monitor.cpp:226] Enabled position/heading/velocity updates...
4051.44483 7.21064 13.27 n/a n/a n/a n/a
4151.44483 7.21064 13.26 n/a n/a n/a n/a
4251.44483 7.21069 16.36 n/a n/a n/a n/a
4351.44483 7.21069 16.36 n/a n/a n/a n/a
4451.44483 7.21068 15.94 n/a n/a n/a n/a
4551.44483 7.21064 12.66 n/a n/a n/a n/a
4651.44484 7.21063 12.26 n/a n/a n/a n/a
4751.44484 7.21063 12.26 n/a n/a n/a n/a
4851.44485 7.21059 10.00 n/a n/a n/a n/a
4951.44485 7.21059 10.00 n/a n/a n/a n/a
5051.44485 7.21058 10.08 n/a n/a n/a n/a
5151.44485 7.21058 10.08 n/a n/a n/a n/a
5251.44485 7.21059 10.00 n/a n/a n/a n/a
5351.44485 7.21059 10.00 n/a n/a n/a n/a
5451.44485 7.21059 10.00 n/a n/a n/a n/a
5551.44485 7.21059 10.00 n/a n/a n/a n/a
56~~~
57
58## Standalone Runtime Tests
59
60Sometimes it is convenient to be able to test specific provider
61implementations in isolation, i.e., without the respective provider
62running in the context of locationd. To this end, the `test` command
63is available. Right now, two test suites `sirf` and `ubx` are
64available. Please make sure that the underlying serial devices are not
65in use by any other process before executing the test suite.
66The behavior of the test-suites can be adjusted by the following environment variables:
67
68 * `ubx`:
69 * `UBX_PROVIDER_TEST_DEVICE`: Mandatory, path to the serial device connecting to the uBlox receiver.
70 * `UBX_PROVIDER_TEST_TRIALS`: Defaults to 15, number of independent positioning attempts from cold start.
71 * `UBX_PROVIDER_TEST_ASSIST_NOW_ENABLE`: Defaults to `false`, toggles usage of uBlox AssistNow Online for assisted GNSS.
72 * `UBX_PROVIDER_TEST_ASSIST_NOW_TOKEN`: Defaults to the empty string, token used to verify access to the uBlox AssistNow services.
73 * `UBX_PROVIDER_TEST_ASSIST_NOW_ACQUISITION_TIMEOUT`: Defaults to `5` seconds, the provider waits this long for an initial fix before reaching out for assistance data.
74 * `sirf`:
75 * `SIRF_PROVIDER_TEST_DEVICE`: Mandatory, path to the serial device connecting to the SiRF receiver.
76 * `SIRF_PROVIDER_TEST_TRIALS`: Defaults to 15, number of independent positioning attempts from cold start.
77
78An example invocation for testing the uBlox provider would look like:
79
80~~~bash
81$ sudo UBX_PROVIDER_TEST_DEVICE=/dev/ttyACM1 UBX_PROVIDER_TEST_TRIALS=50 locationd.test --test-suite=ubx
82~~~
83
84## Verbose Logging
85
86locationd and all of its commands can be switched to verbose mode by
87setting the environment variable `GLOG_v` to `1`, e.g.:
88
89~~~bash
90$ sudo GLOG_v=1 locationd.provide --id=mls::Provider
91I0516 08:40:15.010741 8200 service.cpp:190] static void location::dbus::stub::Service::on_bus_acquired(GObject*, GAsyncResult*, gpointer)
92I0516 08:40:15.015348 8200 service.cpp:221] static void location::dbus::stub::Service::on_name_appeared_for_creation(GDBusConnection*, const gchar*, const gchar*, gpointer)
93I0516 08:40:15.022554 8200 service.cpp:165] static void location::dbus::stub::Service::on_proxy_ready(GObject*, GAsyncResult*, gpointer)
94I0516 08:40:15.029153 8200 w11t_manager.cpp:452] static void location::connectivity::w11t::Supplicant::on_bus_ready(GObject*, GAsyncResult*, gpointer)
95I0516 08:40:15.033778 8200 service.cpp:244] static void location::dbus::stub::Service::on_provider_added(GObject*, GAsyncResult*, gpointer)
96I0516 08:40:15.034494 8200 w11t_manager.cpp:477] static void location::connectivity::w11t::Supplicant::on_proxy_ready(GObject*, GAsyncResult*, gpointer)
97I0516 08:40:15.036355 8200 w11t_manager.cpp:285] static void location::connectivity::w11t::Interface::on_proxy_ready(GObject*, GAsyncResult*, gpointer)
98I0516 08:40:21.915056 8200 provider.cpp:467] static bool location::providers::remote::Provider::Skeleton::handle_activate(ComUbuntuLocationServiceProvider*, GDBusMethodInvocation*, gpointer)
99I0516 08:40:26.832139 8200 w11t_manager.cpp:310] static void location::connectivity::w11t::Interface::handle_scan_done(FiW1Wpasupplicant1WirelessInterface*, gboolean, gpointer)
100I0516 08:40:26.832207 8200 provider.cpp:91] Wireless network scan finished.
101I0516 08:40:33.293536 8200 w11t_manager.cpp:325] static void location::connectivity::w11t::Interface::handle_bss_added(FiW1Wpasupplicant1WirelessInterface*, const char*, GVariant*, gpointer)
102I0516 08:40:33.294180 8200 w11t_manager.cpp:310] static void location::connectivity::w11t::Interface::handle_scan_done(FiW1Wpasupplicant1WirelessInterface*, gboolean, gpointer)
103I0516 08:40:33.294219 8200 provider.cpp:91] Wireless network scan finished.
104I0516 08:40:33.297814 8200 w11t_manager.cpp:98] static void location::connectivity::w11t::BSS::on_proxy_ready(GObject*, GAsyncResult*, gpointer)
105I0516 08:40:43.278961 8200 w11t_manager.cpp:354] static void location::connectivity::w11t::Interface::handle_bss_removed(FiW1Wpasupplicant1WirelessInterface*, const char*, gpointer)
106I0516 08:40:43.279033 8200 w11t_manager.cpp:310] static void location::connectivity::w11t::Interface::handle_scan_done(FiW1Wpasupplicant1WirelessInterface*, gboolean, gpointer)
107I0516 08:40:43.279059 8200 provider.cpp:91] Wireless network scan finished.
108I0516 08:40:43.284925 8200 w11t_manager.cpp:169] static void location::connectivity::w11t::BSS::on_age_changed(GObject*, GParamSpec*, gpointer)
109~~~

Subscribers

People subscribed via source and target branches

to all changes: