VISR  0.12.0
Versatile Interactive Scene Renderer
visr::rcl::SignalRouting Class Reference

#include <signal_routing.hpp>

Inheritance diagram for visr::rcl::SignalRouting:
visr::AtomicComponent visr::Component

Public Member Functions

 SignalRouting (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr)
 
 ~SignalRouting ()
 
void setup (std::size_t inputWidth, std::size_t outputWidth, bool controlPort=false)
 
void setup (std::size_t inputWidth, std::size_t outputWidth, pml::SignalRoutingParameter const &initialRouting, bool controlPort=false)
 
void process ()
 
void setRouting (pml::SignalRoutingParameter const &newRouting)
 
void setRouting (pml::SignalRoutingParameter::IndexType in, pml::SignalRoutingParameter::IndexType out)
 
bool removeRouting (pml::SignalRoutingParameter::IndexType in, pml::SignalRoutingParameter::IndexType out)
 
- Public Member Functions inherited from visr::AtomicComponent
 AtomicComponent (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr)
 
 AtomicComponent (AtomicComponent const &)=delete
 
 AtomicComponent (AtomicComponent &&)=delete
 
virtual ~AtomicComponent () override
 
- Public Member Functions inherited from visr::Component
 Component (SignalFlowContext const &context, char const *componentName, CompositeComponent *parent)
 
 Component (SignalFlowContext const &context, std::string const &componentName, CompositeComponent *parent)
 
 Component (Component const &)=delete
 
 Component (Component &&)=delete
 
Componentoperator= (Component const &)=delete
 
Componentoperator= (Component &&)=delete
 
virtual ~Component ()
 
std::string const & name () const
 
std::string fullName () const
 
void status (StatusMessage::Kind status, char const *message)
 
template<typename ... MessageArgs>
void status (StatusMessage::Kind status, MessageArgs ... args)
 
bool isComposite () const
 
AudioPortBaseaudioPort (char const *portName)
 
AudioPortBase const & audioPort (char const *portName) const
 
AudioPortBaseaudioPort (std::string const &portName)
 
AudioPortBase const & audioPort (std::string const &portName) const
 
ParameterPortBaseparameterPort (char const *portName)
 
ParameterPortBase const & parameterPort (char const *portName) const
 
ParameterPortBaseparameterPort (std::string const &portName)
 
ParameterPortBase const & parameterPort (std::string const &portName) const
 
SamplingFrequencyType samplingFrequency () const
 
std::size_t period () const
 
bool isTopLevel () const
 
impl::ComponentImplementationimplementation ()
 
impl::ComponentImplementation const & implementation () const
 

Additional Inherited Members

- Static Public Member Functions inherited from visr::Component
static const std::string & nameSeparator ()
 
- Protected Member Functions inherited from visr::Component
 Component (impl::ComponentImplementation *impl)
 

Detailed Description

Audio component for performing arbitrary routings between the channels of the input and the output port. The number of channels of the input and output port are set by the inputWidth and outputWidth arguments passed to the setup() method, respectively.

Constructor & Destructor Documentation

◆ SignalRouting()

visr::rcl::SignalRouting::SignalRouting ( SignalFlowContext const &  context,
char const *  name,
CompositeComponent parent = nullptr 
)
explicit

Constructor.

Parameters
contextConfiguration object containing basic execution parameters.
nameThe name of the component. Must be unique within the containing composite component (if there is one).
parentPointer to a containing component if there is one. Specify nullptr in case of a top-level component.

◆ ~SignalRouting()

visr::rcl::SignalRouting::~SignalRouting ( )

Destructor.

Member Function Documentation

◆ process()

void visr::rcl::SignalRouting::process ( )
virtual

The process function. For each routing connection set within the component, it copies the audio signal from the input channel references by the routing to the corresponding output channel of this routing. The number of samples processed in each call is determined by the period of the containing audio signal flow.

Implements visr::AtomicComponent.

◆ removeRouting()

bool visr::rcl::SignalRouting::removeRouting ( pml::SignalRoutingParameter::IndexType  in,
pml::SignalRoutingParameter::IndexType  out 
)

Remove a specific routing connection. If the specified routing does not exist, no operation is performed.

Parameters
inThe input channel index of the routing to be removed
outThe output channel index of the routing to be removed

◆ setRouting() [1/2]

void visr::rcl::SignalRouting::setRouting ( pml::SignalRoutingParameter const &  newRouting)

Reset the routing information for this component completely. This removes all existing routings.

Parameters
newRoutingThe set of new routing connections.

◆ setRouting() [2/2]

void visr::rcl::SignalRouting::setRouting ( pml::SignalRoutingParameter::IndexType  in,
pml::SignalRoutingParameter::IndexType  out 
)

Set a specific routing between an input and output channel. If the routing already exists, no operation is performed. If the output channel references by out is already connected to a different input, this previous routing is removed.

Parameters
inThe channel index of the input port from where the signal is routed
outThe channel index of the output port to where the signal is routed

◆ setup() [1/2]

void visr::rcl::SignalRouting::setup ( std::size_t  inputWidth,
std::size_t  outputWidth,
bool  controlPort = false 
)

Method to initialise the component.

Note
Within the rcl library, this method is non-virtual and can have an arbitrary signature of arguments.
Parameters
inputWidthThe width of the input vector, i.e., the number of single signals in this port.
outputWidthThe number of signals channels in the output port.
controlPortWhether the component creates a parameter input port (message type: pml::SignalRoutingParameter, protocol: pml::DoubleBufferingProtocol ). Default: false

◆ setup() [2/2]

void visr::rcl::SignalRouting::setup ( std::size_t  inputWidth,
std::size_t  outputWidth,
pml::SignalRoutingParameter const &  initialRouting,
bool  controlPort = false 
)

Method to initialise the component.

Note
Within the rcl library, this method is non-virtual and can have an arbitrary signature of arguments.
Parameters
inputWidthThe width of the input vector, i.e., the number of single signals in this port.
outputWidthThe number of signals channels in the output port.
initialRoutingThe initial routing connections
controlPortWhether the component creates a parameter input port (message type: pml::SignalRoutingParameter, protocol: pml::DoubleBufferingProtocol ). Default: false

The documentation for this class was generated from the following files: