Changeset 113 in tmcsimulator for branches/FEPSimulator/FEPSim.cpp


Ignore:
Timestamp:
10/14/2017 09:18:40 AM (9 years ago)
Author:
jtorres
Message:

LinuxVM non-segfaulting FEPSimulator - checkpoint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/FEPSimulator/FEPSim.cpp

    r86 r113  
    88} 
    99 
    10 FEPSim::~FEPSim() { 
    11  
     10FEPSim::~FEPSim() {  
    1211} 
    1312 
    1413void 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"); 
    1816    } 
    1917    // Successful RPC Call 
    20     else { 
    21         cout << "Successful RPC call to ATMS..." << endl; 
     18    else { cout << "Successful RPC call to ATMS..." << endl; 
    2219    } 
    2320} 
     
    5855        fepReply.answers.size = 1; 
    5956        fepReply.answers.fep_answer_list_u.shortp.count = 1; 
    60  
     57         
    6158        // construct a shortanswer for each station in line 
    6259        for (int j = 0; j < lines.at(i)->lds.size(); j++) { 
     
    6865            fsa.msg.message[0] = 0x0d; 
    6966            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]);   
    7169                fsa.msg.message[2 + k] = ldsMap.at(index)->dataPack[k]; 
     70            } 
    7271            int aa = ldsMap.at(index)->length; 
    7372            fsa.msg.message[2 + aa] = 0x0d; 
    7473            fsa.msg.message[3 + aa] = 0xff; 
    75  
    76             // info 
     74   // info 
    7775            fsa.info.poll_error_count = 0; 
    7876            fsa.info.poll_user_info1 = ldsMap.at(index)->drop; // drop number 
     
    8280 
    8381            fepReply.answers.fep_answer_list_u.shortp.answers[0] = fsa; 
    84  
    8582            // send out data 
    8683            printf("Transferring line=%d, lds_drop_no=%d...\n", lines.at(i)->lineNum, ldsMap.at(index)->drop); 
Note: See TracChangeset for help on using the changeset viewer.