Statistics
| Revision:

## root / trunk / code / projects / traffic_navigation / mapping.h @ 1984

 1 ```#ifndef __INTERSECTION_MAPPING_H__ ``` ```#define __INTERSECTION_MAPPING_H__ ``` ```#include "intersectData.h" ``` ```/* Data is sent in the following order ``` ``` * INT0_NUM OUTEDGE_0 OUTEDGE_1 ... \n ``` ``` * INT1_NUM OUTEDGE_0 ... \n ``` ``` * ... ``` ``` * ... ``` ``` */ ``` ```/* Representation of an edge (road) */ ``` ```typedef struct { ``` ``` char to; /* Where does this edge lead to? */ ``` ``` char dist; /* Where does it come from? */ ``` ```} edge; ``` ```/* Representation of an intersection on the graph */ ``` ```typedef struct { ``` ``` char type; /* Note that there are at most 5 intersection types */ ``` ``` char intNum; /* What is the intersection number */ ``` ``` char numOut; /* Note that we can have no more than 4 outgoing edges */ ``` ``` char outSeen; /* The number of the outgoing edges that we have seen for this intersection */ ``` ``` edge outgoingEdges[4]; ``` ```} node; ``` ```/* A union that is used in wireless transmissions */ ``` ```typedef union { ``` ``` node n; ``` ``` char array[12]; ``` ```}node_union; ``` ```char driveToNextInt(void); ``` ```char createEdge(edge* newEdge, int type, int direction); ``` ```void initGraph(char* seen, char* seenout); ``` ```int createMap(void); ``` ```int getNumOut(int type); ``` ```int insertEdge(void); ``` ```int nextInt(void); ``` ```int encodeNode(node n); ``` ```void sendIntersectionGraph(void); ``` ```extern node intersections[NUM_FEATURES]; ``` ```#endif ```