comnum.spec_blocks#

comnum.spec_blocks()#

The blocks of the declarative links, their parameters and their ports.

Returns:

for every block, its summary, starts (it starts a link), needs and gives (the facts of the frame it reads and may add: samples, symbols, constellation, noise, llr…) and its params ({name: {default, doc, unit, choices, type, minimum, exclusive_minimum, maximum, required}}, type being a JSON Schema).

Return type:

dict[str, dict]

Raises:

ValueError – for a default that has no JSON form (not expected from the registry).

Examples

>>> import comnum
>>> b = comnum.spec_blocks()["awgn_ebn0"]
>>> b["params"]["ebn0_db"]["required"], b["gives"]
(True, ['noise'])