generictask_test.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Peter Soetens Mon Jun 26 13:26:02 CEST 2006 generictask_test.hpp
3 
4  generictask_test.hpp - description
5  -------------------
6  begin : Mon June 26 2006
7  copyright : (C) 2006 Peter Soetens
8  email : peter.soetens@fmtc.be
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 #ifndef GENERIC_TASK_H
21 #define GENERIC_TASK_H
22 
23 
24 #include <TaskContext.hpp>
25 #include <string>
26 
27 using namespace RTT;
28 using namespace RTT::detail;
29 
31 {
32 public:
35  Service* createOperationCallerFactory();
36 
37  // ref/const-ref tests:
38  double ret;
39  double& m0r() { return ret; }
40  const double& m0cr() { return ret; }
41 
42  // test const std::string& argument for command_ds
43  bool comstr(const std::string& cs) { return !cs.empty(); }
44 
45  double m1r(double& a) { a = 2*a; return a; }
46  double m1cr(const double& a) { return a; }
47 
48  // plain argument tests:
49  double m0() { return -d0(); }
50  double m1(int i) { return -d1(i); }
51  double m2(int i, double d) { return -d2(i,d); }
52  double m3(int i, double d, bool c) { return -d3(i,d,c); }
53  double m4(int i, double d, bool c, std::string s) { return -d4(i,d,c,s); }
54 
55  double d0() const { return 1.0; }
56  double d1(int i) const { return 2.0; }
57  double d2(int i, double d) const { return 3.0; }
58  double d3(int i, double d, bool c) const { return 4.0; }
59  double d4(int i, double d, bool c, std::string s) const { return 5.0; }
60 
61  bool assertBool( bool );
62 public:
63  Generic_TaskTest(){ setUp(); };
64  ~Generic_TaskTest(){ tearDown(); };
65 
66  void setUp();
67  void tearDown();
68 
69  void testOperationCallersC();
70  void testRemoteOperationCaller();
71  void testAddOperationCaller();
72  void testCROperationCaller();
73  void testOperationCaller();
74  void testOperationCallerFromDS();
75  void testOperationCallerFactory();
76  void testDSOperationCaller();
77 };
78 
79 #endif
double d3(int i, double d, bool c) const
double d0() const
double m1cr(const double &a)
const double & m0cr()
double d1(int i) const
double d2(int i, double d) const
bool comstr(const std::string &cs)
Interface to start/stop and query a Activity.
ActivityInterface * tsim
double m1r(double &a)
double m3(int i, double d, bool c)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:53
double m4(int i, double d, bool c, std::string s)
double d4(int i, double d, bool c, std::string s) const
double m2(int i, double d)


rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:33