1 |
zoff99 |
2 |
/**
|
2 |
|
|
* Navit, a modular navigation system.
|
3 |
|
|
* Copyright (C) 2005-2008 Navit Team
|
4 |
|
|
*
|
5 |
|
|
* This program is free software; you can redistribute it and/or
|
6 |
|
|
* modify it under the terms of the GNU General Public License
|
7 |
|
|
* version 2 as published by the Free Software Foundation.
|
8 |
|
|
*
|
9 |
|
|
* This program is distributed in the hope that it will be useful,
|
10 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 |
|
|
* GNU General Public License for more details.
|
13 |
|
|
*
|
14 |
|
|
* You should have received a copy of the GNU General Public License
|
15 |
|
|
* along with this program; if not, write to the
|
16 |
|
|
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
17 |
|
|
* Boston, MA 02110-1301, USA.
|
18 |
|
|
*/
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
#ifdef __cplusplus
|
22 |
|
|
extern "C" {
|
23 |
|
|
#endif
|
24 |
|
|
struct vehicleprofile {
|
25 |
|
|
int mode; /**< 0 = Auto, 1 = On-Road, 2 = Off-Road */
|
26 |
|
|
int flags_forward_mask; /**< Flags mask for moving in positive direction */
|
27 |
|
|
int flags_reverse_mask; /**< Flags mask for moving in reverse direction */
|
28 |
|
|
int flags; /**< Required flags to move through a segment */
|
29 |
|
|
int maxspeed_handling; /**< 0 = Always, 1 = Only if lower, 2 = Never */
|
30 |
|
|
int static_speed; /**< Maximum speed of vehicle to consider it stationary */
|
31 |
|
|
int static_distance; /**< Maximum distance of previous position of vehicle to consider it stationary */
|
32 |
|
|
char *name; /**< the vehicle profile name */
|
33 |
|
|
int width; /**< Width of the vehicle in cm */
|
34 |
|
|
int height; /**< Height of the vehicle in cm */
|
35 |
|
|
int length; /**< Length of the vehicle in cm */
|
36 |
|
|
int weight; /**< Weight of the vehicle in kg */
|
37 |
|
|
int axle_weight; /**< Axle Weight of the vehicle in kg */
|
38 |
|
|
int dangerous_goods; /**< Flags of dangerous goods present */
|
39 |
|
|
int through_traffic_penalty; /**< Penalty when driving on a through traffic limited road */
|
40 |
|
|
struct attr **attrs;
|
41 |
|
|
GHashTable *roadprofile_hash;
|
42 |
|
|
};
|
43 |
|
|
|
44 |
|
|
struct vehicleprofile * vehicleprofile_new(struct attr *parent, struct attr **attrs);
|
45 |
|
|
int vehicleprofile_get_attr(struct vehicleprofile *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
|
46 |
|
|
int vehicleprofile_set_attr(struct vehicleprofile *this_, struct attr *attr);
|
47 |
|
|
int vehicleprofile_add_attr(struct vehicleprofile *this_, struct attr *attr);
|
48 |
|
|
int vehicleprofile_remove_attr(struct vehicleprofile *this_, struct attr *attr);
|
49 |
|
|
struct roadprofile * vehicleprofile_get_roadprofile(struct vehicleprofile *this_, enum item_type type);
|
50 |
|
|
|
51 |
|
|
//! Returns the vehicle profile's name.
|
52 |
|
|
char * vehicleprofile_get_name(struct vehicleprofile *this_);
|
53 |
|
|
#ifdef __cplusplus
|
54 |
|
|
}
|
55 |
|
|
#endif
|