18 #ifndef MAUVE_BASE_MUX_HPP 19 #define MAUVE_BASE_MUX_HPP 23 #include <mauve/runtime.hpp> 33 template <
typename T,
int N>
48 template <
typename T,
int N >
59 template <
typename T,
int N >
61 MuxReadPortCore<T, N> >
68 template <
typename T,
int N>
77 template <
typename T,
int N>
90 template <
typename T,
int N >
98 void write(T value,
int index) {
99 if (this->shell().
select.get() == index)
100 this->shell().write.write(value);
109 template <
typename T,
int N >
111 MuxWriteServiceShell<T, N>,
112 MuxWriteServiceCore<T, N> >
120 template <
typename T,
int N>
127 #include "ipp/Mux.ipp" 129 #endif // MAUVE_BASE_MUX_HPP Definition: Interface.hpp:34
Multiplexer interface with read ports.
Definition: Mux.hpp:60
std::array< runtime::ReadPort< T > *, N > read_ports
Array of read ports.
Definition: Mux.hpp:38
Multiplexer core with read ports.
Definition: Mux.hpp:49
void write(T value, int index)
Write some data coming from a source.
Definition: Mux.hpp:98
Multiplexer shell with write services.
Definition: Mux.hpp:78
Definition: ReadPort.hpp:27
Multiplexer interface with write services.
Definition: Mux.hpp:110
Definition: HasPort.hpp:36
The MAUVE namespace.
Definition: tracing.hpp:24
MuxReadPortShell()
Constructor.
Definition: Mux.ipp:29
Multiplexer shell with read ports.
Definition: Mux.hpp:34
Definition: Architecture.hpp:38
Multiplexer core with write services.
Definition: Mux.hpp:91
A Shell is the interface of a component.
Definition: Shell.hpp:48
runtime::Property< int > & select
Property to select which input to forward.
Definition: Mux.hpp:36
The Core defines the methods of the component.
Definition: Core.hpp:38
std::array< runtime::WriteService< T > *, N > write_services
Array of write services.
Definition: Mux.hpp:115
Property< T > & mk_property(std::string const &name, T init_value)
Create a new property.
Definition: HasProperty.ipp:28