PDU Lambda

This block allows stateless manipulation of PDU metadata fields and uniform vectors through python lambda functions. In uniform vector mode, the lambda function will be applied with the python-ified uniform vector as the argument. In metadata dictionary mode, the lambda function will be applied to the python-ified value associated with the PMT key the block is configured with.

The following python modules are imported for use: import numpy as np import pmt, math, time

These should also be imported in the flowgraph implementing this block (if utilized). Exceptions during the function call will be caught and printed to the screen. In the event an exception is thrown, the data will be emitted as it was received.

Examples of use:

lambda x: np.unwrap(np.angle(x))
 * Phase demodulation of a complex PDU: Uniform Vector Mode with function:

lambda x: k*x
 * Scale metadata field `val1`: Metadata mode, separate QT range block with name `k`:

Parameters
(R): Run-time adjustable


 * Function (R)
 * default: 'lambda x: x*10'


 * Mode (R)
 * options: [Metadata, Uniform Vector, Raw Message]


 * Key (R)
 * default: 'pmt.intern("key")'

Inputs

 * pdu
 * input message

Outputs

 * pdu
 * output message

Example Flowgraph
This flowgraph can be found at



Source Files

 * C++ files
 * TODO


 * Header files
 * TODO


 * Public header files
 * TODO


 * Block definition
 *