refactor replay: move topic publication into separate method

This commit is contained in:
Beat Küng
2017-03-04 22:47:54 +08:00
committed by Lorenz Meier
parent 45ffb190e3
commit 4eea89bb42
2 changed files with 56 additions and 33 deletions
+15 -5
View File
@@ -61,11 +61,13 @@ public:
/// Destructor, also waits for task exit
~Replay();
/// Start task.
/// @param quiet silently fail if no log file found
/// @param apply_params_only if true, only apply parameters from definitions section of the file
/// and user-overridden parameters, then exit w/o replaying.
/// @return OK on success.
/**
* Start task.
* @param quiet silently fail if no log file found
* @param apply_params_only if true, only apply parameters from definitions section of the file
* and user-overridden parameters, then exit w/o replaying.
* @return OK on success.
*/
static int start(bool quiet, bool apply_params_only);
static void task_main_trampoline(int argc, char *argv[]);
@@ -155,6 +157,14 @@ private:
void setUserParams(const char *filename);
/**
* publish an orb topic
* @param sub
* @param data
* @return true if published, false otherwise
*/
bool publishTopic(Subscription &sub, void *data);
static char *_replay_file;
};