operations_fixture1.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: The SourceWorks Tue Sep 7 00:54:57 CEST 2010 operations_fixture1.cpp
3 
4  operations_fixture1.cpp - description
5  -------------------
6  begin : Tue September 07 2010
7  copyright : (C) 2010 The SourceWorks
8  email : peter@thesourceworks.com
9 
10  ***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 
20 #define BOOST_FUSION_INVOKE_MAX_ARITY 8
21 #define BOOST_FUSION_UNFUSED_MAX_ARITY 7
22 
23 #include "operations_fixture.hpp"
24 #include <iostream>
25 #include <TaskContext.hpp>
26 #include <OperationCaller.hpp>
27 #include <Operation.hpp>
28 #include <Service.hpp>
29 
30 using namespace std;
31 using namespace boost;
32 using namespace RTT;
33 using namespace RTT::detail;
34 
36 {
37  Service::shared_ptr to = target->provides("methods");
38  // ClientThread
39  to->addOperation("m1r", &OperationsFixture::m1r, this).doc("M1r");
40  to->addOperation("m1cr", &OperationsFixture::m1cr, this).doc("M1cr");
41 
42  to->addOperation("m1", &OperationsFixture::m1, this).doc("M1").arg("a", "ad");
43 
44  // OwnThread
45  to->addOperation("o1r", &OperationsFixture::m1r, this, OwnThread).doc("M1r");
46  to->addOperation("o1cr", &OperationsFixture::m1cr, this, OwnThread).doc("M1cr");
47 
48  to->addOperation("o1", &OperationsFixture::m1, this, OwnThread).doc("M1").arg("a", "ad");
49 
50  // Extra operations for RemoteOperationCaller tests
51  to->addOperation("returnAddressOf", &OperationsFixture::returnAddressOf, this);
52  to->addOperation("returnAddressOfConst", &OperationsFixture::returnAddressOfConst, this);
53  to->addOperation("sleepAndIncOwnThread", &OperationsFixture::sleepAndIncrement, this, RTT::OwnThread);
54 }
Service::shared_ptr provides()
int sleepAndIncrement(int seconds)
Definition: mystd.hpp:163
double m1r(double &a)
boost::shared_ptr< Service > shared_ptr
Definition: Service.hpp:101
void * returnAddressOf(int &i)
double m1cr(const double &a)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:53
void createOperationCallerFactories1(TaskContext *target)
const void * returnAddressOfConst(const int &i)


rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:26