On Mon, Nov 17, 2014 at 3:47 PM, Martin Braun <martin.br...@ettus.com> wrote:
> On 11/14/2014 10:49 PM, Tom Rondeau wrote: > > I assume that an appropriate "formatter object" can > > be submitted to this block to instruct it to build an > > arbitrary header, but I'm having difficulty finding > > any documentation or example of using a formatter object. > > All I found points to the packet_header_default::header___formatter > > method, which composes a fixed format that is of no use to me. > > > > Any help point me in the right direction? Am I just missing > > it or is there no "generic" header formatter capability? > > > > Funny enough, I was just working on this today. I'm adding a similar > > packet header generator for async (PDU-based) packets. The concept is > > similar with a default base class that you'd overload for your own > > purposes for packet formatting. I'll be documenting this behavior more > > in the blocks themselves, and this should eventually become the basis > > for another level of our tutorials. > > > > I have it working here in simulation, but I know there's going to be > > some trouble going over the air. I suspect I'll have something that's is > > worth sharing and reasonably documented early next week. > > Ed, > > if you check out the OFDM code, is uses its own custom packet header > generator. Follow those examples to see how it's done (or wait until Tom > has his stuff ready). > > Cheers, > M > Hey Ed, You can check out my work-in-progress branch here: https://github.com/trondeau/gnuradio/tree/packet_handling It has what you need to add headers to PDUs in two different styles. The default is our normal access code plus the frame length repeated twice. The second does the same header plus a 16 bit frame counter. The second is partly to show how to manage the inheritance. Note that this is a WIP and some commits will likely get squashed and reworked to clean up the history before merging. This concept is based off of Martin's OFDM packet header generators/formatters, but these are now classes designed around PDUs. The default async formatter works well inserted directly into our chat app from the Guided Tutorials after the CRC32. As an aside, one project that I have for 3.8 is to clean up our digital modulation support. We have a lot of blocks that have a lot of overlap in their capabilities, but are designed for very small differences in the application. I'd like to try to reduce the overlap and remove some duplication. Tom
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio