8#include "Arp/System/Commons/Logging.h"
9#include "Arp/System/Core/Singleton.hxx"
10#include "Arp/System/Commons/Logging.h"
11#include "Arp/System/Commons/Runtime/SharedLibrary.hpp"
12#include "Arp/System/Commons/Chrono/Timer.hpp"
16namespace Arp {
namespace System {
namespace Ve
18class ITraceControllerService;
21namespace Arp {
namespace System {
namespace Commons {
namespace Diagnostics
59 typedef std::list<Arp::String> SessionList;
294 void RunTraceSavingTimer(
void);
296 bool RecordSessionSnapshot(
const Arp::String& session);
300 using ITraceControllerService = Arp::System::Ve::ITraceControllerService;
304 ITraceControllerService *pInstance;
315 Timer savingDelayTimer;
318 std::atomic_flag triggerSavingWorking = ATOMIC_FLAG_INIT;
320 bool tracepointLibLoaded;
This class implements the singleton pattern.
Definition: Singleton.hxx:25
High resolution timer for interval based executions.
Definition: Timer.hpp:54
Definition: Loggable.hxx:20
This Singleton class provides an Interface to manage and control the LTTng tracing on the PLCnext con...
Definition: TraceController.hpp:53
bool IsSessionInSnapshotMode(const Arp::String &session)
Checks if a tracing session is in Snapshot Mode.
bool StopSession(const Arp::String &session)
Stops a LTTng tracing session.
bool IsSessionDaemonAlive(void) const
Checks if the LTTng session daemon for tracing is alive.
bool IsSessionLoaded(const Arp::String &session)
Checks if a trace session is already loaded.
void SetTracesSavingConfigs(const Arp::String &triggerSession, const Arp::String &outPath, const Arp::uint32 &maxDirectorySize, const Arp::uint32 &savingDelayTimeout)
Sets the configuration of the trigger saving function
bool IsSessionEnabled(const Arp::String &session)
Checks if a tracing session is already enabled/started.
void UnloadTracepointLibrary(void)
Unloads the userspace Tracepoint library.
SessionList ListSessions(void)
Queries a list of all loaded (both started and stopped sessions) LTTng tracing sessions.
bool TriggerSavingTraceOutputs(const bool &stopTriggerSession)
Triggers the recording/saving all outputs of a configured session. Saving will be performed by anothe...
bool DestroySession(const Arp::String &session)
Destroys/Unloads a LTTng tracing session.
bool LoadSessionConfiguration(const Arp::String &session, const Arp::String &config)
Tries to loads a tracing session from a given configuration file.
void LoadTracepointLibrary(void)
Loads the PLCnext userspace Tracepoint library.
bool StartSession(const Arp::String &session)
Starts a LTTng tracing session.
High level API to enable work with dynamically loadable shared libraries.
Definition: SharedLibrary.hpp:20
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:36
@ System
System components used by the System, Device, Plc or Io domains.
Namespace for time related classes
Definition: Duration.hpp:13
Root namespace for the PLCnext API