blockfactory  0.8
A framework for wrapping algorithms for dataflow programming
CoderBlockInformation.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_CODER_CODERBLOCKINFORMATION_H
10 #define BLOCKFACTORY_CODER_CODERBLOCKINFORMATION_H
11 
15 #include "BlockFactory/Core/Port.h"
17 
18 #include <memory>
19 #include <string>
20 
21 namespace blockfactory {
22  namespace coder {
24  } // namespace coder
25 } // namespace blockfactory
26 
28 {
29 private:
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31  class impl;
32  std::unique_ptr<impl> pImpl;
33 #endif
34 
35 public:
37  ~CoderBlockInformation() override;
38 
39  bool getUniqueName(std::string& blockUniqueName) const override;
40 
41  // BLOCK OPTIONS METHODS
42  // =====================
43 
44  bool optionFromKey(const std::string& key, double& option) const override;
45 
46  // PARAMETERS METHODS
47  // ==================
48 
49  bool addParameterMetadata(const core::ParameterMetadata& paramMD) override;
50  bool parseParameters(core::Parameters& parameters) override;
51 
52  // PORT INFORMATION SETTERS
53  // ========================
54 
55  bool setPortsInfo(const core::InputPortsInfo& inputPortsInfo,
56  const core::OutputPortsInfo& outputPortsInfo) override;
57 
58  // PORT INFORMATION GETTERS
59  // ========================
60 
67 
68  // BLOCK SIGNALS
69  // =============
70 
73 
74  // METHODS OUTSIDE THE INTERFACE
75  // =============================
76 
77  bool setUniqueBlockName(const std::string& blockUniqueName);
78  bool storeRTWParameters(const core::Parameters& parameters);
79  bool setInputPort(const core::Port::Info& portInfo, void* signalAddress);
80  bool setOutputPort(const core::Port::Info& portInfo, void* signalAddress);
81 };
82 
83 #endif // BLOCKFACTORY_CODER_CODERBLOCKINFORMATION_H
Class for storing parameter metadata.
Definition: Parameter.h:59
bool setPortsInfo(const core::InputPortsInfo &inputPortsInfo, const core::OutputPortsInfo &outputPortsInfo) override
Set input / output ports information.
std::shared_ptr< blockfactory::core::Signal > OutputSignalPtr
Definition: BlockInformation.h:29
core::OutputSignalPtr getOutputPortSignal(const core::Port::Index idx) const override
Get the signal connected to an output port.
core::Port::Size::Matrix getInputPortMatrixSize(const core::Port::Index idx) const override
Get the size of a 2D input port.
core::InputSignalPtr getInputPortSignal(const core::Port::Index idx) const override
Get the signal connected to an input input port.
size_t Index
The 0-based index of a port.
Definition: Port.h:39
core::Port::Size::Vector getInputPortWidth(const core::Port::Index idx) const override
Get the size of a 1D input port.
bool storeRTWParameters(const core::Parameters &parameters)
bool addParameterMetadata(const core::ParameterMetadata &paramMD) override
Add a parameter metadata.
Abstract class for storing generic core::Block properties.
Definition: BlockInformation.h:56
bool setOutputPort(const core::Port::Info &portInfo, void *signalAddress)
Class for storing block&#39;s parameters.
Definition: Parameters.h:34
std::vector< Port::Info > OutputPortsInfo
Definition: BlockInformation.h:27
core::Port::Info getInputPortInfo(core::Port::Index idx) const override
Get information of an input port.
Definition: Block.h:17
A container of port information.
Definition: Port.h:78
core::Port::Size::Vector getOutputPortWidth(const core::Port::Index idx) const override
Get the size of a 1D output port.
int Vector
Definition: Port.h:98
bool getUniqueName(std::string &blockUniqueName) const override
Get the unique name of the block instance.
bool setInputPort(const core::Port::Info &portInfo, void *signalAddress)
bool setUniqueBlockName(const std::string &blockUniqueName)
std::vector< Port::Info > InputPortsInfo
Definition: BlockInformation.h:26
Definition: CoderBlockInformation.h:27
std::shared_ptr< const blockfactory::core::Signal > InputSignalPtr
Definition: BlockInformation.h:28
struct{Rows rows Matrix
Definition: Port.h:104
bool optionFromKey(const std::string &key, double &option) const override
Convert a block option from its string identifier to a specific implementation.
bool parseParameters(core::Parameters &parameters) override
Parse the core::Block parameters.
core::Port::Info getOutputPortInfo(core::Port::Index idx) const override
Get information of an output port.
core::Port::Size::Matrix getOutputPortMatrixSize(const core::Port::Index idx) const override
Get the size of a 2D output port.