Changeset 9 in pacpustutorials for template/component_template/ComponentTemplate.cpp
- Timestamp:
- Oct 12, 2015, 10:50:39 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
template/component_template/ComponentTemplate.cpp
r1 r9 33 33 /************************************************************************/ 34 34 ComponentTemplate::ComponentTemplate(QString name) 35 35 : ComponentBase(name) 36 36 { 37 37 … … 44 44 ComponentTemplate::~ComponentTemplate() 45 45 { 46 }47 48 /************************************************************************/49 /* Start function50 /************************************************************************/51 void ComponentTemplate::startActivity()52 {53 46 54 47 } 55 48 56 49 50 /************************************************************************/ 51 /* Start function, called by the ComponentManager when a start() 52 /* command is received 53 /************************************************************************/ 54 void ComponentTemplate::startActivity() 55 { 56 // if you add an ouput, uncomment the line 57 // out1_ = getTypedOutput<int, ComponentTemplate>("value"); 58 } 59 57 60 58 61 /************************************************************************/ 59 /* Stop function 62 /* Stop function, called by the ComponentManager when a stop() 63 /* command is received 60 64 /************************************************************************/ 61 65 void ComponentTemplate::stopActivity() … … 65 69 66 70 71 /************************************************************************/ 72 /* Called by the framework at initialization 73 /************************************************************************/ 74 void ComponentTemplate::addInputs() 75 { 76 // uncomment to add an input 77 // addInput<int, ComponentTemplate>("value", &ComponentTemplate::processInput); 78 } 79 67 80 68 81 /************************************************************************/ 69 /* Configuration of the component 82 /* Called by the framework at initialization 83 /************************************************************************/ 84 void ComponentTemplate::addOutputs() 85 { 86 // empty: no output 87 // addOutput<int, ProducerExample>("value"); 88 } 89 90 91 /************************************************************************/ 92 /* Example function that produces an output 93 /************************************************************************/ 94 // void ComponentTemplate::produceOutput() 95 // { 96 // int val = 12; 97 // checkedSend(out1_, val); 98 // } 99 100 101 /************************************************************************/ 102 /* Example function that processes an input 103 /************************************************************************/ 104 // void processInput(const int& value) 105 // { 106 // 107 // } 108 109 110 /************************************************************************/ 111 /* Configuration of the component, called by the ComponentManager after 112 /* the construction of the object 70 113 /************************************************************************/ 71 114 ComponentBase::COMPONENT_CONFIGURATION ComponentTemplate::configureComponent(XmlComponentConfig config)
Note:
See TracChangeset
for help on using the changeset viewer.