FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OMEioEvents.h
Go to the documentation of this file.
1 #ifndef _OME_IO_EVENTS_H
2 #define _OME_IO_EVENTS_H "$Id: OMEioEvents.h 422 2020-07-14 17:18:19Z fargos $"
4 
6 #include <OMEevent.h>
7 
15 // OMEprocessEvent also inherits from OMEioEvent
16 class OMEioEvent : public OMEevent {
17 public:
18  static void selectIOevent(OMEioEvent *event);
19 
22 
27 
28  OMEioEvent(OMEfileType t, OMEselectMode m, uint64_t handle,
29  OMEeventCallbackFP func, OMEthread *thread = nullptr,
30  void *extra = nullptr);
31 
33 
34  void deselectIOevent();
35 }; // end class OMEioEvent
36 
37 int OMEwaitForIO(uint_fast32_t delay = 0);
38 
39 int OMEremoveSelectEvent(uint64_t handle, OMEioEvent::OMEselectMode m);
40 
41 extern "C" void OMErequestShutdown();
42 
43 #ifdef _WIN32
44 void OMEcreateShutdownEvent();
45 
46 extern "C" OMEwin32MessageLoopFP OMEwin32MessageLoopPtr;
47 #endif
48 
51 #endif
52 /* vim: set expandtab shiftwidth=4 tabstop=4: */
OMEeventCallbackFP
bool(* OMEeventCallbackFP)(class OMEevent *, OMEthread *)
Definition: OMEevent.h:16
OMEmakeACL
OMEassoc * OMEmakeACL(const OMEstring &entity, uint_fast32_t defaultPermission, const OMEassoc &methodList)
Definition: OMEobjACL.cpp:164
safe_strcpy
#define safe_strcpy(d, s, l)
Safe strcpy() routine that will not copy more than l bytes and always ensures that a null is present ...
Definition: compiler_hints.h:696
LogManager::initializeLogSubsystem
static int initializeLogSubsystem(int *newArgc, const char **newArgv, const int argc, const char *argv[], const char *componentName=nullptr, LogMaskType_t *appMaskLocation=nullptr, const uint_fast32_t maxLines=128, const LogMaskPrimitiveType_t logPrefixMask=~0U)
Initialize logging-specific parameters by passing command line arguments.
Definition: logging_api.cpp:700
TABLE_SIZE
#define TABLE_SIZE
Definition: OMEioEvents.cpp:35
OMEdebugLogLevel1
#define OMEdebugLogLevel1
Definition: OMEdebugInfo.h:33
sock
SOCKET sock
Definition: sockspx.c:203
OMEremoveSelectEvent
int OMEremoveSelectEvent(uint64_t handle, OMEioEvent::OMEselectMode m)
Definition: OMEioEvents.cpp:237
OMEioEvent::socket
@ socket
Definition: OMEioEvents.h:20
OMEtype::initializeAsType
void initializeAsType(const enum OMEtypes_t t)
The fundamental tagged data type used through the FARGOS/VISTA infrastructure.
Definition: OMEtype.cpp:95
OME_CRITICAL_SECTION_EVENT_TABLE
@ OME_CRITICAL_SECTION_EVENT_TABLE
Definition: OMEmutex.h:43
OMEprofileCounter< uint32_t >
OMEreleaseVersion
OME_DLL_EXPORT OMEprofileCounter< uint32_t > OMEreleaseVersion
Specifies FARGOS/VISTA Version release number.
s
const char s[]
Definition: t.cpp:4
OMEdebugFlag
SMV_StandaloneNumeric< uint32_t > OMEdebugFlag("debugFlag")
OMEinitStandardCriticalSectionMutexes
bool OMEinitStandardCriticalSectionMutexes()
Definition: OMEmutex.cpp:114
OMEmainLoop
int OMEmainLoop(uint_fast32_t methodLimit)
FARGOS/VISTA Object Mangement Environment main loop. Invokes OMEdoWork(). Upon return,...
Definition: OMEevent.cpp:243
OMEfunctions.h
OME utility functions.
SIOCGLIFADDR
#define SIOCGLIFADDR
Definition: OMEifList.cpp:266
OMEstartCriticalSection
void OMEstartCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:217
OMEinitializeOIL2threadQueue
void OMEinitializeOIL2threadQueue(const int cpuCount, const int multiThreshold)
Definition: OMEexecQueue.cpp:512
OMEdisplayableAddress
OMEstring * OMEdisplayableAddress(const struct sockaddr *sock, const int len, const uint32_t openMode)
Convert sockaddr data into a text string.
Definition: OMEaddr.cpp:349
OMEinitSystem
int OMEinitSystem(const char *rcFileName, int mainArgc, const char *mainArgv[], const char *envp[])
Definition: OMEinit.cpp:142
OMEstring.h
OME string implementation.
OMEioEvent::genericEvent
@ genericEvent
Definition: OMEioEvents.h:20
OMEioEvents.h
OMEioEvent::selectRead
@ selectRead
Definition: OMEioEvents.h:21
OMEsetDebugFlag
int OMEsetDebugFlag(const char *flagName, bool setFlag)
Set or clear named debug flag.
Definition: OMEdebugInfo.cpp:117
OMEassoc
Implements associative array of OMEtype elements.
Definition: OMEassoc.h:112
OMEassoc::nextIndex
ASSOC_HASH_KEY_t nextIndex(const ASSOC_HASH_KEY_t currentSubscript) const
Definition: OMEassoc.h:236
OMEioEvent::selectWrite
@ selectWrite
Definition: OMEioEvents.h:21
OMEioEvent::deselectIOevent
void deselectIOevent()
Definition: OMEioEvents.cpp:177
OMEioEvent::file
@ file
Definition: OMEioEvents.h:20
OMEstring
Implements text and binary string storage.
Definition: OMEstring.h:305
OMEencode.h
OME type encoding routines.
OMEioEvent::notUsed
@ notUsed
Definition: OMEioEvents.h:21
OMEtype
Fundamental ANY type for FARGOS/VISTA Object Management Environment.
Definition: OMEbaseType.h:250
SIOCGLIFCONF
#define SIOCGLIFCONF
Definition: OMEifList.cpp:263
OMEhash
uint32_t OMEhash(const unsigned char *key, const uint32_t len)
Fast 32-bit hash over a buffer.
Definition: OMEhash.cpp:13
SIOCGLIFINDEX
#define SIOCGLIFINDEX
Definition: OMEifList.cpp:274
OMEioEvent
I/O-specific event.
Definition: OMEioEvents.h:16
OMEprofileCounter::getValue
virtual const OMEtype getValue() const override
Retrieve the variable's value.
Definition: OMEdebugInfo.h:193
OMEshareConstantsDisabled
bool OMEshareConstantsDisabled
Definition: OMEnamespace.cpp:333
OMEevent.h
lifreq
#define lifreq
Definition: OMEifList.cpp:262
moduleList
const initFP moduleList[]
OMEwaitForIO
int OMEwaitForIO(uint_fast32_t delay)
Definition: OMEioEvents.cpp:395
OMEshutdownRequested
int32_t OMEshutdownRequested()
Returns indication if the shutdown of the FARGOS/VISTA-based component has been requested.
Definition: OMEdebugInfo.cpp:68
OMEstringInROM
const typedef void * OMEstringInROM
Points to immovable, read-only string data.
Definition: OMEstring.h:68
SIOCGLIFFLAGS
#define SIOCGLIFFLAGS
Definition: OMEifList.cpp:264
OMEloadVersion1Encodings
void OMEloadVersion1Encodings()
Definition: encodeVer1.cpp:631
attach_req
dl_attach_req_t attach_req
Definition: ethers.c:45
lifconf
#define lifconf
Definition: OMEifList.cpp:261
ldUtils.h
buffer
long buffer[MAXDLBUF]
Definition: ethers.c:42
OMEobjACL.h
ONE_OR_TWO
@ ONE_OR_TWO
Definition: OMEinit.cpp:78
OMEcore.h
OMEgetLicenseAttribute
OMEtype * OMEgetLicenseAttribute(const OMEstring &attrName, OMEstring *retFileName=0)
Definition: OMElicense.cpp:521
OMEioEvent::selectIOevent
static void selectIOevent(OMEioEvent *event)
Definition: OMEioEvents.cpp:74
HANDLE_TYPE
#define HANDLE_TYPE
Definition: OMEioEvents.cpp:36
OMEioEvent::OMEselectMode
OMEselectMode
Definition: OMEioEvents.h:21
OMEgetInterfaces
int OMEgetInterfaces(OMEtype &result)
Definition: OMEifList.cpp:290
OMEinitDebugFlag
void OMEinitDebugFlag(const char *param)
Set initial default flags, then parse a line of debugging options and set/clear specified flags.
Definition: OMEdebugInfo.cpp:268
OMEadminProcessLabel
SMV_StandaloneString< 128 > OMEadminProcessLabel("adminProcessLabel")
ctl
struct strbuf ctl
Definition: ethers.c:43
OMEstopReason
SMV_StandaloneString< 128 > OMEstopReason("stopReason")
OMEioEvent::fileType
OMEfileType fileType
Definition: OMEioEvents.h:25
SIOCGLIFBRDADDR
#define SIOCGLIFBRDADDR
Definition: OMEifList.cpp:271
SINGLE_CHAR
@ SINGLE_CHAR
Definition: OMEinit.cpp:76
OMEioEvent::~OMEioEvent
~OMEioEvent()
Definition: OMEioEvents.h:32
OMEioEvent::nextEvent
OMEioEvent * nextEvent
Definition: OMEioEvents.h:23
OME_MAX_CPUS_PERMITTED
#define OME_MAX_CPUS_PERMITTED
Definition: OMEmutex.h:79
srcID
const char srcID[]
Definition: catSym.c:17
OMEioEvent::eventObj
@ eventObj
Definition: OMEioEvents.h:21
OMEdebugLogLevel3
#define OMEdebugLogLevel3
Definition: OMEdebugInfo.h:35
OMEassoc::getKeyForIndex
const OMEstring & getKeyForIndex(const ASSOC_HASH_KEY_t i) const
Definition: OMEassoc.h:198
ldLoad
int ldLoad(const char *path)
Definition: ldUtils.cpp:182
OMEevent::eventHandle
uint64_t eventHandle
Event-specific handle.
Definition: OMEevent.h:30
OMEthread::terminateThread
void terminateThread()
Definition: OMEthread.cpp:1094
phys_addr_req
dl_phys_addr_req_t phys_addr_req
Definition: ethers.c:44
initFP
void(* initFP)()
Definition: OMEinit.cpp:30
OMEevent::waitingThread
OMEthread * waitingThread
OMEthread to signal.
Definition: OMEevent.h:32
DEFAULT_sharedMemoryVariableManager
SharedMemoryVariableManager DEFAULT_sharedMemoryVariableManager
Default shared memory variable manager.
OMEcrypto.h
OMEioEvent::OMEfileType
OMEfileType
Definition: OMEioEvents.h:20
getFileInfo
int getFileInfo(OMEthread *thread, OMEtype &result, const OMEtype &filePath)
Definition: OILio.cpp:639
OMEvistaCPU
OME_DLL_EXPORT OMEprofileString< 32 > OMEvistaCPU
Specifies name of the underlying CPU architecture.
SIOCGLIFDSTADDR
#define SIOCGLIFDSTADDR
Definition: OMEifList.cpp:272
MAXDLBUF
#define MAXDLBUF
Definition: ethers.c:39
SharedMemoryVariableManager::createAndAttachStandardSegment
unsigned char * createAndAttachStandardSegment(const char *componentName, size_t *segmentLength)
Convenience function to create a file and map it to segment for variable storage. The filename will i...
Definition: shared_variable.cpp:426
SIOCGLIFNETMASK
#define SIOCGLIFNETMASK
Definition: OMEifList.cpp:269
OMEexecQueue.h
NULL
#define NULL
Definition: tmp.o.cpp:327
OMEminorVersion
OME_DLL_EXPORT OMEprofileCounter< uint32_t > OMEminorVersion
Specifies FARGOS/VISTA Version minor number.
OMEioEvent::pipe
@ pipe
Definition: OMEioEvents.h:20
LOG_WHEN
#define LOG_WHEN(lvl)
Convenience declaration for log line that will be conditionally emitted for the default component to ...
Definition: logging_api.hpp:2933
OMEtype.h
OME fundamental type implementation.
OMEnlmData::initialize
static void initialize(const char *appName, const char *lang=nullptr)
Definition: OMEnlmData.cpp:455
NOTE_DEFAULT_NLM
#define NOTE_DEFAULT_NLM(s)
Declare the default message within a DEFINE_NLM_MESSAGE() block.
Definition: OMEdebugInfo.h:314
dlpadd
dl_phys_addr_ack_t * dlpadd
Definition: ethers.c:46
FD_ISSET
#define FD_ISSET(n, p)
Definition: tmp.o.cpp:175
OMEstopFlag
SMV_StandaloneNumeric< uint32_t > OMEstopFlag("stopFlag")
External flag used to trigger stop of a FARGOS/VISTA Object Management Environment.
OMEstring::length
size_t length() const
Definition: OMEstring.h:401
DEFINE_NLM_MESSAGE
#define DEFINE_NLM_MESSAGE(Lvl, MessID, AppName)
Define an Native Language Message.
Definition: OMEdebugInfo.h:318
OME_USED
const char srcID[] OME_USED
Definition: tick_time.cpp:24
flags
int flags
Definition: ethers.c:41
POSIX_DOUBLE_DASH
@ POSIX_DOUBLE_DASH
Definition: OMEinit.cpp:77
SIOCGLIFMTU
#define SIOCGLIFMTU
Definition: OMEifList.cpp:273
NEXT_NLM_PARAM
#define NEXT_NLM_PARAM
Define value for next positional parameter.
Definition: OMEdebugInfo.h:337
OMEvistaOS
OME_DLL_EXPORT OMEprofileString< 32 > OMEvistaOS
Specifies name of underlying native operating system.
OMEnoACLS
int OMEnoACLS
Definition: OMEinit.cpp:16
OMEnlmData.h
OME native language message catalog implementation.
OMEendCriticalSection
void OMEendCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:236
errno
int errno
Definition: ethers.c:41
OME_EXPECT_FALSE
#define OME_EXPECT_FALSE(expr)
Annotation macro for conditional expression expected to be false.
Definition: compiler_hints.h:540
LogManager::newStandardLogFile
static LogManager * newStandardLogFile(const char *namedComponent=nullptr, LogMaskPrimitiveType_t filenameCreateFlags=~0U, SharedMemoryVariableNode *parentNode=nullptr)
High-level routine to create a standard log file associated with a component.
Definition: logging_api.cpp:935
OMEobjectInstance::createObjectOfClass
static OME_FAST_CALL OMEoid * createObjectOfClass(const uint32_t argc, const OMEarray &argv, const OMEassoc &acl, const OMEstring &name, const OMEtype *fromObject=nullptr, const OMEthread *fromThread=nullptr, const OMEoid *notify=nullptr, const uint32_t verID=0, const OMEstring *nmSpace=nullptr, OMEtype *errInfo=nullptr)
Create an object, potentially searching through the OMEnameSpaceGroup list for most current version o...
Definition: OMEobject.cpp:1250
_SC_NPROCESSORS_ONLN
#define _SC_NPROCESSORS_ONLN
Definition: tmp.o.cpp:1218
OMEtype::outputOnStream
STREAMTYPE & outputOnStream(STREAMTYPE &outputOnStream, int_fast16_t indent=0, uint8_t includeTypePrefix=OUTPUT_TYPENAME) const
Definition: OMEoutputOnStream.h:311
OMEioEvent::process
@ process
Definition: OMEioEvents.h:20
OMEevent::postEvent
bool postEvent()
Post event and call callback function.
Definition: OMEevent.h:78
OMEevent
Base class for events within the FARGOS/VISTA Object Management Environment.
Definition: OMEevent.h:22
OMEobjectInstance::defineOMEobjectClass
static void defineOMEobjectClass()
Definition: OMEobject.cpp:481
OMErequestShutdown
void OMErequestShutdown()
Definition: OMEioEvents.cpp:572
OMEdebugEvents
#define OMEdebugEvents
Definition: OMEdebugInfo.h:23
OMEdebugInfo.h
OME debug and profiling interfaces.
ppa
int ppa
Definition: ethers.c:41
trace_malloc
int trace_malloc
Definition: test_malloc.c:66
OMEarray
Implements sparse array of OMEtype elements.
Definition: OMEarray.h:75
OMEthread
Public interface to an OME thread.
Definition: OMEthread.h:60
LOG_ENDLINE
#define LOG_ENDLINE
Closing clause for text line output using << operators.
Definition: logging_api.hpp:2956
OMEoid
Public interface to an OME Object Identifier.
Definition: OMEoid.h:196
OMEioEvent::tableIndex
int tableIndex
Definition: OMEioEvents.h:24
OMEtype::type
uint32_t type
Definition: OMEbaseType.h:304
ARG_TYPE
ARG_TYPE
Definition: OMEinit.cpp:75
OMEdisplayModuleComments
void OMEdisplayModuleComments()
Convenience function to display module comments on standard error.
Definition: OMEdebugInfo.cpp:83
OMEioEvent::OMEioEvent
OMEioEvent(OMEfileType t, OMEselectMode m, uint64_t handle, OMEeventCallbackFP func, OMEthread *thread=nullptr, void *extra=nullptr)
Definition: OMEioEvents.cpp:165
FILENAME_WITH_EVERYTHING
#define FILENAME_WITH_EVERYTHING
Definition: mapped_file.h:38
OME_ARRAY
@ OME_ARRAY
Definition: OMEmanifests.h:86
OMEioEvent::selectMode
OMEselectMode selectMode
Definition: OMEioEvents.h:26
OMEgetSystemUser
int OMEgetSystemUser(OMEstring &name, OMEstring &pw)
Definition: OMEobjACL.cpp:29
FD_CLR
#define FD_CLR(n, p)
Definition: tmp.o.cpp:173
OMEmajorVersion
OME_DLL_EXPORT OMEprofileCounter< uint32_t > OMEmajorVersion
Specifies FARGOS/VISTA Version major number.
AND_OUTPUT_NLM
#define AND_OUTPUT_NLM(o, t)
Render NLM data to an output stream.
Definition: OMEdebugInfo.h:327
FD_SET
#define FD_SET(n, p)
Definition: tmp.o.cpp:176
OMEthread::defineOMEthreadClass
static void defineOMEthreadClass()
Definition: OMEthread.cpp:315
moduleFiles
const char * moduleFiles[]
OMEabortOnError
int OMEabortOnError
If non-zero, abort() called on type error.
Definition: OMEtype_operators.cpp:9
OME_ASSOC
@ OME_ASSOC
Definition: OMEmanifests.h:87
fd
int fd
Definition: ethers.c:41
LOG_CERR
#define LOG_CERR(lvl)
Convenience macro that uses LOG_INTO() to conditionally log a message to standard error.
Definition: logging_api.hpp:3014
OMEaddToACL
void OMEaddToACL(OMEassoc &result, const OMEstring &entity, uint_fast32_t defaultPermission, const OMEassoc &methodList)
Definition: OMEobjACL.cpp:154
logging_api.hpp
FARGOS Logging API.
EINTR
#define EINTR
Definition: tmp.o.cpp:93
Generated: Fri Jul 31 2020 18:19:14
Support Information