// ********************************************************************* // // created: 2015/09/18 // filename: ComponentTemplate.cpp // // author: Gerald Dherbomez // Copyright Heudiasyc (c) UMR UTC/CNRS 7253 // // license: CECILL-C // // version: $Id: $ // // brief: Pacpus template component source file // // ********************************************************************* #include "Pacpus/kernel/ComponentFactory.h" #include "Pacpus/kernel/DbiteFileTypes.h" #include "ComponentTemplate.h" using namespace pacpus; //////////////////////////////////////////////////////////////////////////////// /// Construct the factory static ComponentFactory sFactory("ComponentTemplate"); /************************************************************************/ /* Constructor /************************************************************************/ ComponentTemplate::ComponentTemplate(QString name) : ComponentBase(name) { } /************************************************************************/ /* Destructor /************************************************************************/ ComponentTemplate::~ComponentTemplate() { } /************************************************************************/ /* Start function, called by the ComponentManager when a start() /* command is received /************************************************************************/ void ComponentTemplate::startActivity() { // if you add an ouput, uncomment the line // out1_ = getTypedOutput("value"); } /************************************************************************/ /* Stop function, called by the ComponentManager when a stop() /* command is received /************************************************************************/ void ComponentTemplate::stopActivity() { } /************************************************************************/ /* Called by the framework at initialization /************************************************************************/ void ComponentTemplate::addInputs() { // uncomment to add an input // addInput("value", &ComponentTemplate::processInput); } /************************************************************************/ /* Called by the framework at initialization /************************************************************************/ void ComponentTemplate::addOutputs() { // empty: no output // addOutput("value"); } /************************************************************************/ /* Example function that produces an output /************************************************************************/ // void ComponentTemplate::produceOutput() // { // int val = 12; // checkedSend(out1_, val); // } /************************************************************************/ /* Example function that processes an input /************************************************************************/ // void processInput(const int& value) // { // // } /************************************************************************/ /* Configuration of the component, called by the ComponentManager after /* the construction of the object /************************************************************************/ ComponentBase::COMPONENT_CONFIGURATION ComponentTemplate::configureComponent(XmlComponentConfig config) { return ComponentBase::CONFIGURED_OK; }