ReportingComponent.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Peter Soetens Mon Jan 19 14:11:26 CET 2004 ReportingComponent.hpp
3 
4  ReportingComponent.hpp - description
5  -------------------
6  begin : Mon January 19 2004
7  copyright : (C) 2004 Peter Soetens
8  email : peter.soetens@mech.kuleuven.ac.be
9 
10  ***************************************************************************
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2.1 of the License, or (at your option) any later version. *
15  * *
16  * This library is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19  * Lesser General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU Lesser General Public *
22  * License along with this library; if not, write to the Free Software *
23  * Foundation, Inc., 59 Temple Place, *
24  * Suite 330, Boston, MA 02111-1307 USA *
25  * *
26  ***************************************************************************/
27 
28 #ifndef ORO_REPORTING_COMPONENT_HPP
29 #define ORO_REPORTING_COMPONENT_HPP
30 
31 
32 #include <boost/tuple/tuple.hpp>
33 
34 #include <rtt/Property.hpp>
35 #include <rtt/PropertyBag.hpp>
37 #include <rtt/os/TimeService.hpp>
38 #include <rtt/TaskContext.hpp>
39 
40 #include <rtt/RTT.hpp>
41 
42 #include <ocl/OCL.hpp>
43 
44 namespace OCL
45 {
81  class OCL_API ReportingComponent
82  : public RTT::TaskContext
83  {
84  protected:
88  bool screenImpl( const std::string& comp, std::ostream& output);
89  public:
90 
92 
96  ReportingComponent( std::string name = "Reporting" );
97 
98  virtual ~ReportingComponent();
99 
112  bool addMarshaller( RTT::marsh::MarshallInterface* headerM, RTT::marsh::MarshallInterface* bodyM);
113 
117  bool removeMarshallers();
118 
128  virtual bool configureHook();
129 
134  virtual void cleanupHook();
135 
140  virtual bool screenComponent( const std::string& comp );
141 
145  bool reportComponent( const std::string& component );
146 
150  bool unreportComponent( const std::string& component );
151 
155  bool reportPort(const std::string& component, const std::string& port );
156 
160  bool unreportPort(const std::string& component, const std::string& port );
161 
165  bool reportData(const std::string& component,const std::string& dataname);
166 
170  bool unreportData(const std::string& component,const std::string& datasource);
171 
177  bool copydata();
178 
182  void snapshot();
183 
184  void cleanReport();
185 
188  protected:
202  typedef boost::tuple<std::string,
205 
207  typedef enum { T_QualName = 0, T_PortDS, T_DataType, T_Property, T_Port, T_NewData, T_Tracked } T_Types;
211  typedef std::vector<DTupple> Reports;
212  Reports root;
213 
214  bool reportDataSource(std::string tag, std::string type, RTT::base::DataSourceBase::shared_ptr origm, RTT::base::InputPortInterface* ipi, bool);
215 
216  bool unreportDataSource(std::string tag);
217 
218  virtual bool startHook();
219 
220  void makeReport2();
221 
225  virtual void updateHook();
226 
227  virtual void stopHook();
228 
229  typedef std::vector< std::pair<boost::shared_ptr<RTT::marsh::MarshallInterface>, boost::shared_ptr<RTT::marsh::MarshallInterface> > > Marshallers;
230  Marshallers marshallers;
232 
247 
252 
253  };
254 
255 }
256 
257 #endif
T_Types
Use these to index DTupple objects.
RTT::Property< RTT::os::TimeService::Seconds > timestamp
RTT::Property< bool > synchronize_with_logging
RTT::Property< bool > writeHeader
RTT::Property< bool > insnapshot
RTT::internal::DataSource< bool >::shared_ptr mchecker
If false, a sequence size has changed.
std::vector< DTupple > Reports
RTT::DataFlowInterface::Ports Ports
RTT::Property< bool > complexdecompose
boost::tuple< std::string, RTT::base::DataSourceBase::shared_ptr, std::string, RTT::base::PropertyBase *, RTT::base::InputPortInterface *, bool, bool > DTupple
RTT::Property< std::string > config
std::vector< base::PortInterface * > Ports
std::vector< std::pair< boost::shared_ptr< RTT::marsh::MarshallInterface >, boost::shared_ptr< RTT::marsh::MarshallInterface > > > Marshallers
boost::intrusive_ptr< DataSource< T > > shared_ptr
A Component for periodically reporting Component Port contents to a human readable text format...
RTT::Property< bool > decompose
RTT::Property< PropertyBag > report_data
boost::intrusive_ptr< DataSourceBase > shared_ptr
RTT::os::TimeService::ticks starttime


ocl
Author(s): OCL Development Team
autogenerated on Mon Mar 23 2020 04:47:19