navit  0.5.3-trunk
Vehicle Gpsd

The Vehicle to gain position data from the gpsd service. More...

Data Structures

struct  vehicle_priv
 

Macros

#define DEFAULT_RETRY_INTERVAL   10
 
#define MIN_RETRY_INTERVAL   1
 

Functions

static void vehicle_gpsd_io (struct vehicle_priv *priv)
 
static void vehicle_gpsd_callback (struct gps_data_t *data, const char *buf, size_t len, int level)
 
static int vehicle_gpsd_try_open (struct vehicle_priv *priv)
 
static void vehicle_gpsd_open (struct vehicle_priv *priv)
 
static void vehicle_gpsd_close (struct vehicle_priv *priv)
 
static void vehicle_gpsd_destroy (struct vehicle_priv *priv)
 
static int vehicle_gpsd_position_attr_get (struct vehicle_priv *priv, enum attr_type type, struct attr *attr)
 
static struct vehicle_privvehicle_gpsd_new_gpsd (struct vehicle_methods *meth, struct callback_list *cbl, struct attr **attrs)
 
void plugin_init (void)
 The plugin entry point. More...
 

Variables

char * vehicle_priv::gpsd_query
 
struct event_watchvehicle_priv::evwatch
 
guint vehicle_priv::retry_interval
 
struct gps_data_t * vehicle_priv::gps
 
int vehicle_priv::fix_type
 
time_t vehicle_priv::fix_time
 
int vehicle_priv::sats
 
struct event_timeoutvehicle_priv::retry_timer2
 
static struct vehicle_privvehicle_last
 
static struct vehicle_methods vehicle_gpsd_methods
 

Detailed Description

The Vehicle to gain position data from the gpsd service.

Macro Definition Documentation

◆ DEFAULT_RETRY_INTERVAL

#define DEFAULT_RETRY_INTERVAL   10

◆ MIN_RETRY_INTERVAL

#define MIN_RETRY_INTERVAL   1

Function Documentation

◆ plugin_init()

void plugin_init ( void  )

The plugin entry point.

Returns
nothing

The plugin entry point

The plugin entry point.

This function is called once on startup.

The plugin entry point.

Returns
nothing

The plugin entry point.

Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team

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 Street, Fifth Floor, Boston, MA 02110-1301, USA.

The plugin entry point.

register vehicle_gypsy

Returns
nothing

References dbg, lvl_debug, and vehicle_gpsd_new_gpsd().

◆ vehicle_gpsd_callback()

◆ vehicle_gpsd_close()

◆ vehicle_gpsd_destroy()

static void vehicle_gpsd_destroy ( struct vehicle_priv priv)
static

◆ vehicle_gpsd_io()

static void vehicle_gpsd_io ( struct vehicle_priv priv)
static

◆ vehicle_gpsd_new_gpsd()

◆ vehicle_gpsd_open()

static void vehicle_gpsd_open ( struct vehicle_priv priv)
static

Open a connection to gpsd. Will re-try the connection if it fails

References vehicle_priv::cbt, dbg, event_add_timeout(), lvl_debug, lvl_error, vehicle_priv::retry_interval, vehicle_priv::retry_timer2, and vehicle_gpsd_try_open().

Referenced by vehicle_gpsd_io(), and vehicle_gpsd_new_gpsd().

◆ vehicle_gpsd_position_attr_get()

static int vehicle_gpsd_position_attr_get ( struct vehicle_priv priv,
enum attr_type  type,
struct attr attr 
)
static

◆ vehicle_gpsd_try_open()

Variable Documentation

◆ evwatch

struct event_watch* vehicle_priv::evwatch

◆ fix_time

◆ fix_type

◆ gps

◆ gpsd_query

char* vehicle_priv::gpsd_query

◆ retry_interval

◆ retry_timer2

struct event_timeout* vehicle_priv::retry_timer2

◆ sats

◆ vehicle_gpsd_methods

struct vehicle_methods vehicle_gpsd_methods
static
Initial value:
= {
}
static void vehicle_gpsd_destroy(struct vehicle_priv *priv)
Definition: vehicle_gpsd.c:366
static int vehicle_gpsd_position_attr_get(struct vehicle_priv *priv, enum attr_type type, struct attr *attr)
Definition: vehicle_gpsd.c:378

Referenced by vehicle_gpsd_new_gpsd().

◆ vehicle_last

struct vehicle_priv * vehicle_last
static