Message blocks (or m-blocks) are a GNU Radio extension, designed in
cooperation with BBN, that allows more natural handling of packet-based data.
Full details of the message block can be found in the original BBN proposal:
A message-block is a bi-directional block in which information flows as messages that may contain data, metadata, control information, status information, and signals. Since m-blocks can communicate many different types of messages, each port is typed with a protocol class to ensure that only compatible ports are connected. This ensures that an m-block communicating control information is not connected with an m-block communicating status information. An m-block may have zero or more bi-directional message ports of the same protocol.Multiple levels of aggregation can be used with the m-block such that m-blocks may be enclosed within each other. However, the m-block is not limited to containing other m-blocks. It may contain collections of GNU Radio blocks or flow_graphs. Aggregation allows for conversions between messages and streams of data samples to take place in an internal fashion to a single m-block. The following terminology is used:
Unlike GNU Radio blocks which are connected through a flow_graph which provides a scheduler and maintains topological information, the aggregation property of m-blocks require them to maintain their own topological information. There will only be a single top-level m-block that provides equivalent topological functionality of a GNU Radio flow_graph, rather than a corresponding flow_graph being needed for each m-block.
Each m-block has a processing callback function,
When used in conjunction with a priority based scheduler, the priority of the m-block will be the priority of the highest priority message within its queue. With a series of m-blocks in the scheduler, this allows for high priority signals to be processed quickly.
The messages that flow through m-blocks have two types of
As discussed in the introduction, each port on an m-block has an associated protocol class to ensure m-blocks connected to each other carry the same types of messages. Aside from the type, the protocol class also has an associated direction that specifies whether a message is permitted to travel in or out of the port. The proposed classes are the following:
注： Message Blocks （原文出处，翻译整理仅供参考!）