| Version 1 (modified by , 12 years ago) ( diff ) |
|---|
Adding connection to the XML file
Let us suppose that we have createad a component MyComponent as described in previous tutorial.
Also, we suppose that we had added an input called "pose-low-quality" and an output called "pose-high-quality" to our class MyComponent.
Inputs: We will take our input from a component of class LowCostGps named gps which has an output called "pose".
Outputs: We will send our processed pose to another component othercomp of class OtherComponent which has an input called "pose"`.
Warning:
Output "pose" in class LowCostGps has the same type as our input "pose-low-quality".
Similarly, input "pose" in class OtherComponent has the same type as our output "pose-high-quality".
To add a connection, we will modify the connections node of the XML file.
The rest of the file rests unchanged.
<?xml version="1.0" encoding="ISO-8859-1"?> <pacpus> <components> <!-- other components --> <component name="gps" type="LowCostGps" /> <component name="mycomp" type="MyComponent" /> <component name="othercomp" type="OtherComponent" /> </components> <connections> <!-- other connections --> <!-- Getting input from GPS --> <connection output="gps.pose" input="mycomp.pose-low-quality" type="direct" /> <!-- Outputting better pose to another component --> <connection output="mycomp.pose-high-quality" input="othercomp.pose" type="direct" /> </connections> <!-- Windows (release) --> <plugins prefix="" postfix="" extension="dll"> <plugin lib="MyComponent" /> <!-- other plugins (libraries) --> </plugins> <parameters> </parameters> </pacpus>
