25#include <condition_variable>
31#include <ArmarXCore/interface/components/TopicRecorderInterface.h>
46 "Comma seperated list of topics to log. Use * to record all. To specify the max "
47 "frequency append a : to the topic name, e.g. \"RobotState:10,Log\" Topic names "
48 "must not contain : or ,");
51 "topic_recording.bag",
52 "File to write the output to. The file will be overwritten if the file exists");
54 "TimestampedFilename",
true,
"If true, a timestamp is added to the filename");
58 "Storage variant to use, currently 'database' (default) and 'file' are available");
62 "Immediately start recording after the component is launched.");
111 const Ice::Current&
c = Ice::emptyCurrent)
override;
113 void stopRecording(
const Ice::Current&
c = Ice::emptyCurrent)
override;
117 const Ice::Current&
c = Ice::emptyCurrent)
override
153 std::shared_ptr<std::ofstream>
log;
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Component()
Protected default constructor. Used for virtual inheritance. Use createManagedIceObject() instead.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
PropertyDefinition< PropertyType > & defineRequiredProperty(const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
void onInitComponent() override
Pure virtual hook for the subclass.
std::condition_variable idleCondition
RunningTask< TopicRecorderComponent >::pointer_type queueTask
bool isRecording(const Ice::Current &c=Ice::emptyCurrent) override
void startRecording(const int maxDuration, const Ice::Current &c=Ice::emptyCurrent) override
void setOutputFilename(const std::string &newFilename, const Ice::Current &c=Ice::emptyCurrent) override
void onDisconnectComponent() override
Hook for subclass.
std::map< std::string, GenericTopicSubscriberPtr > topicsSubscribers
void stopRecording(const Ice::Current &c=Ice::emptyCurrent) override
TopicRecorderListenerInterfacePrx topicRecoderListener
void onConnectComponent() override
Pure virtual hook for the subclass.
std::string outputFilename
PropertyDefinitionsPtr createPropertyDefinitions() override
std::filesystem::path outputfilePath
void onExitComponent() override
Hook for subclass.
std::string getDefaultName() const override
Retrieve default name of component.
TopicWriterInterfacePtr writer
std::shared_ptr< std::ofstream > log
TopicRecorderProperties(std::string prefix)
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< TopicWriterInterface > TopicWriterInterfacePtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.