Multiply Float (multiplier_f)
Multiplies a constant float value to an input float signal.
Function
The mathematical representation of the component function is given in (10).
(10)\[ \begin{align}\begin{aligned}\alpha =\text {float constant}\\y[n] = \alpha * x[n]\end{aligned}\end{align} \]
In (10):
\(x[n]\) is the input values.
\(y[n]\) is the output values.
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>
Opcode Handling
Pass thru of all non-stream opcodes.
Properties
value: Multiplier constant value.Type:
floatAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
1.0
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
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.examples.components.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