c_cpp 如何在使用OMNeT ++框架构建的NB-IoT模拟器中检测数据包的示例。
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp 如何在使用OMNeT ++框架构建的NB-IoT模拟器中检测数据包的示例。相关的知识,希望对你有一定的参考价值。
auto aTempPacket = pkt->dup();
if (dynamic_cast<RlcPacket *>(aTempPacket) != nullptr) {
auto aRlcPacket = omnetpp::check_and_cast<RlcPacket *>(aTempPacket);
if (aRlcPacket->hasEncapsulatedPacket()) {
auto aPdcpPacket = aRlcPacket->decapsulate();
delete aRlcPacket;
auto aTempPacket_2 = aPdcpPacket->decapsulate();
delete aPdcpPacket;
if (dynamic_cast<RrcPacket *>(aTempPacket_2) != nullptr) {
auto aRrcPacket = omnetpp::check_and_cast<RrcPacket *>(aTempPacket_2);
EV_TRACE << "PHY: Received RRC packet \"" << aRrcPacket->getName() << "\"." << std::endl;
delete aRrcPacket;
} else if (dynamic_cast<CoapPacket *>(aTempPacket_2) != nullptr) {
auto aCoapPacket = omnetpp::check_and_cast<RrcPacket *>(aTempPacket_2);
auto anAppPacket = aCoapPacket->decapsulate();
delete aCoapPacket;
EV_TRACE << "PHY: Received CoAP packet \"" << anAppPacket->getName() << "\"." << std::endl;
delete anAppPacket;
} else {
EV_TRACE << "PHY: Unknown packet" << std::endl;
}
} else {
EV_TRACE << "PHY: Received RLC packet \"" << aRlcPacket->getName() << "\"." << std::endl;
delete aRlcPacket;
}
} else {
EV_TRACE << "PHY: Unknown packet" << std::endl;
delete aTempPacket;
}
以上是关于c_cpp 如何在使用OMNeT ++框架构建的NB-IoT模拟器中检测数据包的示例。的主要内容,如果未能解决你的问题,请参考以下文章
如何在界面构建器中使用框架中的 UIView 子类
如何使用现有的静态库构建可可触控框架
如何在mac上安装gradle
如何在mac上安装gradle
如何在mac上安装gradle
如何在mac上安装gradle