navit
0.5.1-trunk
|
The Vehicle to gain position data from a file, pipe, serial interface or a socket. More...
Data Structures | |
struct | gps_sat |
struct | vehicle_priv |
Enumerations | |
enum | file_type { file_type_pipe = 1, file_type_device, file_type_file, file_type_socket, file_type_serial, file_type_pipe = 1, file_type_device, file_type_file, file_type_socket } |
Functions | |
static void | vehicle_file_disable_watch (struct vehicle_priv *priv) |
Disable watch. More... | |
static void | vehicle_file_enable_watch (struct vehicle_priv *priv) |
Enable watch. More... | |
static int | vehicle_file_parse (struct vehicle_priv *priv, char *buffer) |
Parse the buffer. More... | |
static int | vehicle_file_open (struct vehicle_priv *priv) |
Callback of the plugin. More... | |
static void | vehicle_file_close (struct vehicle_priv *priv) |
Close dialogue with the GPS. More... | |
static int | vehicle_file_enable_watch_timer (struct vehicle_priv *priv) |
Enable watch timer to get GPS data. More... | |
static void | vehicle_file_fix_timeout_cb (struct vehicle_priv *priv) |
This is a callback function, called when the fix timeout is done. Set the position to invalid. More... | |
static void | vehicle_file_restart_fix_timeout (struct vehicle_priv *priv) |
Cancel previous fix timeout event and add a new one. More... | |
static void | vehicle_file_io (struct vehicle_priv *priv) |
Function to get data from GPS. More... | |
static void | vehicle_file_destroy (struct vehicle_priv *priv) |
Function called to uninitialize the plugin. More... | |
static int | vehicle_file_position_attr_get (struct vehicle_priv *priv, enum attr_type type, struct attr *attr) |
Function called to get attribute. More... | |
static int | vehicle_file_sat_attr_get (void *priv_data, enum attr_type type, struct attr *attr) |
Function called to get satellite attribute. More... | |
static struct vehicle_priv * | vehicle_file_new_file (struct vehicle_methods *meth, struct callback_list *cbl, struct attr **attrs) |
Function called to initialize the plugin. More... | |
void | plugin_init (void) |
Initialisation of vehicle_file plugin. More... | |
The Vehicle to gain position data from a file, pipe, serial interface or a socket.
enum file_type |
void plugin_init | ( | void | ) |
Initialisation of vehicle_file plugin.
The plugin entry point.
References dbg, lvl_debug, and vehicle_file_new_file().
|
static |
Close dialogue with the GPS.
priv | Pointer on the private data of the plugin |
References callback_destroy(), dbg, vehicle_priv::fd, vehicle_priv::file, vehicle_priv::file_type, file_type_serial, lvl_debug, and vehicle_file_disable_watch().
Referenced by vehicle_file_destroy(), and vehicle_file_io().
|
static |
Function called to uninitialize the plugin.
priv | Pointer on the private data of the plugin |
References attr::attrs, vehicle_priv::buffer, callback_destroy(), vehicle_priv::cb, vehicle_priv::cbt, file::f, file_create(), file_data_write(), file_destroy(), file_fsync(), vehicle_priv::nmea_data, attr::num, vehicle_priv::source, vehicle_priv::statefile, attr::u, and vehicle_file_close().
|
static |
Disable watch.
priv | Pointer on the private data of the plugin |
_WIN32
References dbg, event_remove_timeout(), event_remove_watch(), vehicle_priv::file_type, file_type_serial, lvl_debug, and vehicle_priv::watch.
Referenced by vehicle_file_close(), vehicle_file_io(), and vehicle_file_parse().
|
static |
Enable watch.
priv | Pointer on the private data of the plugin |
References vehicle_priv::cb, dbg, event_add_timeout(), event_add_watch(), event_watch_cond_read, vehicle_priv::fd, vehicle_priv::file_type, file_type_serial, lvl_debug, lvl_warning, and vehicle_priv::watch.
Referenced by vehicle_file_enable_watch_timer(), and vehicle_file_new_file().
|
static |
Enable watch timer to get GPS data.
priv | Pointer on the private data of the plugin |
References dbg, FALSE, lvl_debug, and vehicle_file_enable_watch().
Referenced by vehicle_file_new_file().
|
static |
This is a callback function, called when the fix timeout is done. Set the position to invalid.
priv | Pointer on the private data of the plugin |
References attr_position_valid_invalid, callback_list_call_attr_0, vehicle_priv::cbl, vehicle_priv::ev_fix_timeout, and vehicle_priv::valid.
Referenced by vehicle_file_new_file().
|
static |
Function to get data from GPS.
priv | Pointer on the private data of the plugin |
References vehicle_priv::buffer, vehicle_priv::buffer_pos, buffer_size, callback_list_call_attr_0, vehicle_priv::cbl, data, dbg, exit, vehicle_priv::fd, file_get_contents(), vehicle_priv::file_type, file_type_file, lvl_debug, vehicle_priv::on_eof, vehicle_priv::process_statefile, size, vehicle_priv::statefile, vehicle_file_close(), vehicle_file_disable_watch(), vehicle_file_open(), and vehicle_file_parse().
Referenced by vehicle_file_new_file().
|
static |
Function called to initialize the plugin.
meth | ? |
cbl | ? |
attrs | ? |
References attr_search(), vehicle_priv::attrs, attr::attrs, vehicle_priv::baudrate, vehicle_priv::buffer, buffer_size, callback_cast, callback_new_1, vehicle_priv::cb, vehicle_priv::cb_fix_timeout, vehicle_priv::cbl, cbl, vehicle_priv::cbt, vehicle_priv::checksum_ignore, dbg, vehicle_priv::ev_fix_timeout, event_add_timeout(), vehicle_priv::fd, file_exists(), vehicle_priv::fixtime, item::id_hi, item::id_lo, lvl_debug, lvl_error, item::meth, attr::num, vehicle_priv::on_eof, item::priv_data, vehicle_priv::process_statefile, vehicle_priv::sat_item, vehicle_priv::source, vehicle_priv::statefile, attr::str, vehicle_priv::time, item::type, attr::u, vehicle_file_enable_watch(), vehicle_file_enable_watch_timer(), vehicle_file_fix_timeout_cb(), vehicle_file_io(), vehicle_file_methods, vehicle_file_open(), and vehicle_file_sat_methods.
Referenced by plugin_init().
|
static |
Callback of the plugin.
priv | Pointer on the private data of the plugin |
priv | Pointer on the private data of the plugin |
_WIN32
_WIN32
References vehicle_priv::baudrate, callback_cast, callback_new_1, dbg, vehicle_priv::fd, vehicle_priv::file, file_is_reg(), vehicle_priv::file_type, file_type_device, file_type_file, file_type_pipe, file_type_serial, file_type_socket, lvl_error, lvl_info, lvl_warning, name, p, and vehicle_priv::source.
Referenced by vehicle_file_io(), and vehicle_file_new_file().
|
static |
Parse the buffer.
priv | Pointer on the private data of the plugin |
buffer | Data buffer (null terminated) |
References attr_position_valid_invalid, attr_position_valid_valid, gps_sat::azimuth, vehicle_priv::cbt, vehicle_priv::checksum_ignore, vehicle_priv::current, vehicle_priv::current_count, dbg, vehicle_priv::direction, gps_sat::elevation, event_add_timeout(), vehicle_priv::file_type, file_type_file, vehicle_priv::fixday, vehicle_priv::fixmonth, vehicle_priv::fixtime, vehicle_priv::fixyear, vehicle_priv::geo, vehicle_priv::hdop, vehicle_priv::height, coord_geo::lat, lat, coord_geo::lng, lvl_debug, lvl_error, lvl_info, vehicle_priv::magnetic_direction, vehicle_priv::next, vehicle_priv::next_count, vehicle_priv::nmea_data, vehicle_priv::nmea_data_buf, p, gps_sat::prn, vehicle_priv::sats_signal, vehicle_priv::sats_used, vehicle_priv::sats_visible, gps_sat::snr, vehicle_priv::speed, vehicle_priv::status, vehicle_priv::time, vehicle_priv::valid, vehicle_file_disable_watch(), vehicle_file_restart_fix_timeout(), and vehicle_priv::watch.
Referenced by vehicle_file_io().
|
static |
Function called to get attribute.
priv | Pointer on the private data of the plugin |
type | Attribute type called |
attr | Structure to return the attribute value |
References attr::coord_geo, vehicle_priv::current_count, dbg, vehicle_priv::direction, vehicle_priv::fixday, vehicle_priv::fixiso8601, vehicle_priv::fixmonth, vehicle_priv::fixtime, vehicle_priv::fixyear, vehicle_priv::geo, vehicle_priv::hdop, vehicle_priv::height, item::id_lo, attr::item, lvl_debug, vehicle_priv::magnetic_direction, vehicle_priv::nmea_data, attr::num, attr::numd, vehicle_priv::sat_item, vehicle_priv::sats_signal, vehicle_priv::sats_used, vehicle_priv::sats_visible, vehicle_priv::speed, vehicle_priv::status, attr::str, type, attr::type, attr::u, and vehicle_priv::valid.
|
static |
Cancel previous fix timeout event and add a new one.
priv | Pointer on the private data of the plugin |
References vehicle_priv::cb_fix_timeout, vehicle_priv::ev_fix_timeout, event_add_timeout(), and event_remove_timeout().
Referenced by vehicle_file_parse().
|
static |
Function called to get satellite attribute.
priv | Pointer on the private data of the plugin |
type | Attribute type called |
attr | Structure to return the attribute value |
References gps_sat::azimuth, vehicle_priv::current, vehicle_priv::current_count, gps_sat::elevation, item::id_lo, attr::num, gps_sat::prn, vehicle_priv::sat_item, gps_sat::snr, type, attr::type, and attr::u.
struct attr ** vehicle_priv::attrs |
Referenced by vehicle_file_new_file(), vehicle_gpsd_dbus_new(), vehicle_gpsd_new_gpsd(), vehicle_gpsd_position_attr_get(), vehicle_gypsy_new_gypsy(), vehicle_gypsy_position_attr_get(), vehicle_maemo_new_maemo(), vehicle_maemo_position_attr_get(), vehicle_qt5_new_qt5(), vehicle_qt5_position_attr_get(), vehicle_webos_new(), and vehicle_wince_new().
int gps_sat::azimuth |
Referenced by vehicle_file_parse(), vehicle_file_sat_attr_get(), vehicle_wince_parse(), and vehicle_wince_sat_attr_get().
speed_t vehicle_priv::baudrate |
Referenced by initDevice(), vehicle_file_new_file(), vehicle_file_open(), and vehicle_wince_new().
char * vehicle_priv::buffer |
int vehicle_priv::buffer_pos |
Referenced by vehicle_file_io(), vehicle_webos_spp_handle_read(), and vehicle_wince_io().
|
static |
Referenced by file_data_read_special(), vehicle_file_io(), and vehicle_file_new_file().
struct callback * vehicle_priv::cb |
struct callback * vehicle_priv::cb_fix_timeout |
struct callback_list * vehicle_priv::cbl |
Referenced by QNavitGeoReceiver::positionUpdated(), QNavitGeoReceiver::satellitesInUseUpdated(), QNavitGeoReceiver::satellitesInViewUpdated(), vehicle_android_fix_callback(), vehicle_android_new_android(), vehicle_android_position_callback(), vehicle_android_status_callback(), vehicle_demo_new(), vehicle_demo_set_attr_do(), vehicle_demo_timer(), vehicle_file_fix_timeout_cb(), vehicle_file_io(), vehicle_file_new_file(), vehicle_gpsd_callback(), vehicle_gpsd_dbus_filter(), vehicle_gpsd_dbus_new(), vehicle_gpsd_new_gpsd(), vehicle_gypsy_course_changed(), vehicle_gypsy_fixstatus_changed(), vehicle_gypsy_new_gypsy(), vehicle_gypsy_position_changed(), vehicle_gypsy_satellite_changed(), vehicle_iphone_new(), vehicle_iphone_update(), vehicle_maemo_callback(), vehicle_maemo_new_maemo(), vehicle_null_new_null(), vehicle_null_set_attr(), vehicle_qt5_new_qt5(), vehicle_qt5_set_attr(), vehicle_webos_gps_update(), vehicle_webos_new(), vehicle_webos_timeout_callback(), vehicle_wince_fix_timeout_cb(), vehicle_wince_io(), and vehicle_wince_new().
struct callback * vehicle_priv::cbt |
int vehicle_priv::checksum_ignore |
Referenced by vehicle_file_new_file(), vehicle_file_parse(), vehicle_wince_new(), and vehicle_wince_parse().
struct gps_sat vehicle_priv::current |
Referenced by vehicle_file_parse(), vehicle_file_sat_attr_get(), vehicle_wince_parse(), and vehicle_wince_sat_attr_get().
int vehicle_priv::current_count |
double vehicle_priv::direction |
Bearing in degrees
Referenced by QNavitGeoReceiver::positionUpdated(), vehicle_android_position_attr_get(), vehicle_android_position_callback(), vehicle_demo_position_attr_get(), vehicle_demo_timer(), vehicle_file_parse(), vehicle_file_position_attr_get(), vehicle_gpsd_callback(), vehicle_gpsd_position_attr_get(), vehicle_gypsy_course_changed(), vehicle_gypsy_position_attr_get(), vehicle_iphone_position_attr_get(), vehicle_iphone_update(), vehicle_maemo_callback(), vehicle_maemo_position_attr_get(), vehicle_null_position_attr_get(), vehicle_null_set_attr(), vehicle_qt5_position_attr_get(), vehicle_qt5_set_attr(), vehicle_wince_parse(), and vehicle_wince_position_attr_get().
int gps_sat::elevation |
Referenced by vehicle_file_parse(), vehicle_file_sat_attr_get(), vehicle_wince_parse(), and vehicle_wince_sat_attr_get().
struct event_timeout * vehicle_priv::ev_fix_timeout |
int vehicle_priv::fd |
FILE* vehicle_priv::file |
Referenced by vehicle_file_close(), and vehicle_file_open().
enum file_type vehicle_priv::file_type |
int vehicle_priv::fixday |
char vehicle_priv::fixiso8601 |
Timestamp of last fix in ISO 8601 format
Referenced by vehicle_android_position_attr_get(), vehicle_android_position_callback(), vehicle_file_position_attr_get(), vehicle_gpsd_dbus_position_attr_get(), vehicle_gpsd_position_attr_get(), vehicle_gypsy_position_attr_get(), vehicle_maemo_position_attr_get(), vehicle_null_position_attr_get(), vehicle_qt5_position_attr_get(), vehicle_webos_position_attr_get(), and vehicle_wince_position_attr_get().
int vehicle_priv::fixmonth |
char vehicle_priv::fixtime |
int vehicle_priv::fixyear |
struct coord_geo vehicle_priv::geo |
The last known position of the vehicle
Referenced by QNavitGeoReceiver::positionUpdated(), vehicle_android_position_attr_get(), vehicle_android_position_callback(), vehicle_demo_position_attr_get(), vehicle_demo_set_attr_do(), vehicle_demo_timer(), vehicle_file_parse(), vehicle_file_position_attr_get(), vehicle_gpsd_callback(), vehicle_gpsd_dbus_filter(), vehicle_gpsd_dbus_position_attr_get(), vehicle_gpsd_position_attr_get(), vehicle_gypsy_position_attr_get(), vehicle_gypsy_position_changed(), vehicle_iphone_new(), vehicle_iphone_position_attr_get(), vehicle_iphone_update(), vehicle_maemo_callback(), vehicle_maemo_position_attr_get(), vehicle_null_position_attr_get(), vehicle_null_set_attr(), vehicle_qt5_position_attr_get(), vehicle_qt5_set_attr(), vehicle_webos_gps_update(), vehicle_webos_parse_nmea(), vehicle_webos_position_attr_get(), vehicle_wince_parse(), and vehicle_wince_position_attr_get().
double vehicle_priv::hdop |
Referenced by vehicle_file_parse(), vehicle_file_position_attr_get(), vehicle_gpsd_callback(), vehicle_gpsd_position_attr_get(), vehicle_maemo_callback(), vehicle_maemo_position_attr_get(), vehicle_webos_parse_nmea(), vehicle_webos_position_attr_get(), vehicle_wince_parse(), and vehicle_wince_position_attr_get().
double vehicle_priv::height |
Elevation in meters
Referenced by QNavitGeoReceiver::positionUpdated(), vehicle_android_position_attr_get(), vehicle_android_position_callback(), vehicle_file_parse(), vehicle_file_position_attr_get(), vehicle_gpsd_callback(), vehicle_gpsd_position_attr_get(), vehicle_gypsy_position_attr_get(), vehicle_gypsy_position_changed(), vehicle_maemo_callback(), vehicle_maemo_position_attr_get(), vehicle_null_position_attr_get(), vehicle_qt5_position_attr_get(), vehicle_wince_parse(), and vehicle_wince_position_attr_get().
int vehicle_priv::magnetic_direction |
struct gps_sat vehicle_priv::next |
Referenced by vehicle_file_parse(), and vehicle_wince_parse().
int vehicle_priv::next_count |
Referenced by vehicle_file_parse(), and vehicle_wince_parse().
char * vehicle_priv::nmea_data |
char * vehicle_priv::nmea_data_buf |
Referenced by vehicle_file_parse(), vehicle_gpsd_callback(), vehicle_webos_parse_nmea(), and vehicle_wince_parse().
int vehicle_priv::on_eof |
Referenced by vehicle_file_io(), vehicle_file_new_file(), vehicle_wince_io(), and vehicle_wince_new().
int gps_sat::prn |
Referenced by vehicle_file_parse(), vehicle_file_sat_attr_get(), vehicle_wince_parse(), and vehicle_wince_sat_attr_get().
int vehicle_priv::process_statefile |
Referenced by vehicle_file_io(), and vehicle_file_new_file().
struct item vehicle_priv::sat_item |
int vehicle_priv::sats_signal |
int vehicle_priv::sats_used |
Number of satellites used in fix
Referenced by QNavitGeoReceiver::satellitesInUseUpdated(), vehicle_android_new_android(), vehicle_android_position_attr_get(), vehicle_android_status_callback(), vehicle_file_parse(), vehicle_file_position_attr_get(), vehicle_gpsd_callback(), vehicle_gpsd_position_attr_get(), vehicle_gypsy_position_attr_get(), vehicle_gypsy_satellite_changed(), vehicle_maemo_callback(), vehicle_maemo_position_attr_get(), vehicle_qt5_position_attr_get(), vehicle_webos_parse_nmea(), vehicle_webos_position_attr_get(), vehicle_wince_parse(), and vehicle_wince_position_attr_get().
int vehicle_priv::sats_visible |
int gps_sat::snr |
Referenced by vehicle_file_parse(), vehicle_file_sat_attr_get(), vehicle_wince_parse(), and vehicle_wince_sat_attr_get().
char * vehicle_priv::source |
Referenced by initDevice(), QNavitGeoReceiver::QNavitGeoReceiver(), vehicle_file_destroy(), vehicle_file_new_file(), vehicle_file_open(), vehicle_gpsd_dbus_destroy(), vehicle_gpsd_dbus_set_attr_do(), vehicle_gpsd_destroy(), vehicle_gpsd_new_gpsd(), vehicle_gpsd_try_open(), vehicle_gypsy_destroy(), vehicle_gypsy_new_gypsy(), vehicle_gypsy_try_open(), vehicle_maemo_new_maemo(), vehicle_maemo_open(), vehicle_qt5_destroy(), vehicle_qt5_new_qt5(), vehicle_webos_destroy(), vehicle_webos_set_attr_do(), vehicle_wince_destroy(), vehicle_wince_new(), vehicle_wince_open(), and wince_reader_thread().
double vehicle_priv::speed |
Speed in km/h
Referenced by QNavitGeoReceiver::positionUpdated(), vehicle_android_position_attr_get(), vehicle_android_position_callback(), vehicle_demo_position_attr_get(), vehicle_demo_timer(), vehicle_file_parse(), vehicle_file_position_attr_get(), vehicle_gpsd_callback(), vehicle_gpsd_dbus_filter(), vehicle_gpsd_dbus_position_attr_get(), vehicle_gpsd_position_attr_get(), vehicle_gypsy_course_changed(), vehicle_gypsy_position_attr_get(), vehicle_iphone_position_attr_get(), vehicle_iphone_update(), vehicle_maemo_callback(), vehicle_maemo_position_attr_get(), vehicle_null_position_attr_get(), vehicle_null_set_attr(), vehicle_qt5_position_attr_get(), vehicle_qt5_set_attr(), vehicle_webos_gps_update(), vehicle_webos_parse_nmea(), vehicle_webos_position_attr_get(), vehicle_wince_parse(), and vehicle_wince_position_attr_get().
char* vehicle_priv::statefile |
Referenced by vehicle_file_destroy(), vehicle_file_io(), and vehicle_file_new_file().
int vehicle_priv::status |
int vehicle_priv::time |
Referenced by vehicle_file_new_file(), vehicle_file_parse(), vehicle_gpsd_dbus_filter(), and vehicle_wince_new().
int vehicle_priv::valid |
Whether the vehicle coordinates in
are valid
Referenced by vehicle_android_fix_callback(), vehicle_android_new_android(), vehicle_android_position_attr_get(), vehicle_android_position_callback(), vehicle_demo_new(), vehicle_demo_position_attr_get(), vehicle_demo_set_attr_do(), vehicle_demo_timer(), vehicle_file_fix_timeout_cb(), vehicle_file_parse(), vehicle_file_position_attr_get(), vehicle_webos_parse_nmea(), vehicle_wince_fix_timeout_cb(), vehicle_wince_parse(), and vehicle_wince_position_attr_get().
double vehicle_priv::vdop |
|
static |
Referenced by vehicle_file_new_file().
|
static |
Referenced by vehicle_file_new_file().
struct event_watch* vehicle_priv::watch |
Referenced by vehicle_file_disable_watch(), vehicle_file_enable_watch(), and vehicle_file_parse().