PLCnext API Documentation 23.6.0.37
Process.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8
9namespace Arp { namespace System { namespace Ve
10{
11class IProcessService;
12}}}
13
14namespace Arp { namespace System { namespace Commons { namespace Runtime
15{
16
19{
20public: // construction/destruction
22 Process(void);
24 Process(const Process& arg) = default;
26 Process& operator=(const Process& arg) = default;
28 ~Process(void);
29
30public: // static operations
32 static void SetupCurrentProcess(int core = -1);
33
36 static const String GetCurrentFileName(void);
37
38public: // operations
43 void Start(const String& workingDirectory, const String& path, const String& commandLineArgs = "");
44
51 int StartBlocking(const String& workingDirectory, const String& path, const String& commandLineArgs, int& exitStatus);
52
58 void StartDaemon(const String& workingDirectory, const String& path, const String& commandLineArgs = "");
59
61 void Kill(void);
62
65 bool HasExited(void);
66
67private: // fields
68 Arp::System::Ve::IProcessService* pProcessService;
69};
70
72// inline methods of class Process
73
74}}}} // end of namesapce Arp::System::Commons::Diagnostics
High level API to create and manage a processes.
Definition: Process.hpp:19
void Kill(void)
Posts a kill request to this process.
void Start(const String &workingDirectory, const String &path, const String &commandLineArgs="")
Starts a new separate process.
Process(const Process &arg)=default
Copy contructor.
bool HasExited(void)
Checks if the process has terminated.
Process & operator=(const Process &arg)=default
Assignment operator.
~Process(void)
Destructs this instance and frees all resouces.
void StartDaemon(const String &workingDirectory, const String &path, const String &commandLineArgs="")
Starts a new separate process as a daemon
static void SetupCurrentProcess(int core=-1)
Process(void)
Constructs an Process instance.
static const String GetCurrentFileName(void)
Returns the full qualified filename of the executable of the current process.
int StartBlocking(const String &workingDirectory, const String &path, const String &commandLineArgs, int &exitStatus)
Starts a new separate process. And waits until the child process exits
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API