簡體   English   中英

檢查並投射 O.net++ TSN 中的錯誤。 無法傳輸UDP個數據包

[英]Check and cast error in Omnet++ TSN. Unable to transmit UDP packets

我正在嘗試通過連接到路由器的 TSN 交換機將 UDP 數據包從 O.nett ++ TSN 設備發送到標准主機。 但是,我收到以下 check_and_cast 錯誤:-

check_and_cast(): Cannot cast(inet::physicallayer::signal*)app[0]-0 to type 'inet::physicallayer::EthernetSignalBase *' in module (inet::EthernetMac) of router.eth[0].mac

我的 o.netpp.ini udp 應用程序設置如下。

extends = omnetpptsnnetworksample

#Source application
*.tsnDevice1.numApps = 1
*.tsnDevice1.app[0].typename = "UdpSourceApp"
*.tsnDevice1.app[0].source.packetLength = 10B
*.tsnDevice1.app[0].source.productionInterval = 1ms
*.tsnDevice1.app[0].io.destAddress = "ue[0]"
*.tsnDevice1.app[0].io.destPort = 1000
*.tsnDevice1.app[0].source.clockModule = "^.^.clock"

#Sink application
*.standardHost[*].numApps = 1
*.standardHost[*].app[*].typename = "UdpSinkApp"
*.standardHost[*].app[*].io.localPort = 1000

我go哪里錯了?

TsnDeviceTsnSwitch默認有LayeredEthe.netInterface ,但StandardHostEthe.netInterface 這兩個接口不兼容(不確定是否應該兼容)。 因此,通過將 standardHost 的 ethe.net 接口類型設置為LayeredEthe.netInterface ,它應該可以工作:

*.standardHost[*].eth[*].typename = "LayeredEthernetInterface"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM