PLCnext API Documentation  21.0.0.35466
Process.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 
9 namespace Arp { namespace System { namespace Ve
10 {
11 class IProcessService;
12 }}}
13 
14 namespace Arp { namespace System { namespace Commons { namespace Runtime
15 {
16 
18 class Process
19 {
20 public: // construction/destruction
22  Process(void);
24  Process(const Process& arg) = default;
26  Process& operator=(const Process& arg) = default;
28  ~Process(void);
29 
30 public: // static operations
32  static void SetupCurrentProcess(int core = -1);
33 
36  static const String GetCurrentFileName(void);
37 
38 public: // 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 
54  void Kill(void);
55 
58  bool HasExited(void);
59 
60 private: // fields
61  Arp::System::Ve::IProcessService* pProcessService;
62 };
63 
65 // inline methods of class Process
66 
67 }}}} // end of namesapce Arp::System::Commons::Diagnostics
High level API to create and manage a processes.
Definition: Process.hpp:18
Root namespace for the PLCnext API
System components used by the System, Device, Plc or Io domains.