FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OMEprocInfo.h
Go to the documentation of this file.
1 #ifndef _OME_PROC_INFO_H
2 #define _OME_PROC_INFO_H "$Id: OMEprocInfo.h 312 2020-03-21 21:25:35Z geoff $"
4 
14 #include <utils/time/tick_time.h>
15 # include <OMEstring.h>
16 
20 {
21 public:
22  uint32_t bootTime;
23  uint32_t processID;
24  uint32_t hostNameHash;
25 
26  bool operator==(const OMEentityID &arg) const
27  {
28  if (memcmp(this, &arg, sizeof(OMEentityID)) == 0) {
29  return (true);
30  }
31  return (false);
32  }
33 
34  bool operator!=(const OMEentityID &arg) const
35  {
36  if (memcmp(this, &arg, sizeof(OMEentityID)) == 0) {
37  return (false);
38  }
39  return (true);
40  }
41  bool operator<(const OMEentityID &arg) const
42  {
43  if (memcmp(this, &arg, sizeof(OMEentityID)) < 0) {
44  return (true);
45  }
46  return (false);
47  }
48 
49  template <typename STREAMTYPE> STREAMTYPE &outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent = 0) const
50  {
51  outputStream << "(" << bootTime << "|" << processID << "|" << hostNameHash << ")";
52  return (outputStream);
53  }
54 }; // end class OMEentityID
55 
56 template <typename STREAMTYPE> inline STREAMTYPE &operator<<(STREAMTYPE &outputStream, const OMEentityID &data)
57 {
58  data.outputOnStream(outputStream, 0);
59  return (outputStream);
60 }
61 
65 {
66 public:
69 
71 
73 };
74 
76 
78 
79 // uses implementation from utils/tick_time.h
80 #define OMEgetCPUticks() get_CPU_ticks()
81 
84 extern OME_DLL_EXPORT int64_t OMEticksSinceBoot();
85 
89 #endif
90 /* vim: set expandtab shiftwidth=4 tabstop=4: */
OMEthisProcessInfo
Uniquely identifies an OME process.
Definition: OMEprocInfo.h:64
OMEprocInfo.h
OME process information implementation.
OMEthisProcessInfo::OMEthisProcessInfo
OMEthisProcessInfo()
Definition: OMEprocInfo.cpp:231
OMEprofileCounter
Base class for application profiling counters or numerical system information.
Definition: OMEdebugInfo.h:146
OMEentityID::hostNameHash
uint32_t hostNameHash
Definition: OMEprocInfo.h:24
OMEentityID::outputOnStream
STREAMTYPE & outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent=0) const
Definition: OMEprocInfo.h:49
OMEfunctions.h
OME utility functions.
OMEentityID::bootTime
uint32_t bootTime
Definition: OMEprocInfo.h:22
OMEentityID::processID
uint32_t processID
Definition: OMEprocInfo.h:23
OMEstring.h
OME string implementation.
OMEentityID::operator<
bool operator<(const OMEentityID &arg) const
Definition: OMEprocInfo.h:41
OMEruntime.h
SMV_StandaloneNumeric
Convenience template for creating shared memory variables of one of the supported numeric types....
Definition: shared_variable.hpp:436
OMEstring
Implements text and binary string storage.
Definition: OMEstring.h:305
OMEentityID::operator==
bool operator==(const OMEentityID &arg) const
Definition: OMEprocInfo.h:26
OMEtype
Fundamental ANY type for FARGOS/VISTA Object Management Environment.
Definition: OMEbaseType.h:250
OMEhash
OME_DLL_EXPORT uint32_t OMEhash(const unsigned char *data, const uint32_t len) NONNULL_PARAMETERS(1)
Fast 32-bit hash over a buffer.
Definition: OMEhash.cpp:13
OMEprofileCounter::getValue
virtual const OMEtype getValue() const override
Retrieve the variable's value.
Definition: OMEdebugInfo.h:193
OMEticksSinceBoot
int64_t OMEticksSinceBoot()
Obtain the number of CPU ticks since boot of local FARGOS/VISTA Object Management Environment process...
Definition: OMEprocInfo.cpp:103
OMEthisProcessInfo::hostName
OMEstring hostName
Definition: OMEprocInfo.h:67
OMEentityID::operator!=
bool operator!=(const OMEentityID &arg) const
Definition: OMEprocInfo.h:34
OMEgetCPUticks
#define OMEgetCPUticks()
Definition: OMEprocInfo.h:80
SMV_StandaloneString
Convenience class for string variables that can be also be used if a shared memory segment is never a...
Definition: shared_variable.hpp:608
OMEprofileString
Base type for system information represented as strings.
Definition: OMEdebugInfo.h:222
crypt
char * crypt(const char *, const char *)
OMEprofileString::setValue
virtual void setValue(const OMEtype &newV) override
Definition: OMEdebugInfo.h:281
OMEentityID
Identifies an instance of an OME process.
Definition: OMEprocInfo.h:19
srcID
const char srcID[]
Definition: catSym.c:17
operator<<
STREAMTYPE & operator<<(STREAMTYPE &outputStream, const OMEentityID &data)
Definition: OMEprocInfo.h:56
OMEmillisecondsSinceBoot
int64_t OMEmillisecondsSinceBoot()
Obtain the number of milliseconds since boot of local FARGOS/VISTA Object Management Environment proc...
Definition: OMEprocInfo.cpp:93
OMEcurrentProcessInfo
OMEthisProcessInfo OMEcurrentProcessInfo
Automatic instantiation of OMEthisProcessInfo. When properly linked, the C++ static constructor mecha...
Definition: OMEprocInfo.cpp:217
OME_USED
const char srcID[] OME_USED
Definition: tick_time.cpp:24
OMEgetUserName
OMEstring * OMEgetUserName()
Return the name of the user associated with the process.
Definition: OMEprocInfo.cpp:285
OMEthisProcessInfo::~OMEthisProcessInfo
~OMEthisProcessInfo()
Definition: OMEprocInfo.h:72
OMEthisProcessInfo::id
OMEentityID id
Definition: OMEprocInfo.h:68
OMEprofileString::getValue
virtual const OMEtype getValue() const override
Definition: OMEdebugInfo.h:269
OMEprofileCounter::setValue
virtual void setValue(const OMEtype &newV) override
Set the variable's value.
Definition: OMEdebugInfo.h:200
malloc
char * malloc(unsigned int bytes)
Definition: test_malloc.c:441
OMEdebugInfo.h
OME debug and profiling interfaces.
tick_time.h
FARGOS CPU tick routines.
pamConvFunc
int pamConvFunc(int numMess, struct pam_message **msg, struct pam_response **pam_resp, void *appData)
Definition: pamtest.c:10
VISTA_HOSTNAME
#define VISTA_HOSTNAME
Definition: OMEprocInfo.cpp:29
OME_DLL_EXPORT
#define OME_DLL_EXPORT
Definition: compiler_hints.h:464
OMEprofileCounter::operator=
OMEprofileCounter< NUMTYPE > & operator=(const NUMTYPE v)
Definition: OMEdebugInfo.h:188
OMEverifyUserPassword
bool OMEverifyUserPassword(const char *userName, const char *password)
Definition: OMEpassword.cpp:63
_OME_PROC_INFO_H
#define _OME_PROC_INFO_H
Definition: tmp.o.cpp:973
OMErelativeMilliseconds
int64_t OMErelativeMilliseconds()
Return a monotonically-increasing count of elapsed milliseconds.
Definition: OMEprocInfo.cpp:59
Generated: Tue Jul 28 2020 16:03:25
Support Information