您的位置:首页 > 其它

GNU Radio中协议数据包的传递方式

2015-11-29 15:16 405 查看
All the blocks presented so far operate as "infinite stream" blocks, i.e., they simply continue working as long as items are fed into their inputs. The low pass filter is a good
example: Every new item is interpreted as a new sample, and the output is always the low-pass filtered version of the input. It does not care about the content of the signal, be it noise, data or whatever.
When handling packets (or PDUs, protocol data units), such a behaviour is not enough. There must be a way to identify PDU boundaries, i.e. tell which byte is the first of this packet
and how long it is.
GNU Radio supports two ways to do this: Message passing and tagged stream blocks.
The first is an asynchronous method to directly pass PDUs from one block to another. On a MAC layer, this is probably the preferred behaviour. A block could receive a PDU, add a
packet header, and pass the entire packet (including the new header) as a new PDU to another block.
Tagged stream blocks are regular streaming blocks which use stream tags to identify PDU boundaries. This allows mixing blocks which know about PDUs and blocks that don't care about
them. There are also blocks to switch between message passing and tagged stream blocks.
后续将对两种方式分别进行介绍。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: