Changeset 165 in tmcsimulator for branches/green_dot/network.h
- Timestamp:
- 10/23/2017 11:44:05 AM (9 years ago)
- File:
-
- 1 edited
-
branches/green_dot/network.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/green_dot/network.h
r138 r165 9 9 const int CONTROL_DATA_LEN = 27; 10 10 char * const dp5[8] = { "ML_1", "ML_2", "ML_3", "ML_4", "ML_5", 11 "ML_6", "HOV_Lane", "FYW_Conn"};11 "ML_6", "HOV_Lane", "FYW_Conn"}; 12 12 char * const dp6[8] = { "OS_1", "OS_2", "OS_3", "OS_4", "OS_5", 13 "OS_6", "COLL_DIST_2", "COLL_DIST_OFF"};13 "OS_6", "COLL_DIST_2", "COLL_DIST_OFF"}; 14 14 char * const dp7[8] = { "DEMAND", "PASSAGE", "QUEUE", "RAMP_ON", 15 "RAMP_OFF", "RAMP_HOV", "COLL_DIST_1", "COLL_DIST_ON"};15 "RAMP_OFF", "RAMP_HOV", "COLL_DIST_1", "COLL_DIST_ON"}; 16 16 char * const dp8[8] = { "SD_1", "SD_2", "SD_3", "SD_4", "SD_5", 17 "SD_6", "Pass_Vol_Count", "X"};17 "SD_6", "Pass_Vol_Count", "X"}; 18 18 19 19 /*** NETWORK STRUCTS ***/ … … 21 21 struct loopagg 22 22 { 23 int index;24 char lane; // how namy lanes at the detector station25 long time;26 int interval;27 int g_vol;28 float g_occ;29 double g_spd;30 int *vol;31 float *occ;32 double *spd;23 int index; 24 char lane; // how namy lanes at the detector station 25 long time; 26 int interval; 27 int g_vol; 28 float g_occ; 29 double g_spd; 30 int *vol; 31 float *occ; 32 double *spd; 33 33 }; 34 34 … … 37 37 struct fep_line_lds 38 38 { 39 int lineNum;40 vector<long> lds;41 vector<long> ldsIndex; // location in ldsMap42 short ldsNum; // actual number of lds on the line39 int lineNum; 40 vector<long> lds; 41 vector<long> ldsIndex; // location in ldsMap 42 short ldsNum; // actual number of lds on the line 43 43 44 short count; // actual count from caltrans 45 int schedule; 46 int lineInfo; 47 long systemKey; 48 long globalSeq; 49 long schedleSeq; 44 short count; // actual count from caltrans 45 int schedule; 46 int lineInfo; 47 long systemKey; 48 long globalSeq; 49 long schedleSeq; 50 }; 51 // Loop detector 52 typedef struct loop LOOP; 53 struct loop 54 { 55 long loopID; 56 char *loop_loc; 57 58 int vol; 59 float occ; 60 double spd; 50 61 }; 51 62 52 63 // Loop detector station: has several loops 53 typedef struct Lds_loop LDS_LOOP;54 struct Lds_loop64 typedef struct Station STATION; 65 struct Station 55 66 { 56 // Each lds has its own line_num and drop (Caltrans use)57 long lds;58 short line_num;59 short drop;67 // Each lds has its own line_num and drop (Caltrans use) 68 long lds; 69 short line_num; 70 short drop; 60 71 61 int num; // number of loops 62 long *loopID; 63 char **loop_loc; 72 vector<LOOP*> loops; 64 73 65 // LDS data 66 unsigned char *dataPack; 67 int length; // total length of data (max: 87) 68 int pos; // pointer for data preparation 69 int MlTotVol; // each 30 sec, the following will be updated 70 int OppTotVol; // each 30 sec, the following will be updated 74 int num; // number of loops 75 // LDS data 76 unsigned char *dataPack; 77 int length; // total length of data (max: 87) 78 int pos; // pointer for data preparation 79 int MlTotVol; // each 30 sec, the following will be updated 80 int OppTotVol; // each 30 sec, the following will be updated 81 }; 82 // A helper structure used to pack the volume and occupancy at a loop into 83 // // a two byte message 84 typedef struct volOcc VOLOCC; 85 struct volOcc 86 { 87 char high; 88 char low; 71 89 }; 72 90 91 92 73 93 #endif
Note: See TracChangeset
for help on using the changeset viewer.
