Reputation: 263
I am running two identical waveforms on two nodes and attempting to connect a pair of ports between the peer components in the two waveforms. The manual discusses External Ports but does not talk much about how to connect them, but it seemed I should declare them as external in the waveform. I believe that I can use the methods in 10.2 of the manual even though I am running in a domain and not in the sandbox. So I am trying to use python commands to connect them. I launch the domains and the waveforms in the IDE and then try to use python to make the external connection. The domains are named TxRadio and RxRadio.
I am using the following commands:
$ python
from ossie.utils import redhawk
TxRadio = redhawk.attach("TxRadio")
RxRadio = redhawk.attach("RxRadio")
TxWaveform = TxRadio.apps[0]
RxWaveform = RxRadio.apps[0]
TxWaveform.connect(RxWaveform)
since I have other local provides ports on the peer components with the same interface, this connection is ambiguous and python gives me a list of the ports that match, so I do
TxWaveform.connect(RxWaveform, providesPortName="TransferIn")
I get no error from python in the shell but my IDE pops up a window reporting an error:
gov/redhawkl/ide.debug.impl.LocalScaWaveformImpl cannot be cast to gov.redhawk.ide.debug.LocalScaComponent
which sounds like I am attempting to connect a component and a waveform. Adding usesPortName does not help. It is the only Uses port of the same interface on the component.
I know it is attempting to use the correct providesPortName because if I misspell it it reports that my component has no provides port by that name.
Since I only specified the waveforms and not the components to connect, it would be trying the external ports. So I tried specifying the components.
RxWaveform.api() report that my peer components are component 2 so I try
TxWaveform.comps[1].connect(RxWaveform.comps[1], providesPortName="TransferIn")
and I get the same error.
Even if I try connecting ports in the same domain
TxWaveform.comps[1].connect(TxWaveform.comps[1], providesPortName="TransferIn")
that is connect the TransferOut on the component to the TransferIn of the same component, I get the same error.
It seems to get so close. Can anyone tell me what I am doing wrong or what the error message means?
BTW I am using RedHawk 2.0.0
Upvotes: 0
Views: 124
Reputation: 1247
It sounds like you've taken the right steps and the IDE is throwing a bogus error. I would ignore the IDE exception in this case and confirm the connection is working outside of the IDE. Do you have the line number or stack trace of the IDE error? If I recall correctly that may have been fixed in one of the recent releases.
gov/redhawkl/ide.debug.impl.LocalScaWaveformImpl cannot be cast to gov.redhawk.ide.debug.LocalScaComponent
Upvotes: 1