Go to the documentation of this file.
4 #ifndef ROSMON_MONITOR_NODE_MONITOR_H
5 #define ROSMON_MONITOR_NODE_MONITOR_H
7 #include "../launch/node.h"
8 #include "../launch/launch_config.h"
9 #include "../fd_watcher.h"
10 #include "../log_event.h"
15 #include <boost/signals2.hpp>
16 #include <boost/circular_buffer.hpp>
30 typedef std::shared_ptr<NodeMonitor>
Ptr;
119 void addCPUTime(uint64_t userTime, uint64_t systemTime);
167 inline std::string
name()
const
215 template<
typename... Args>
216 void log(
const char* format, Args&& ... args);
218 template<
typename... Args>
void addCPUTime(uint64_t userTime, uint64_t systemTime)
int numRespawnsAllowed() const
void forceExit()
Finish shutdown sequence.
std::string m_processWorkingDirectory
std::string debuggerCommand() const
What command should we use to debug the coredump?
boost::signals2::signal< void(LogEvent)> logMessageSignal
Logging signal.
void stop(bool restart=false)
Stop the node.
double stopTimeout() const
Node stop timeout.
FDWatcher::Ptr m_fdWatcher
launch::Node::ConstPtr m_launchNode
uint64_t memoryLimit() const
void setMuted(bool muted)
std::pair< int, int > createPTY()
bool coredumpAvailable() const
Is a core dump available from a crash under rosmon control?
void log(const char *format, Args &&... args)
std::shared_ptr< NodeMonitor > Ptr
void endStatUpdate(double elapsedTimeInTicks)
bool m_processWorkingDirectoryCreated
std::shared_ptr< const LaunchConfig > ConstPtr
std::string name() const
Node name.
std::string m_debuggerCommand
std::shared_ptr< NodeMonitor > ConstPtr
void addMemory(uint64_t memoryBytes)
uint64_t memory() const
Total system memory used by the node.
void launchDebugger()
Launch gdb interactively.
std::string fullName() const
Full name including namespace.
std::shared_ptr< const Node > ConstPtr
ros::WallTimer m_restartTimer
std::vector< std::string > composeCommand() const
NodeMonitor(const launch::LaunchConfig::ConstPtr &config, const launch::Node::ConstPtr &launchNode, FDWatcher::Ptr fdWatcher, ros::NodeHandle &nh)
Constructor.
void gatherCoredump(int signal)
@ STATE_IDLE
Idle (e.g. exited with code 0)
std::string namespaceString() const
Node namespace.
unsigned int m_restartCount
boost::signals2::signal< void(std::string)> exitedSignal
Signalled whenever the process exits.
std::string m_lastWorkingDirectory
void start()
Start the node.
void logTyped(LogEvent::Type type, const char *format, Args &&... args)
double userLoad() const
Estimate of the userspace load.
State state() const
Get process state.
unsigned int restartCount() const
void shutdown()
Start shutdown sequence.
void restart()
Restart the node.
@ STATE_WAITING
Waiting for automatic restart after crash.
double systemLoad() const
Estimate of the kernelspace load.
ros::WallTimer m_stopCheckTimer
@ STATE_CRASHED
Crashed (i.e. exited with code != 0)
bool running() const
Is the node running?
launch::LaunchConfig::ConstPtr m_launchConfig
Monitors a single node process.
rosmon_core
Author(s): Max Schwarz
autogenerated on Wed Feb 21 2024 04:01:14