blockfactory  0.8
A framework for wrapping algorithms for dataflow programming
SimulinkBlockInformation.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * GNU Lesser General Public License v2.1 or any later version.
7  */
8 
9 #ifndef BLOCKFACTORY_MEX_SIMULINKBLOCKINFORMATION_H
10 #define BLOCKFACTORY_MEX_SIMULINKBLOCKINFORMATION_H
11 
14 #include "BlockFactory/Core/Port.h"
16 
17 #include <string>
18 #include <vector>
19 
20 namespace blockfactory {
21  namespace mex {
22  class SimulinkBlockInformation;
23  namespace impl {
24  class SimulinkBlockInformationImpl;
25  } // namespace impl
26  } // namespace mex
27 } // namespace blockfactory
28 
29 // Forward declare SimStruct
30 typedef struct SimStruct_tag SimStruct;
31 
39 {
40 private:
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42  std::unique_ptr<impl::SimulinkBlockInformationImpl> pImpl;
43 #endif
44 public:
45  using ParameterIndex = unsigned;
46 
48  ~SimulinkBlockInformation() override;
49 
50  bool getUniqueName(std::string& blockUniqueName) const override;
51  bool optionFromKey(const std::string& key, double& option) const override;
52  bool addParameterMetadata(const core::ParameterMetadata& paramMD) override;
53  bool parseParameters(core::Parameters& parameters) override;
54  bool setPortsInfo(const core::InputPortsInfo& inputPortsInfo,
55  const core::OutputPortsInfo& outputPortsInfo) override;
56  core::Port::Info getInputPortInfo(const core::Port::Index idx) const override;
57  core::Port::Info getOutputPortInfo(const core::Port::Index idx) const override;
58  core::Port::Size::Vector getInputPortWidth(const core::Port::Index idx) const override;
59  core::Port::Size::Vector getOutputPortWidth(const core::Port::Index idx) const override;
60  core::Port::Size::Matrix getInputPortMatrixSize(const core::Port::Index idx) const override;
61  core::Port::Size::Matrix getOutputPortMatrixSize(const core::Port::Index idx) const override;
62  core::InputSignalPtr getInputPortSignal(const core::Port::Index idx) const override;
63  core::OutputSignalPtr getOutputPortSignal(const core::Port::Index idx) const override;
64 };
65 
66 #endif /* BLOCKFACTORY_MEX_SIMULINKBLOCKINFORMATION_H */
Class for storing parameter metadata.
Definition: Parameter.h:59
std::shared_ptr< blockfactory::core::Signal > OutputSignalPtr
Definition: BlockInformation.h:29
size_t Index
The 0-based index of a port.
Definition: Port.h:39
Abstract class for storing generic core::Block properties.
Definition: BlockInformation.h:56
Class for storing block&#39;s parameters.
Definition: Parameters.h:34
std::vector< Port::Info > OutputPortsInfo
Definition: BlockInformation.h:27
Definition: Block.h:17
A container of port information.
Definition: Port.h:78
int Vector
Definition: Port.h:98
std::vector< Port::Info > InputPortsInfo
Definition: BlockInformation.h:26
std::shared_ptr< const blockfactory::core::Signal > InputSignalPtr
Definition: BlockInformation.h:28
struct{Rows rows Matrix
Definition: Port.h:104