The necessity of handleSelfMsg in BaseWaveApplLaye

2019-06-08 11:29发布

I thought the handleSelfMsg in BaseWaveApplLayeris is same to tictoc self message which means a node sends message to itself but it looks not.

So what is the necessity of handleSelfMsg in BaseWaveApplLayer?

标签: veins
1条回答
男人必须洒脱
2楼-- · 2019-06-08 12:14

As the name is indicating, the method handles any messages which a node sent to itself. Those "messages" are simple events in the sense of a DES and not of a networking message. Then a certain action is taken corresponding to the received self-message's type.

Here, this is either sending of a simple beacon message (BasicSafetyMessage) or of a service advertisement (WaveServiceAdvertisment) (both of them are actual network messages) and scheduling of an event (self-message) for sending the next message (network) after a certain interval.

查看更多
登录 后发表回答