GypsySatellite

GypsySatellite — Object for obtaining satellite information

Synopsis




                    GypsySatellite;
#define             GYPSY_SATELLITE_DBUS_INTERFACE
#define             GYPSY_SATELLITE_DBUS_SERVICE
                    GypsySatelliteDetails;
GypsySatellite*     gypsy_satellite_new                 (const char *object_path);
GPtrArray*          gypsy_satellite_get_satellites      (GypsySatellite *satellite,
                                                         GError **error);
void                gypsy_satellite_free_satellite_array
                                                        (GPtrArray *satellites);


Object Hierarchy


  GObject
   +----GypsySatellite

Properties


  "object-path"              gchararray            : Write / Construct Only

Signals


  "satellites-changed"                             : Run Last

Description

GypsySatellite is used whenever the client program wishes to know about changes in the satellite details.

Details

GypsySatellite

typedef struct _GypsySatellite GypsySatellite;

There are no public fields in GypsySatellite.


GYPSY_SATELLITE_DBUS_INTERFACE

#define GYPSY_SATELLITE_DBUS_INTERFACE "org.freedesktop.Gypsy.Satellite"

A define containing the name of the Satellite interface


GYPSY_SATELLITE_DBUS_SERVICE

#define GYPSY_SATELLITE_DBUS_SERVICE "org.freedesktop.Gypsy"

A define containing the address of the Satellite service.


GypsySatelliteDetails

typedef struct {
	int satellite_id;
	gboolean in_use;
	guint elevation;
	guint azimuth;
	guint snr;
} GypsySatelliteDetails;

A structure defining a satellite

int satellite_id; The satellite PRN id
gboolean in_use; Whether this satellite was used in calculating the fix
guint elevation; The satellite elevation
guint azimuth; The satellite azimuth
guint snr; The signal to noise ratio

gypsy_satellite_new ()

GypsySatellite*     gypsy_satellite_new                 (const char *object_path);

Creates a new GypsySatellite object that listens for satellite changes from the GPS found at object_path.

object_path : Object path to the GPS device
Returns : A GypsySatellite object

gypsy_satellite_get_satellites ()

GPtrArray*          gypsy_satellite_get_satellites      (GypsySatellite *satellite,
                                                         GError **error);

Retrieves the GypsySatelliteDetails about the satellites that the GPS is able to see.

satellite : A GypsySatellite
error : A GError for error return
Returns : A GPtrArray of GypsySatelliteDetails or NULL on error. Should be freed using gypsy_satellite_free_satellite_array().

gypsy_satellite_free_satellite_array ()

void                gypsy_satellite_free_satellite_array
                                                        (GPtrArray *satellites);

Frees all resources used in the array.

satellites : GPtrArray containing GypsySatelliteDetails

Property Details

The "object-path" property

  "object-path"              gchararray            : Write / Construct Only

The DBus path to the object.

Default value: ""

Signal Details

The "satellites-changed" signal

void                user_function                      (GypsySatellite *satellites,
                                                        gpointer        arg1,
                                                        gpointer        user_data)       : Run Last

The ::satellites-changed signal is emitted every time the GPS reports a change in the satellite data.

satellites : A GPtrArray containing GypsySatelliteDetails
user_data : user data set when the signal handler was connected.