Multiplier (multiplier_f)
Multiplies each input float sample value by a constant float value.
Design
The mathematical representation of the component function is given in (10).
In (10):
\(x[n]\) is the input values.
\(y[n]\) is the output values.
\(\alpha\) is the
valueproperty.
Interface
<?xml version="1.0"?>
<componentspec>
<property name="value" type="float" writable="true" default="1.0" description="Multiplier constant value."/>
<port name="input" producer="false" protocol="float_timed_sample-prot"/>
<port name="output" producer="true" protocol="float_timed_sample-prot"/>
</componentspec>
Ports
Inputs:
input: Primary input samples port.Protocol:
float_timed_sample-protOptional:
False
Outputs:
output: Primary output samples port.Protocol:
float_timed_sample-protOptional:
False
Opcode Handling
Multiplication is only applied to values in sample opcode messages. All other opcode messages received are passed through this component without any effect.
Properties
value: Multiplier constant value.Type:
floatAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
1.0
Implementations
multiplier_f(RCC)
Example Application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="multiplier_f">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.comp.sdr.math.multiplier_f" connect="file_write">
<property name="value" value="10.01"/>
</instance>
<instance component="ocpi.core.file_write">
<property name="filename" value="output.bin"/>
</instance>
</application>
Dependencies
The dependencies to other elements in OpenCPI are:
None.
Limitations
Limitations of multiplier_f are:
None.
Testing
Tested platforms: None
Component testing not completed.