unetstack

How to cancel transmission of messages of a particular protocol?


I want to cancel the transmission of messages which use DATA protocol. How to use clear Req to cancel the transmission of messages which use DATA protocol but not others messages which use different protocol.


Solution

  • ClearReq is supported by some agents (e.g. PHY) to stop any ongoing transmission/receptions at the next safe opportunity. However, if the transmission was due to a higher level protocol (e.g. reliable `DatagramReq), that protocol may initiate re-transmission down the road.

    DatagramCancelReq is supported by many agents that implement the DATAGRAM service. When supported, this requests cancels a specified previous DatagramReq (if an id of the request is given), or all ongoing datagram transmissions by that agent (if no id is specified).