GNURadio uses Polymorphic Types (PMTs) for asynchronous messaging and tagging data. The current API can be inconsistent and difficult to use. This can be a stumbling block for both new and experienced developers. We are rewriting the PMT interface using flatbuffers and modern C++.
Flatbuffers is a serialization library maintained by Google that provides for very efficient transfer of serialized data. It also provides compile time data structures and type validation. This will allow for blocks to provide a schema for messages that it will generate or receive, making it easier and less error prone to integrate with new blocks.
Using features that have been added to the C++ language over the past decade, we are able to simplify the API for working with PMTs. In most cases, the new interface matches that of Standard Template Library (STL) containers such as vector and map. This makes it more intuitive and reduces the amount of code that needs to be written to work with PMTs.