Search code examples
redhawksdr

Redhawk rh.sourceVITA49 component usage


I'm using Redhawk 2.0.1 on a centos6.5 x64 system. I can fire up a rh.SinkVITA49 component just fine with:

from ossie.utils import sb
dst= sb.launch("rh.SinkVITA49",execparams={"DEBUG_LEVEL":4} )
dst.api()
dst.network_settings.interface="eth3"
dst.network_settings.enable=True
dst.network_settings.ip_address="192.168.0.3"
dst.advanced_configuration.force_transmit=True
siggen = sb.launch("rh.SigGen")
siggen.api()
siggen.connect(dst,usesPortName="dataShort_out")
sb.start()

Which I can validate by checking the packets in wireshark. However, for the receiver rh.SourceVITA49 I have a vita-49 (w VRL) data source coming on port 41001 (verified with wireshark) but I can't receive any data. The setup is:

from ossie.utils import sb
src = sb.launch("rh.SourceVITA49",execparams={"DEBUG_LEVEL":4})
src.api()
src.attachment_override.enabled=True
src.interface="eth0"
src.interface="eth1"
src.attachment_override.ip_address="192.168.2.10"
src.attachment_override.port=41001
src.VITA49Processing_override.enable=True
src.VITA49Processing_override.VRL_frames=True
src.VITA49Processing_override.vector_size=1024
src.advanced_configuration.vita49_packet_size=4136
sb.IDELocation("/usr/local/redhawk/ide/2.0.1/")
plot=sb.Plot()
src.connect(plot,usesPortName="dataShort_out")
sb.start()
src.api()

Which appears to run but there is no data flow and the status is:

>>> src.api()
Component [rh.SourceVITA49]:
Provides (Input) Ports ==============
Port Name       Port Interface
---------       --------------
dataVITA49_in   IDL:BULKIO/dataVITA49:1.0

Uses (Output) Ports ==============
Port Name       Port Interface
---------       --------------
dataUshort_out  IDL:BULKIO/dataUshort:1.0
dataChar_out    IDL:BULKIO/dataChar:1.0
dataDouble_out  IDL:BULKIO/dataDouble:1.0
dataFloat_out   IDL:BULKIO/dataFloat:1.0
dataOctet_out   IDL:BULKIO/dataOctet:1.0
dataShort_out   IDL:BULKIO/dataShort:1.0

Properties ==============
Property Name                   (Data Type)     [Default Value] Current Value
-------------                   -----------     --------------- -------------
interface                       (string)        eth1            eth1
attachment_override             (struct)
  enabled                       (boolean)       False           True
  ip_address                    (string)        127.0.0.1       192.168.2.10
  vlan                          (ushort)        0               0
  use_udp_protocol              (boolean)       True            True
  port                          (long/SL/32t)   12344           41001
connection_status               (struct)
  input_enabled                 (boolean)       None            True
  data_throughput               (double/SD/64f) None            0.0
  input_sample_rate             (double/SD/64f) None            0.0
  input_port                    (ushort)        None            41001
  packets_missing               (ulong)         None            0
  waiting_for_context_packet    (boolean)       None            True
  input_ip_address              (string)        None            192.168.2.10
  input_vlan                    (ushort)        None            0
VITA49Processing_override       (struct)
  VRL_frames                    (boolean)       False           True
  repeating                     (ulong)         1               1
  event_tag_size                (ulong)         0               0
  channel_tag_size              (ulong)         0               0
  data_item_format              (longlong)      3               3 (enum=DataType_int16)
  vector_size                   (ulong)         1               1024
  processing_efficient          (boolean)       True            True (enum=processing_efficient)
  enable                        (boolean)       False           True
  real_complex_type             (long/SL/32t)   1               1 (enum=complexCartesian)
advanced_configuration          (struct)
  vita49_packet_size            (ulong)         1500            4136
  buffer_size                   (long/SL/32t)   4096000         4096000
  poll_in_time                  (ulong)         100             100
  corba_transfersize            (ulong)         0               0

I'm guessing the issue is it is waiting for the context packets before starting the receive? My stream doesn't have context packets so I will have to force that if there's a way. Thanks


Solution

  • I'm not very familiar with that component but I believe you are correct in your assumption that it is waiting for a context packet. Looking through the code it appears as though there is a canProcessDataPacket method here

    Without the internally set receivedContextPacket boolean set to true, your other option is to set the property VITA49Processing_override.enable to true and to provide the component with a valid SRI push. You could create a dummy component that does nothing but push the proper SRI to the VITA49 component or do this through a REDHAWK service or via the sandbox.