|
function | module () |
| Create sink for internal output buffers.
|
|
function | view (in obj) |
| Show biograph through module_view-class.
|
|
function | getOutput (in obj) |
| Function to access module output for various intentions.
|
|
function | keepOutput (in obj) |
| Function tells outputBuffer sink not to delete itself after traverse.
|
|
function | traverse (in obj, in varargin) |
| Traverse function for modules. More...
|
|
function | traverseNode (in obj) |
| Set unique ID when creating a unit. More...
|
|
function | connectOutput (in obj, in uobj, in unitOutput, in nextUnitInput) |
| Specify where signal should go next. More...
|
|
function | connectOutputs (in obj, in units, in destInputs) |
| Specify where signal should go next. More...
|
|
function | writeInputBuffer (in obj, in sig, in inputId) |
| write input buffer
|
|
function | horzcat (in varargin) |
| horizontal concatenation
|
|
function | vertcat (in varargin) |
| vertical concatenation
|
|
function | setparams (in obj, in params, in REQUIRED_PARAMS, in QUIET_PARAMS) |
| set parameters More...
|
|
function | view (in obj) |
| Show interactive GUI through unit_view-class.
|
|
Superclass: collection/sequence of unit.
Modules are used to encapsulate multiple units. If you have a sequence of units/operations that is more or less fixed (e.g. the standard DSP chain is IQ imbalance -> CD compensation -> Retiming -> Equalization -> Carrier recovery. It would be reasonable to want a function block that just did all this DSP, and that function block would be a module. A module is a class with one function, the constructor, specified.
For example:
classdef MyDSPModule_v1 <
module properties
nInputs = 1; % Number of input arguments
nOutputs = 1; % Number of output arguments
end
methods
function obj = MyDSPModule_v1(param)
%Construct components
...
%Connect everything
obj.connectInputs({IQ}, 1); %external connections on input
IQ.connectOutputs(CD, 1); %IQ imbalance -> CD compensation
...
CR.connectOutputs(obj.outputBuffer,1); %external connections at output
%This line is required in constructor
end
end
end
Modules inherit from unit, thus module.traverse, module.connectOutputs, and module.connectOutput are valid function calls. For example:
%Get some data - this is not a real function, imagine received_signal is some
received_signal = LoadTrace(filename);
%construct object with some parameters (assume specified elsewhere)
demodulator = MyDSPModule_v1(DSPparams);
%run code
demodulated_signal = demodulator.traverse(received_signal);
- See also
- unit
- Author
- Robert Borkowski
-
Rasmus Jones
- Version
- 1.1
Definition at line 64 of file module.m.