94 Block(std::string blockname,
95 const std::vector<channel_t>& channels,
150 void writeinput(
size_t index,
const double& data);
173 bool dependent()
const {
return this->isInputDependent; }
195 void assignID(
size_t block_id) { this->
id = block_id; }
202 size_t getID()
const {
return this->id; }
226 void writeoutput(
size_t index,
const double& data);
230 typedef struct port_t
232 double buff_value = 0.0;
237 bool isInputDependent;
238 std::array<std::vector<port_t>,
IO::UNKNOWN> ports;
263 return (this->block == rhs.
block) && (this->port == rhs.
port)
double & readinput(size_t index)
void writeoutput(size_t index, const double &data)
Block & operator=(const Block &block)=default
Block(const Block &block)=default
Block(std::string blockname, const std::vector< channel_t > &channels, bool isdependent)
std::string getChannelName(IO::flags_t type, size_t index) const
std::string getChannelDescription(IO::flags_t type, size_t index) const
size_t getCount(flags_t type) const
Block & operator=(Block &&)=delete
void writeinput(size_t index, const double &data)
void assignID(size_t block_id)
const double & readPort(IO::flags_t direction, size_t index)
std::string getName() const
Connection Oriented Classes.
struct IO::channel_t channel_t
struct IO::endpoint endpoint
constexpr size_t INVALID_BLOCK_ID
bool operator==(const endpoint &rhs) const
bool operator!=(const endpoint &rhs) const