00001 #include <rtt/RTT.hpp>
00002 #include <rtt/plugin/ServicePlugin.hpp>
00003
00004 using namespace RTT;
00005 using namespace std;
00006
00010 class MyService : public RTT::Service {
00011 public:
00012 MyService(TaskContext* owner)
00013 : Service("myservice", owner)
00014 {
00015 this->addOperation("getOwnerName", &MyService::getOwnerName, this).doc("Returns the name of the owner of this object.");
00016 }
00017
00018 string getOwnerName() {
00019
00020
00021 return getOwner()->getName();
00022 }
00023 };
00024
00025
00026
00027
00028 ORO_SERVICE_NAMED_PLUGIN(MyService, "myservice")