~thomas-voss/location-service/generalize-glue-code-for-agps-operation

« back to all changes in this revision

Viewing changes to doc/daemon_and_cli.md

  • Committer: thomas-voss
  • Date: 2015-02-02 15:05:32 UTC
  • mto: This revision was merged to the branch mainline in revision 196.
  • Revision ID: thomas.voss@canonical.com-20150202150532-9jm6l7ctsey92zka
Add documentation for debugging, hacking and debugging the location service.
Pull manual testing instructions over from the wiki.
Add tools for formatting the source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Service Daemon and CLI
 
2
 
 
3
The location service offers a daemon executable and a corresponding
 
4
command-line interface for interacting with it. The daemon does not
 
5
necessarily require root privileges, but might so depending on your
 
6
configuration.
 
7
 
 
8
Run the following command to receive an overview of the arguments to
 
9
the daemon:
 
10
 
 
11
    ubuntu-location-serviced --help
 
12
 
 
13
An example invocation of the daemon, configuring a GPS provider that
 
14
relies on the Android HAL to talk to the chipset, exposing the service
 
15
on the system DBus instance:
 
16
 
 
17
    ubuntu-location-serviced --bus system --provider gps::Provider
 
18
 
 
19
The cli allows for querying properties of a running service instance, e.g.:
 
20
 
 
21
    ubuntu-location-serviced-cli --bus system --get --property is_online
 
22
 
 
23
## Configuring an Out-Of-Process Provider
 
24
 
 
25
If you want to run a provider out of process, the daemon executable
 
26
allows you to do so by instantiating a so-called remote provider. The
 
27
following invocation of the service tries to connect to the provider
 
28
instance described by the given unique DBus name and path.
 
29
 
 
30
    ubuntu-location-serviced \
 
31
          --bus system \
 
32
          --provider remote::Provider \
 
33
      --remote::Provider::bus=system \
 
34
          --remote::Provider::name=com.ubuntu.location.provider.Gps \
 
35
          --remote::Provider::path=/
 
36
 
 
37
Please note that the service allows for decorating provider names to
 
38
uniquely identify per provider configuration options and to allow for
 
39
loading more than one provider of a certain kind. The following
 
40
configuration configures two remote providers, one relying on GPS
 
41
(decorated with @gps) and another one relying on network-based
 
42
positioning (decorated with @network):
 
43
 
 
44
    ubuntu-location-serviced \
 
45
          --bus system \
 
46
          --provider remote::Provider@gps \
 
47
      --remote::Provider@gps::bus=system \
 
48
          --remote::Provider@gps::name=com.ubuntu.location.provider.Gps \
 
49
          --remote::Provider@gps::path=/ \
 
50
          --provider remote::Provider@network \
 
51
      --remote::Provider@network::bus=system \
 
52
          --remote::Provider@network::name=com.ubuntu.location.provider.Network \
 
53
          --remote::Provider@network::path=/
 
54
 
 
55