Download Pelican User Guide

Transcript
3.6 Tutorial Conclusion
27
int main(int argc, char* argv[])
{
// Create a QCoreApplication.
QCoreApplication app(argc, argv);
try {
// Create a PipelineApplication.
PipelineApplication pApp(argc, argv);
// Register the pipelines that can run.
pApp.registerPipeline(new SignalProcessingPipeline);
// Set the data client.
pApp.setDataClient("PelicanServerClient");
// Start the pipeline driver.
pApp.start();
}
// Catch any error messages from Pelican.
catch (const QString& err) {
std::cerr << "Error: " << err.toStdString() << std::endl;
}
return 0;
}
3.6.3.1
Pipeline XML
We must configure the pipeline module, the data client, the data adapter and the output streams, so the following
XML file must be provided for the pipeline binary:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pelican>
<configuration version="1.0">
<pipeline>
<clients>
<PelicanServerClient>
<server host="127.0.0.1" port="2000" />
<data type="SignalData" adapter="SignalDataAdapter" />
</PelicanServerClient>
</clients>
<adapters>
<SignalDataAdapter>
<packet samples="256" />
</SignalDataAdapter>
</adapters>
<modules>
<SignalAmplifier>
<gain value="2.5"/>
</SignalAmplifier>
</modules>
<output>
<streamers>
<PelicanTCPBlobServer active="false">
<connection port="1234" />
</PelicanTCPBlobServer>
<OutputStreamExample name="precsv" active="true">
<file name="pre.csv" />
</OutputStreamExample>
<OutputStreamExample name="postcsv" active="true">
<file name="post.csv" />
</OutputStreamExample>
</streamers>
<dataStreams>
<stream name="all" listeners="PelicanTCPBlobServer" />
<stream name="post" listeners="postcsv" />
<stream name="pre" listeners="precsv" />
</dataStreams>
</output>
Generated on Tue Jan 22 2013 11:07:31 for Pelican User Guide by Doxygen