Go to the documentation of this file.
29 #include <ArmarXCore/interface/components/TopicRecorderInterface.h>
33 #include <condition_variable>
47 defineRequiredProperty<std::string>(
"TopicsToLog",
"Comma seperated list of topics to log. Use * to record all. To specify the max frequency append a : to the topic name, e.g. \"RobotState:10,Log\" Topic names must not contain : or ,");
48 defineOptionalProperty<std::string>(
"Outputfile",
"topic_recording.bag",
"File to write the output to. The file will be overwritten if the file exists");
49 defineOptionalProperty<bool>(
"TimestampedFilename",
true,
"If true, a timestamp is added to the filename");
50 defineOptionalProperty<std::string>(
"StorageMode",
"database",
"Storage variant to use, currently 'database' (default) and 'file' are available");
51 defineOptionalProperty<bool>(
"EnableRecording",
true,
"Immediately start recording after the component is launched.");
52 defineOptionalProperty<int>(
"Duration", 0,
"Limit recording.");
94 public TopicRecorderInterface
102 void stopRecording(
const Ice::Current&
c = Ice::emptyCurrent)
override;
104 void setOutputFilename(
const std::string& newFilename,
const Ice::Current&
c = Ice::emptyCurrent)
override
141 std::shared_ptr<std::ofstream>
log;
TopicWriterInterfacePtr writer
std::string outputFilename
TopicRecorderListenerInterfacePrx topicRecoderListener
void onExitComponent() override
Hook for subclass.
void stopRecording(const Ice::Current &c=Ice::emptyCurrent) override
std::map< std::string, GenericTopicSubscriberPtr > topicsSubscribers
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
void startRecording(const int maxDuration, const Ice::Current &c=Ice::emptyCurrent) override
std::shared_ptr< std::ofstream > log
TopicRecorderProperties(std::string prefix)
bool isRecording(const Ice::Current &c=Ice::emptyCurrent) override
std::shared_ptr< TopicWriterInterface > TopicWriterInterfacePtr
std::condition_variable idleCondition
void setOutputFilename(const std::string &newFilename, const Ice::Current &c=Ice::emptyCurrent) override
std::string getDefaultName() const override
Retrieve default name of component.
void onConnectComponent() override
Pure virtual hook for the subclass.
armarx::core::time::DateTime Time
Baseclass for all ArmarX ManagedIceObjects requiring properties.
std::filesystem::path outputfilePath
Default component property definition container.
void onDisconnectComponent() override
Hook for subclass.
void onInitComponent() override
Pure virtual hook for the subclass.
PropertyDefinitionsPtr createPropertyDefinitions() override
RunningTask< TopicRecorderComponent >::pointer_type queueTask
This file offers overloads of toIce() and fromIce() functions for STL container types.