traffic.h (navit-0.5.5) | : | traffic.h (navit-0.5.6) | ||
---|---|---|---|---|
skipping to change at line 61 | skipping to change at line 61 | |||
*/ | */ | |||
#ifndef NAVIT_TRAFFIC_H | #ifndef NAVIT_TRAFFIC_H | |||
#define NAVIT_TRAFFIC_H | #define NAVIT_TRAFFIC_H | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/** | /** | |||
* @brief Translates a Navit tile order to a minimum road class as used in TraFF | ||||
. | ||||
* | ||||
* This can be used to translate a map selection into a TraFF filter. | ||||
* | ||||
* The tile order is the lowest tile level in which an object of a certain type | ||||
can be placed (higher numbers | ||||
* correspond to lower levels). Currently, 8 is the maximum order for `highway_c | ||||
ity`, `highway_land` and | ||||
* `street_n_lanes`, equivalent to `MOTORWAY` and `TRUNK`. 10 is the maximum ord | ||||
er for `street_4_city` and | ||||
* `street_4_land` (`SECONDARY`), 12 for `street_3_city` and `street_3_land` (`T | ||||
ERTIARY`). All others can | ||||
* be placed in any tile level. | ||||
* | ||||
* This macro returns `PRIMARY`, `SECONDARY` and `TERTIARY` for the three bins a | ||||
bove these cut-off orders, | ||||
* corresponding to one level below the lowest road class we expect to find ther | ||||
e. (Not considering that | ||||
* low-level roads can be placed into higher-level tiles if they cross a tile bo | ||||
undary of the next lower | ||||
* level.) Below the lowest cut-off order, the macro returns NULL. | ||||
*/ | ||||
#define order_to_min_road_class(x) (x <= 8 ? "PRIMARY" : x <= 10 ? "SECONDARY" : | ||||
x <= 12 ? "TERTIARY" : NULL) | ||||
/** | ||||
* @brief Classes for events. | * @brief Classes for events. | |||
*/ | */ | |||
/* If additional event classes are introduced, traffic_event_is_valid() must be adapted to recognize them. */ | /* If additional event classes are introduced, traffic_event_is_valid() must be adapted to recognize them. */ | |||
enum event_class { | enum event_class { | |||
event_class_invalid = 0, /*!< Invalid event which should be ignored */ | event_class_invalid = 0, /*!< Invalid event which should be ignored */ | |||
event_class_congestion, /*!< Traffic congestion, typically indicating th e approximate speed */ | event_class_congestion, /*!< Traffic congestion, typically indicating th e approximate speed */ | |||
event_class_delay, /*!< Delays, typically indicating the amount of extra waiting time */ | event_class_delay, /*!< Delays, typically indicating the amount of extra waiting time */ | |||
event_class_restriction, /*!< Temporary traffic restrictions, such as roa d or lane closures or size, | event_class_restriction, /*!< Temporary traffic restrictions, such as roa d or lane closures or size, | |||
* weight or access restrictions */ | * weight or access restrictions */ | |||
}; | }; | |||
skipping to change at line 242 | skipping to change at line 260 | |||
struct traffic_message_priv; | struct traffic_message_priv; | |||
/** | /** | |||
* @brief Holds all functions a traffic plugin has to implement to be usable | * @brief Holds all functions a traffic plugin has to implement to be usable | |||
* | * | |||
* This structure holds pointers to a traffic plugin's functions which navit's c ore will call | * This structure holds pointers to a traffic plugin's functions which navit's c ore will call | |||
* to communicate with the plugin. | * to communicate with the plugin. | |||
*/ | */ | |||
struct traffic_methods { | struct traffic_methods { | |||
struct traffic_message **(* get_messages)(struct traffic_priv * this_); / **< Retrieves new messages from the traffic plugin */ | struct traffic_message **(* get_messages)(struct traffic_priv * this_); / **< Retrieves new messages from the traffic plugin */ | |||
void (*destroy)(struct traffic_priv * this_); /**< Dest ructor for the traffic plugin */ | ||||
}; | }; | |||
/** | /** | |||
* @brief A point on the road. | * @brief A point on the road. | |||
* | * | |||
* This can either be a point location or an endpoint of a linear location. It s pecifies a coordinate | * This can either be a point location or an endpoint of a linear location. It s pecifies a coordinate | |||
* pair and can optionally be supplemented with a junction name and/or number wh ere applicable. | * pair and can optionally be supplemented with a junction name and/or number wh ere applicable. | |||
*/ | */ | |||
struct traffic_point { | struct traffic_point { | |||
struct coord_geo coord; /*!< The coordinates of this point, as supplied b y the source. These may | struct coord_geo coord; /*!< The coordinates of this point, as supplied b y the source. These may | |||
skipping to change at line 992 | skipping to change at line 1011 | |||
*/ | */ | |||
void traffic_set_mapset(struct traffic *this_, struct mapset *ms); | void traffic_set_mapset(struct traffic *this_, struct mapset *ms); | |||
/** | /** | |||
* @brief Sets the route for the traffic plugin. | * @brief Sets the route for the traffic plugin. | |||
* | * | |||
* This sets the route which may get notified by the traffic plugin if traffic d istortions change. | * This sets the route which may get notified by the traffic plugin if traffic d istortions change. | |||
*/ | */ | |||
void traffic_set_route(struct traffic *this_, struct route *rt); | void traffic_set_route(struct traffic *this_, struct route *rt); | |||
/** | ||||
* @brief Destructor. | ||||
*/ | ||||
void traffic_destroy(struct traffic *this_); | ||||
/* end of prototypes */ | /* end of prototypes */ | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
0 lines changed or deleted | 33 lines changed or added |