Python 沙盒 - 生成并加载 SAD XML - RH2

Python sandbox - Generate and load SAD XML - RH2

当使用 python 沙箱生成悲伤文件时,连接似乎没有添加到使用 sb.generateSADXML 生成的 xml 中,相反,当您加载包含连接的悲伤文件时,它们不是在沙盒中制作的。在 REDHAWK 2.2 & 2.1.3

中测试
In [3]: myreader = sb.launch('rh.FileReader')
2018-10-10 11:50:24 INFO  FileReader_i:352 - Using sample rate of 2.5e+07 Sps

In [4]: mywriter = sb.launch('rh.FileWriter')
2018-10-10 11:50:39 INFO  FileWriter_i:122 - Cannot determine domain, defaulting to local $SDRROOT filesystem

In [5]: myreader.connect(mywriter,usesPortName='dataOctet_out')

In [6]: sb.show()
Components Running:
------------------
rh_FileReader_1 <local component 'rh_FileReader_1' at 0x7fe3396b9c10>
rh_FileWriter_2 <local component 'rh_FileWriter_2' at 0x7fe3395e1d10>


Services Running:
----------------


Component Connections:
---------------------
rh_FileReader_1/dataOctet_out [IDL:BULKIO/dataOctet:1.0] -> rh_FileWriter_2/dataOctet_in [IDL:BULKIO/dataOctet:1.0]


Event Channels:
--------------


SDRROOT:
-------
/var/redhawk/sdr



In [7]: sb.ge
sb.generateSADXML   sb.getDEBUG         sb.getIDE_REF       sb.getService
sb.getComponent     sb.getEventChannel  sb.getSDRROOT       

In [7]: sb.generateSADXML('andy')
Out[7]: '<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE softwareassembly PUBLIC "-//JTRS//DTD SCA V2.2.2 SAD//EN" "softwareassembly.dtd">\n<softwareassembly id="DCE:58dd2953-95e8-42f7-a420-f1c9323b57e0" name="andy">\n  <componentfiles>\n\n    <componentfile id="rh.FileReader_e4cebf50-be28-4cc6-a73f-4fd22a8a65f0" type="SPD">\n      <localfile name="/components/rh/FileReader/FileReader.spd.xml"/>\n    </componentfile>\n\n    <componentfile id="rh.FileWriter_0d2dd048-2c35-4616-be5c-02810427f2e4" type="SPD">\n      <localfile name="/components/rh/FileWriter/FileWriter.spd.xml"/>\n    </componentfile>\n  </componentfiles>\n  <partitioning>\n\n    <componentplacement>\n        <componentfileref refid="rh.FileReader_e4cebf50-be28-4cc6-a73f-4fd22a8a65f0"/>\n        <componentinstantiation id="DCE:83124a9b-195b-4b6b-a638-308b643779e6">\n            <usagename>rh_FileReader_1</usagename>\n            <findcomponent>\n                <namingservice name="rh_FileReader_1"/>\n            </findcomponent>\n      </componentinstantiation>\n    </componentplacement>\n\n    <componentplacement>\n        <componentfileref refid="rh.FileWriter_0d2dd048-2c35-4616-be5c-02810427f2e4"/>\n        <componentinstantiation id="DCE:7511beb1-2b07-48b2-845d-27f6e252fe40">\n            <usagename>rh_FileWriter_2</usagename>\n            <findcomponent>\n                <namingservice name="rh_FileWriter_2"/>\n            </findcomponent>\n      </componentinstantiation>\n    </componentplacement>\n  </partitioning>\n\n  <assemblycontroller>\n      <componentinstantiationref refid="DCE:83124a9b-195b-4b6b-a638-308b643779e6"/>\n  </assemblycontroller>\n  <connections>\n  </connections>\n</softwareassembly>\n'

In [8]: 

此问题将在 REDHAWK 2.2.1 中得到解决