void NetworkManager::SelectTargetNode (UserEquipment* ue) { NetworkNode* targetNode = ue->GetTargetNode (); if (targetNode->GetProtocolStack ()->GetRrcEntity ()-> GetHandoverEntity ()->CheckHandoverNeed (ue)) { NetworkNode* newTagertNode = targetNode->GetProtocolStack ()->GetRrcEntity ()-> GetHandoverEntity ()->GetHoManager ()->m_target; ue->SetTargetNode (newTagertNode); } }
void NetworkManager::UpdateUserPosition (double time) { std::vector<UserEquipment*> *records = GetUserEquipmentContainer (); std::vector<UserEquipment*>::iterator iter; UserEquipment *record; #ifdef MOBILITY_DEBUG std::cout << "MOBILITY_DEBUG: UPDATE POSITION, " "number of UE = " << records->size () << " time = " << time << std::endl; #endif for (iter = records->begin(); iter != records->end(); iter++) { record = *iter; #ifdef MOBILITY_DEBUG std::cout << "\t USER " << record->GetIDNetworkNode () << std::endl; #endif record->UpdateUserPosition (time); record->SetIndoorFlag( CheckIndoorUsers(record) ); #ifdef AMC_MAPPING std::cout << "time: " << time << "\n\t position: " << record->GetMobilityModel ()->GetAbsolutePosition ()->GetCoordinateX () << " " << record->GetMobilityModel ()->GetAbsolutePosition ()->GetCoordinateY () << std::endl; #endif #ifdef MOBILITY_DEBUG std::cout << "time: " << time << "\t position: " << record->GetMobilityModel ()->GetAbsolutePosition ()->GetCoordinateX () << " " << record->GetMobilityModel ()->GetAbsolutePosition ()->GetCoordinateY () << std::endl; #endif if (record->GetMobilityModel ()->GetHandover () == true) { NetworkNode* targetNode = record->GetTargetNode (); if (targetNode->GetProtocolStack ()->GetRrcEntity ()-> GetHandoverEntity ()->CheckHandoverNeed (record)) { NetworkNode* newTagertNode = targetNode->GetProtocolStack () ->GetRrcEntity ()->GetHandoverEntity ()->GetHoManager ()->m_target; #ifdef HANDOVER_DEBUG std::cout << "** HO ** \t time: " << time << " user " << record->GetIDNetworkNode () << " old eNB " << targetNode->GetIDNetworkNode () << " new eNB " << newTagertNode->GetIDNetworkNode () << std::endl; #endif HandoverProcedure(time, record, targetNode, newTagertNode); } } } //PrintUEsForEachCell(); }