blockBooleanExtractSignal
Extract signals from a boolean input signal vector
Information
Extract signals from the vector-valued boolean input signal and transfer them to the vector-valued boolean output signal.
The extraction scheme is specified by the integer vector extract.
This vector specifies which input signals are taken and in which
order they are transferred to the output vector. Note that the
dimension of extract has to match the number of outputs and the elements
of extract has to be in the range of [1, nin].
Additionally, the dimensions of the input connector signals and
the output connector signals have to be explicitly defined via the
parameters nin and nout.
Example
The specification
nin = 7 "Number of inputs";
nout = 4 "Number of outputs";
extract[nout] = {6,3,3,2} "Extracting vector";
extracts four output signals (nout=4)
from the seven elements of the
input vector (nin=7):
y[1, 2, 3, 4] = u[6, 3, 3, 2];
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nin | 1 | Number of inputs |
| Integer | nout | 1 | Number of outputs |
| Integer[nout] | extract | 1:nout | Extracting vector |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nin] | u | Boolean input signals | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nout] | y | Boolean signals extracted from the input vector with the extraction scheme specified by the integer vector |
Revisions
-
October 5, 2022, by Jianjun Hu:
First implementation.