blockfactory
0.8
A framework for wrapping algorithms for dataflow programming
|
Simulink implementation of block information. More...
#include <SimulinkBlockInformation.h>
Simulink implementation of block information.
This class implements the core::BlockInformationfor abstract class providing to core::Block objects the support of interfacing with the Simulink engine.
Public Types | |
using | ParameterIndex = unsigned |
Public Member Functions | |
SimulinkBlockInformation (SimStruct *simstruct) | |
~SimulinkBlockInformation () override | |
bool | getUniqueName (std::string &blockUniqueName) const override |
Get the unique name of the block instance. More... | |
bool | optionFromKey (const std::string &key, double &option) const override |
Convert a block option from its string identifier to a specific implementation. More... | |
bool | addParameterMetadata (const core::ParameterMetadata ¶mMD) override |
Add a parameter metadata. More... | |
bool | parseParameters (core::Parameters ¶meters) override |
Parse the core::Block parameters. More... | |
bool | setPortsInfo (const core::InputPortsInfo &inputPortsInfo, const core::OutputPortsInfo &outputPortsInfo) override |
Set input / output ports information. More... | |
core::Port::Info | getInputPortInfo (const core::Port::Index idx) const override |
Get information of an input port. More... | |
core::Port::Info | getOutputPortInfo (const core::Port::Index idx) const override |
Get information of an output port. More... | |
core::Port::Size::Vector | getInputPortWidth (const core::Port::Index idx) const override |
Get the size of a 1D input port. More... | |
core::Port::Size::Vector | getOutputPortWidth (const core::Port::Index idx) const override |
Get the size of a 1D output port. More... | |
core::Port::Size::Matrix | getInputPortMatrixSize (const core::Port::Index idx) const override |
Get the size of a 2D input port. More... | |
core::Port::Size::Matrix | getOutputPortMatrixSize (const core::Port::Index idx) const override |
Get the size of a 2D output port. More... | |
core::InputSignalPtr | getInputPortSignal (const core::Port::Index idx) const override |
Get the signal connected to an input input port. More... | |
core::OutputSignalPtr | getOutputPortSignal (const core::Port::Index idx) const override |
Get the signal connected to an output port. More... | |
Public Member Functions inherited from blockfactory::core::BlockInformation | |
BlockInformation ()=default | |
virtual | ~BlockInformation ()=default |
using blockfactory::mex::SimulinkBlockInformation::ParameterIndex = unsigned |
blockfactory::mex::SimulinkBlockInformation::SimulinkBlockInformation | ( | SimStruct * | simstruct | ) |
|
override |
|
overridevirtual |
Add a parameter metadata.
In order to gather parameters from the running engine, the block must pass their metadata.
paramMD | The metadata to add. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Get information of an input port.
idx | The index of the port. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Get the size of a 2D input port.
idx | The index of the port. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Get the signal connected to an input input port.
idx | The index of the port to which the signal is connected. |
nullptr
otherwise. Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Get the size of a 1D input port.
idx | The index of the port. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Get information of an output port.
idx | The index of the port. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Get the size of a 2D output port.
idx | The index of the port. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Get the signal connected to an output port.
idx | The index of the port to which the signal is connected. |
nullptr
otherwise. Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Get the size of a 1D output port.
idx | The index of the port. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Get the unique name of the block instance.
Retrive from the engine the unique name of the block. A typical example is the scoped name of the block that takes into account its location in the model hierarchy.
[out] | blockUniqueName | The unique name of the block instance. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Convert a block option from its string identifier to a specific implementation.
[in] | key | Identifier of the block option. |
[out] | option | Implementation-specific block option. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Parse the core::Block parameters.
This method allows defining how to gather block parameters from a specific implementation.
[out] | parameters | A container filled with the parsed parameters. |
Implements blockfactory::core::BlockInformation.
|
overridevirtual |
Set input / output ports information.
Specify I/O ports information such as indices, dimensions, and datatype.
inputPortsInfo | Vector of core::Port::Info objects storing input port information. |
outputPortsInfo | Vector of core::Port::Info objects storing output port information. |
Implements blockfactory::core::BlockInformation.