python - How to read data from a component with multiple ports -
i trying read data compent python script being new redhawk , flowing examples have following expects 1 port
from ossie.utils import redhawk, sb dom = redhawk.attach("redhawk_dev") app=dom.apps[0] print(app) comp = app.comp[0] output_data = sb.datasink() comp.connect(output_data) which errors with:
traceback (most recent call last): file "<stdin>", line 1, in <module> file "/usr/local/redhawk/core/lib/python/ossie/utils/model/__init__.py", line 327, in connect raise runtimeerror, ret_str runtimeerror: multiple ports matched interfaces on connect, must specify providesportname or usesportname possible matches: interface: idl:bulkio/datashort:1.0, component/port: rh.basic_components_demo_230_071003375_1/siggen_sine/datashort_out __localdatasink_1/shortin interface: idl:bulkio/datafloat:1.0, component/port: rh.basic_components_demo_230_071003375_1/siggen_sine/datafloat_out __localdatasink_1/floatin the component rh.siggen component basic waveform example project.
how read sink , output floats? thinking like
... comp.connect(output_data) while (data=comp.read()) : print("value : "+data)
your error can solved like:
comp.connect(output_data, usesportname="datafloat_out") in order print float samples, can implement redhawk component that... can plot data using:
sb.idelocation("/path/to/ide/eclipse/directory") plot=sb.plot() comp.connect(plot, usesportname="datafloat_out")
Comments
Post a Comment