Revision 1903
Added a "feature id" field in bits 13,14,15,16 of the database ints, documented accordingly
intersectData.h | ||
---|---|---|
1 | 1 |
#ifndef _INTERSECTION_DATABASE_ |
2 | 2 |
#define _INTERSECTION_DATABASE_ |
3 |
#define NUM_INTERSECTIONS 1 |
|
3 | 4 |
|
4 |
|
|
5 | 5 |
/**************************** |
6 | 6 |
* Intersection Information: 5-bit Integer |
7 | 7 |
* 3 bits of intersection type |
8 | 8 |
* 2 bits of entry information |
9 |
* |
|
10 |
* Also contains a "feature id": 4 bits in positions 13,14,15,16 |
|
9 | 11 |
* |
10 | 12 |
****************************/ |
11 | 13 |
|
... | ... | |
80 | 82 |
#define R_RAMP 2 |
81 | 83 |
|
82 | 84 |
// Global variable for the intersection database. You can change the size here. Size == number of intersections. |
83 |
int IntersectData[1];
|
|
85 |
int IntersectData[NUM_INTERSECTIONS];
|
|
84 | 86 |
|
85 | 87 |
void initializeData(); |
86 |
void insertIntersection(int barcode, int intersect_type, int intersect_position);
|
|
88 |
void insertIntersection(int key, int featureid, int intersect_type, int intersect_position);
|
|
87 | 89 |
|
88 | 90 |
// Functions to get data from the Database: |
89 |
int getIntersectType(int barcode); |
|
90 |
int getIntersectPos(int barcode); |
|
91 |
int getIntersectType(int entry); |
|
92 |
int getIntersectPos(int entry); |
|
93 |
int getFeatureId(int entry); |
|
91 | 94 |
|
92 | 95 |
#endif |
Also available in: Unified diff