28 #ifndef ORO_REPORTING_COMPONENT_HPP 29 #define ORO_REPORTING_COMPONENT_HPP 32 #include <boost/tuple/tuple.hpp> 34 #include <rtt/Property.hpp> 35 #include <rtt/PropertyBag.hpp> 36 #include <rtt/marsh/MarshallInterface.hpp> 37 #include <rtt/os/TimeService.hpp> 38 #include <rtt/TaskContext.hpp> 40 #include <rtt/RTT.hpp> 42 #include <ocl/OCL.hpp> 82 :
public RTT::TaskContext
88 bool screenImpl(
const std::string& comp, std::ostream& output);
91 typedef RTT::DataFlowInterface::Ports Ports;
112 bool addMarshaller( RTT::marsh::MarshallInterface* headerM, RTT::marsh::MarshallInterface* bodyM);
155 bool reportPort(
const std::string& component,
const std::string& port );
160 bool unreportPort(
const std::string& component,
const std::string& port );
165 bool reportData(
const std::string& component,
const std::string& dataname);
170 bool unreportData(
const std::string& component,
const std::string& datasource);
202 typedef boost::tuple<std::string,
203 RTT::base::DataSourceBase::shared_ptr,
204 std::string,RTT::base::PropertyBase*,RTT::base::InputPortInterface*,bool,
bool>
DTupple;
207 typedef enum { T_QualName = 0, T_PortDS, T_DataType, T_Property, T_Port, T_NewData, T_Tracked }
T_Types;
214 bool reportDataSource(std::string tag, std::string type, RTT::base::DataSourceBase::shared_ptr origm, RTT::base::InputPortInterface* ipi,
bool);
216 bool unreportDataSource(std::string tag);
218 virtual bool startHook();
227 virtual void stopHook();
229 typedef std::vector< std::pair<boost::shared_ptr<RTT::marsh::MarshallInterface>, boost::shared_ptr<RTT::marsh::MarshallInterface> > > Marshallers;
230 Marshallers marshallers;
231 RTT::PropertyBag report;
238 RTT::Property<std::string> config;
239 RTT::Property<bool> writeHeader;
240 RTT::Property<bool> decompose;
241 RTT::Property<bool> insnapshot;
242 RTT::Property<bool> synchronize_with_logging;
243 RTT::Property<PropertyBag> report_data;
244 RTT::ConnPolicy report_policy;
247 RTT::os::TimeService::ticks starttime;
248 RTT::Property<RTT::os::TimeService::Seconds> timestamp;
250 RTT::internal::DataSource<bool>::shared_ptr
mchecker;
bool snapshotted
Used to communicate between snapshot() and updateHook() if updateHook needs to make a copy...
virtual bool configureHook()
Implementation of base::TaskCore::configureHook().
void cleanReport()
Implementation of base::TaskCore::configureHook().
bool addMarshaller(RTT::marsh::MarshallInterface *headerM, RTT::marsh::MarshallInterface *bodyM)
Adds a Plugin to receive incomming data.
bool unreportPort(const std::string &component, const std::string &port)
Unreport a specific data port of a component.
virtual void updateHook()
This not real-time function processes the copied data.
RTT::internal::DataSource< bool >::shared_ptr mchecker
If false, a sequence size has changed.
void snapshot()
Copy the reported data and trigger the generation of a sampling line.
bool removeMarshallers()
Remove and delete all added Marshallers.
The Orocos Component Library.
virtual bool screenComponent(const std::string &comp)
Write state information of a component.
T_Types
Use these to index DTupple objects.
bool reportPort(const std::string &component, const std::string &port)
Report a specific data port of a component.
bool unreportData(const std::string &component, const std::string &datasource)
Unreport a specific data source of a component.
bool reportComponent(const std::string &component)
Report all the data ports of a component.
std::vector< DTupple > Reports
Stores the 'datasource' of all reported items as properties.
A Component for periodically reporting Component Port contents to a human readable text format...
bool screenImpl(const std::string &comp, std::ostream &output)
This method writes out the status of a component's interface.
bool unreportComponent(const std::string &component)
Unreport the data ports of a component.
boost::tuple< std::string, RTT::base::DataSourceBase::shared_ptr, std::string, RTT::base::PropertyBase *, RTT::base::InputPortInterface *, bool, bool > DTupple
tuple that describes each sample.
bool copydata()
This real-time function makes copies of the data to be reported.
ReportingComponent(std::string name="Reporting")
Set up a component for reporting.
bool reportData(const std::string &component, const std::string &dataname)
Report a specific data source of a component.
virtual void cleanupHook()
Implementation of base::TaskCore::cleanupHook().