Changeset 74 in tmcsimulator
- Timestamp:
- 09/07/2017 07:34:43 PM (9 years ago)
- File:
-
- 1 edited
-
branches/fep_client_cpp/network_factory.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/fep_client_cpp/network_factory.cpp
r73 r74 4 4 5 5 // determine if a loop has data based on lane config data 6 bool DataAvail(char flag, int num) 7 { 6 bool DataAvail(char flag, int num) { 8 7 int mag, fel; 9 8 … … 155 154 // TEST DATA 156 155 // lds_id line drop sch lineinfo system_key sch_seq glo_seq count freeway Dir ca_pm lds_name 157 // 120 8926 29 4 28 28 1123006080 26480 1357609 13 73 S 23.7 MACARTHUR 1156 // 1203103 50 13 13 13 1123005873 24148 1357650 19 55 S 6.88 MACARTHU1 158 157 FEP_LINE_LDS * load_lines(int *size, const char * fName) 159 158 { 160 159 FEP_LINE_LDS *lines = (FEP_LINE_LDS *) calloc(sizeof(FEP_LINE_LDS), 1); 161 160 *size = 1; 162 lines[0].lineNum = 29;163 lines[0].lds.push_back(120 8926);161 lines[0].lineNum = 50; 162 lines[0].lds.push_back(1203103); 164 163 lines[0].ldsIndex.push_back(0); 165 164 lines[0].ldsNum = 1; 166 lines[0].count = 1 3;167 lines[0].schedule = 28;168 lines[0].globalSeq = 13576 09;169 lines[0].schedleSeq = 2 6480;165 lines[0].count = 19; 166 lines[0].schedule = 13; 167 lines[0].globalSeq = 1357650; 168 lines[0].schedleSeq = 24148; 170 169 return lines; 171 170 } … … 173 172 // TEST DATA 174 173 //FWY Dir POSTMI LDS_ID VDS_ID LOOP_ID LOC LANE LOOP_LOC PARAMICS_NAME PARAMICS_LANE 175 //73 S 23.7 1208926 1210494 1210490 ML 1 ML_1 ? 0 176 //73 S 23.7 1208926 1210494 1210492 ML 2 ML_2 ? 0 177 //73 S 23.7 1208926 1210494 1210493 ML 3 ML_3 ? 0 178 //73 S 23.7 1208926 1210770 1210769 OR 1 RAMP_ON ? 0 174 //55 S 6.88 1203103 1203104 1203105 QU 1 QUEUE 55s6.88ora 0 175 176 //55 S 6.88 1203103 1203104 1203106 DM 2 DEMAND 55s6.88ora 0 177 178 //55 S 6.88 1203103 1203104 1203107 PA 3 PASSAGE 55s6.88ora 0 179 180 //55 S 6.88 1203103 1203108 1203109 HV 1 SD_1 ? 0 181 182 //55 S 6.88 1203103 1203110 1203111 ML 1 ML_1 55s6.88ml 4 183 184 //55 S 6.88 1203103 1203110 1203112 ML 2 ML_2 55s6.88ml 3 185 186 //55 S 6.88 1203103 1203110 1203113 ML 3 ML_3 55s6.88ml 2 187 188 //55 S 6.88 1203103 1203110 1203114 ML 4 ML_4 55s6.88ml 1 179 189 LDS_LOOP * load_lds(const char * fName) 180 190 { 181 191 /* Read loop meta data */ 182 192 LDS_LOOP *lds_map = (LDS_LOOP *) calloc(sizeof(LDS_LOOP), 1); 183 lds_map[0].lds = 120 8926;184 lds_map[0].line_num = 29;185 lds_map[0].drop = 4;186 lds_map[0].num = 4;193 lds_map[0].lds = 1203103; 194 lds_map[0].line_num = 50; 195 lds_map[0].drop = 13; 196 lds_map[0].num = 1; 187 197 188 198 // Loop ids 189 199 long *loopIDs = (long *) calloc(sizeof(long), lds_map[0].num); 190 loopIDs[0] = 1210490; 191 loopIDs[1] = 1210492; 192 loopIDs[2] = 1210493; 193 loopIDs[3] = 1210769; 200 loopIDs[0] = 1203113; 194 201 lds_map[0].loopID = loopIDs; 195 202 196 203 // Loop locations 197 char *one = "ML_1"; 198 char *two = "ML_2"; 199 char *three = "ML_3"; 200 char *four = "RAMP_ON"; 201 char **loc = (char **) calloc(sizeof(char *), lds_map[0].num); 202 loc[0] = one; 203 loc[1] = two; 204 loc[2] = three; 205 loc[3] = four; 206 lds_map[0].loop_loc = loc; 204 char *loc = "ML_3"; 205 lds_map[0].loop_loc = &loc; 207 206 208 207 // Init Loop dataPack … … 212 211 lds_map[0].pos = 0; 213 212 214 lds_map[0].MlTotVol = 0;215 lds_map[0].OppTotVol = 0;213 lds_map[0].MlTotVol = 150; 214 lds_map[0].OppTotVol = 150; 216 215 217 216 return lds_map;
Note: See TracChangeset
for help on using the changeset viewer.
