Fledge
An open source edge computing platform for industrial users
process.h
1 #ifndef _PROCESS_H
2 #define _PROCESS_H
3 /*
4  * Fledge process base class
5  *
6  * Copyright (c) 2018 Dianomic Systems
7  *
8  * Released under the Apache 2.0 Licence
9  *
10  * Author: Massimiliano Pinto
11  */
12 
13 #include <storage_client.h>
14 #include <management_client.h>
15 #include <audit_logger.h>
16 #include <string.h>
17 
22 {
23  public:
24  FledgeProcess(int argc, char** argv);
25  virtual ~FledgeProcess();
28  Logger *getLogger() const;
29  std::string getName() const { return m_name; };
30 
31  time_t getStartTime() const { return m_stime; };
32 
33  protected:
34  std::string getArgValue(const std::string& name) const;
35  bool m_dryRun;
36 
37  private:
38  const time_t m_stime; // Start time
39  const int m_argc;
40  const char** m_arg_vals;
41  // Fledge core management service details
42  std::string m_name;
43  int m_core_mngt_port;
44  std::string m_core_mngt_host;
45  ManagementClient* m_client;
46  StorageClient* m_storage;
47  Logger* m_logger;
48  AuditLogger* m_auditLogger;
49 };
50 
51 #endif
Fledge Logger class used to log to syslog.
Definition: logger.h:26
Logger * getLogger() const
Return Logger.
Definition: process.cpp:215
Fledge process base class.
Definition: process.h:21
ManagementClient * getManagementClient() const
Return management client.
Definition: process.cpp:207
The management client class used by services and tasks to communicate with the management API of the ...
Definition: management_client.h:43
StorageClient * getStorageClient() const
Return storage client.
Definition: process.cpp:199
A singleton class for access to the audit logger within services.
Definition: audit_logger.h:21
Client for accessing the storage service.
Definition: storage_client.h:43
std::string getArgValue(const std::string &name) const
Get command line argument value like "--xyx=ABC" Argument name to pass is "--xyz=".
Definition: process.cpp:182