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

TypeNameDefaultDescription
Integernin1Number of inputs
Integernout1Number of outputs
Integer[nout]extract1:noutExtracting vector

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nin]uBoolean input signals
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nout]yBoolean signals extracted from the input vector with the extraction scheme specified by the integer vector

Revisions

  • October 5, 2022, by Jianjun Hu:
    First implementation.