Changeset 113 in tmcsimulator for branches/FEPSimulator
- Timestamp:
- 10/14/2017 09:18:40 AM (9 years ago)
- Location:
- branches/FEPSimulator
- Files:
-
- 3 edited
-
DataPacker.cpp (modified) (4 diffs)
-
FEPSim.cpp (modified) (4 diffs)
-
build/Debug/GNU-MacOSX/Main.o.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/FEPSimulator/DataPacker.cpp
r80 r113 1 1 #include "DataPacker.h"; 2 #include <stdio.h> 2 3 3 4 unsigned char * DataPacker::msg; … … 7 8 DataPacker packer; 8 9 msg = packer.staticDataPack(station); 9 pos = packer.dynamicDataPack(station, 5, pos);10 /* pos = packer.dynamicDataPack(station, 5, pos); 10 11 pos = packer.dynamicDataPack(station, 6, pos); 11 12 pos = packer.dynamicDataPack(station, 7, pos); … … 19 20 // will need to check if queue override is enabled (Currently, no queue 20 21 // ldsMap[i].dataPack[16-1] = ; 21 22 */ 22 23 // byte 23: MAINLINE total volume 23 24 msg[23 - 1] = station->MlTotVol; … … 30 31 packer.chksum(msg, station->length - 1 - 1); 31 32 32 /*33 33 for (int j = 0; j < station->length; j++) { 34 34 printf("%02X", msg[j]); 35 35 } 36 36 printf("\n"); 37 */ 37 38 return msg; 38 39 } 39 40 -
branches/FEPSimulator/FEPSim.cpp
r86 r113 8 8 } 9 9 10 FEPSim::~FEPSim() { 11 10 FEPSim::~FEPSim() { 12 11 } 13 12 14 13 void FEPSim::handleCallResponse(void *response) { 15 // Failed RPC Call 16 if (response == NULL) { 17 clnt_perror(clnt, "RPC call failed"); 14 // Failed RPC Call 15 if (response == NULL) { clnt_perror(clnt, "RPC call failed"); 18 16 } 19 17 // Successful RPC Call 20 else { 21 cout << "Successful RPC call to ATMS..." << endl; 18 else { cout << "Successful RPC call to ATMS..." << endl; 22 19 } 23 20 } … … 58 55 fepReply.answers.size = 1; 59 56 fepReply.answers.fep_answer_list_u.shortp.count = 1; 60 57 61 58 // construct a shortanswer for each station in line 62 59 for (int j = 0; j < lines.at(i)->lds.size(); j++) { … … 68 65 fsa.msg.message[0] = 0x0d; 69 66 fsa.msg.message[1] = 0x0a; 70 for (int k = 0; k < ldsMap.at(index)->length; k++) 67 for (int k = 0; k < ldsMap.at(index)->length; k++) { 68 printf("Adding: %d %02X\n", k, ldsMap.at(index)->dataPack[k]); 71 69 fsa.msg.message[2 + k] = ldsMap.at(index)->dataPack[k]; 70 } 72 71 int aa = ldsMap.at(index)->length; 73 72 fsa.msg.message[2 + aa] = 0x0d; 74 73 fsa.msg.message[3 + aa] = 0xff; 75 76 // info 74 // info 77 75 fsa.info.poll_error_count = 0; 78 76 fsa.info.poll_user_info1 = ldsMap.at(index)->drop; // drop number … … 82 80 83 81 fepReply.answers.fep_answer_list_u.shortp.answers[0] = fsa; 84 85 82 // send out data 86 83 printf("Transferring line=%d, lds_drop_no=%d...\n", lines.at(i)->lineNum, ldsMap.at(index)->drop); -
branches/FEPSimulator/build/Debug/GNU-MacOSX/Main.o.d
r101 r113 1 1 build/Debug/GNU-MacOSX/Main.o: Main.cpp FEPSim.h fep.h NetworkReader.h \ 2 network.h tinyxml/tinyxml.h tinyxml/tinystr.h DataPacker.h2 network.h tinyxml/tinyxml.h tinyxml/tinystr.h DataPacker.h 3 3 4 4 FEPSim.h:
Note: See TracChangeset
for help on using the changeset viewer.
