void RemoteSoarCommunicator::receiveStatusMessage(IntBuffer& buffer, uint& offset){ //cout << "--> Soar Receive Status" << endl; pthread_mutex_lock(&mutex); uint numAcks = buffer[offset++]; for(uint i = 0; i < numAcks; i++){ uint ack = buffer[offset++]; CommandMapIt it = waitingCommands.find(ack); if(it != waitingCommands.end()){ waitingCommands.erase(it); } IdentifierMap::iterator jt = waitingIdentifiers.find(ack); if(jt != waitingIdentifiers.end()){ //cout << "Added "<< ack << " to finished ids " << jt->second->GetValueAsString() << endl; finishedIdentifiers.insert(jt->second); waitingIdentifiers.erase(jt); } } StatusList statuses; uint numStatuses = buffer[offset++]; for(uint i = 0; i < numStatuses; i++){ statuses.push_back(Ev3Status(buffer, offset)); } soarManager->readStatus(statuses); //cout << "<-- Soar Receive Status" << endl; pthread_mutex_unlock(&mutex); }
void SoarLcmCommunicator::receiveStatusMessage(IntBuffer& buffer, uint& offset){ //cout << "--> Soar Receive Status" << endl; StatusList statuses; uint numStatuses = buffer[offset++]; for(uint i = 0; i < numStatuses; i++){ statuses.push_back(Ev3Status(buffer, offset)); } soarManager->readStatus(statuses); //cout << "<-- Soar Receive Status" << endl; }