Producer.cpp
Go to the documentation of this file.
00001 #include "Producer.hpp"
00002 #include <iostream>
00003 
00004 using namespace std;
00005 using namespace data;
00006 
00007 Producer::Producer(std::string const& name, TaskCore::TaskState initial_state)
00008     : ProducerBase(name, initial_state) {}
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00017 // hooks defined by Orocos::RTT. See Producer.hpp for more detailed
00018 // documentation about them.
00019 
00020 // bool Producer::configureHook() { return true; }
00021 // bool Producer::startHook() { return true; }
00022 
00023 void Producer::updateHook()
00024 {
00025     static int idx = 0;
00026     ++idx;
00027 
00028     if (idx == 11) // finish on a non-triggering write to have a more deterministic test
00029         exit(0);
00030 
00031     if (idx % 2 == 0)
00032         _output.write(idx);
00033     else _output2.write(idx);
00034 }
00035 
00036 // void Producer::errorHook() {}
00037 // void Producer::stopHook() {}
00038 // void Producer::cleanupHook() {}
00039 


orogen
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Mon Oct 6 2014 03:17:29