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 $"
30 void *extra =
nullptr);
44 void OMEcreateShutdownEvent();
46 extern "C" OMEwin32MessageLoopFP OMEwin32MessageLoopPtr;
bool(* OMEeventCallbackFP)(class OMEevent *, OMEthread *)
Definition: OMEevent.h:16
OMEassoc * OMEmakeACL(const OMEstring &entity, uint_fast32_t defaultPermission, const OMEassoc &methodList)
Definition: OMEobjACL.cpp:164
#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
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
#define TABLE_SIZE
Definition: OMEioEvents.cpp:35
#define OMEdebugLogLevel1
Definition: OMEdebugInfo.h:33
SOCKET sock
Definition: sockspx.c:203
int OMEremoveSelectEvent(uint64_t handle, OMEioEvent::OMEselectMode m)
Definition: OMEioEvents.cpp:237
@ socket
Definition: OMEioEvents.h:20
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
Definition: OMEmutex.h:43
OME_DLL_EXPORT OMEprofileCounter< uint32_t > OMEreleaseVersion
Specifies FARGOS/VISTA Version release number.
const char s[]
Definition: t.cpp:4
SMV_StandaloneNumeric< uint32_t > OMEdebugFlag("debugFlag")
bool OMEinitStandardCriticalSectionMutexes()
Definition: OMEmutex.cpp:114
int OMEmainLoop(uint_fast32_t methodLimit)
FARGOS/VISTA Object Mangement Environment main loop. Invokes OMEdoWork(). Upon return,...
Definition: OMEevent.cpp:243
#define SIOCGLIFADDR
Definition: OMEifList.cpp:266
void OMEstartCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:217
void OMEinitializeOIL2threadQueue(const int cpuCount, const int multiThreshold)
Definition: OMEexecQueue.cpp:512
OMEstring * OMEdisplayableAddress(const struct sockaddr *sock, const int len, const uint32_t openMode)
Convert sockaddr data into a text string.
Definition: OMEaddr.cpp:349
int OMEinitSystem(const char *rcFileName, int mainArgc, const char *mainArgv[], const char *envp[])
Definition: OMEinit.cpp:142
OME string implementation.
@ genericEvent
Definition: OMEioEvents.h:20
@ selectRead
Definition: OMEioEvents.h:21
int OMEsetDebugFlag(const char *flagName, bool setFlag)
Set or clear named debug flag.
Definition: OMEdebugInfo.cpp:117
Implements associative array of OMEtype elements.
Definition: OMEassoc.h:112
ASSOC_HASH_KEY_t nextIndex(const ASSOC_HASH_KEY_t currentSubscript) const
Definition: OMEassoc.h:236
@ selectWrite
Definition: OMEioEvents.h:21
void deselectIOevent()
Definition: OMEioEvents.cpp:177
@ file
Definition: OMEioEvents.h:20
Implements text and binary string storage.
Definition: OMEstring.h:305
OME type encoding routines.
@ notUsed
Definition: OMEioEvents.h:21
Fundamental ANY type for FARGOS/VISTA Object Management Environment.
Definition: OMEbaseType.h:250
#define SIOCGLIFCONF
Definition: OMEifList.cpp:263
uint32_t OMEhash(const unsigned char *key, const uint32_t len)
Fast 32-bit hash over a buffer.
Definition: OMEhash.cpp:13
#define SIOCGLIFINDEX
Definition: OMEifList.cpp:274
I/O-specific event.
Definition: OMEioEvents.h:16
virtual const OMEtype getValue() const override
Retrieve the variable's value.
Definition: OMEdebugInfo.h:193
bool OMEshareConstantsDisabled
Definition: OMEnamespace.cpp:333
#define lifreq
Definition: OMEifList.cpp:262
const initFP moduleList[]
int OMEwaitForIO(uint_fast32_t delay)
Definition: OMEioEvents.cpp:395
int32_t OMEshutdownRequested()
Returns indication if the shutdown of the FARGOS/VISTA-based component has been requested.
Definition: OMEdebugInfo.cpp:68
const typedef void * OMEstringInROM
Points to immovable, read-only string data.
Definition: OMEstring.h:68
#define SIOCGLIFFLAGS
Definition: OMEifList.cpp:264
void OMEloadVersion1Encodings()
Definition: encodeVer1.cpp:631
dl_attach_req_t attach_req
Definition: ethers.c:45
#define lifconf
Definition: OMEifList.cpp:261
long buffer[MAXDLBUF]
Definition: ethers.c:42
@ ONE_OR_TWO
Definition: OMEinit.cpp:78
OMEtype * OMEgetLicenseAttribute(const OMEstring &attrName, OMEstring *retFileName=0)
Definition: OMElicense.cpp:521
static void selectIOevent(OMEioEvent *event)
Definition: OMEioEvents.cpp:74
#define HANDLE_TYPE
Definition: OMEioEvents.cpp:36
OMEselectMode
Definition: OMEioEvents.h:21
int OMEgetInterfaces(OMEtype &result)
Definition: OMEifList.cpp:290
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
SMV_StandaloneString< 128 > OMEadminProcessLabel("adminProcessLabel")
struct strbuf ctl
Definition: ethers.c:43
SMV_StandaloneString< 128 > OMEstopReason("stopReason")
OMEfileType fileType
Definition: OMEioEvents.h:25
#define SIOCGLIFBRDADDR
Definition: OMEifList.cpp:271
@ SINGLE_CHAR
Definition: OMEinit.cpp:76
~OMEioEvent()
Definition: OMEioEvents.h:32
OMEioEvent * nextEvent
Definition: OMEioEvents.h:23
#define OME_MAX_CPUS_PERMITTED
Definition: OMEmutex.h:79
const char srcID[]
Definition: catSym.c:17
@ eventObj
Definition: OMEioEvents.h:21
#define OMEdebugLogLevel3
Definition: OMEdebugInfo.h:35
const OMEstring & getKeyForIndex(const ASSOC_HASH_KEY_t i) const
Definition: OMEassoc.h:198
int ldLoad(const char *path)
Definition: ldUtils.cpp:182
uint64_t eventHandle
Event-specific handle.
Definition: OMEevent.h:30
void terminateThread()
Definition: OMEthread.cpp:1094
dl_phys_addr_req_t phys_addr_req
Definition: ethers.c:44
void(* initFP)()
Definition: OMEinit.cpp:30
OMEthread * waitingThread
OMEthread to signal.
Definition: OMEevent.h:32
SharedMemoryVariableManager DEFAULT_sharedMemoryVariableManager
Default shared memory variable manager.
OMEfileType
Definition: OMEioEvents.h:20
int getFileInfo(OMEthread *thread, OMEtype &result, const OMEtype &filePath)
Definition: OILio.cpp:639
OME_DLL_EXPORT OMEprofileString< 32 > OMEvistaCPU
Specifies name of the underlying CPU architecture.
#define SIOCGLIFDSTADDR
Definition: OMEifList.cpp:272
#define MAXDLBUF
Definition: ethers.c:39
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
#define SIOCGLIFNETMASK
Definition: OMEifList.cpp:269
#define NULL
Definition: tmp.o.cpp:327
OME_DLL_EXPORT OMEprofileCounter< uint32_t > OMEminorVersion
Specifies FARGOS/VISTA Version minor number.
@ pipe
Definition: OMEioEvents.h:20
#define LOG_WHEN(lvl)
Convenience declaration for log line that will be conditionally emitted for the default component to ...
Definition: logging_api.hpp:2933
OME fundamental type implementation.
static void initialize(const char *appName, const char *lang=nullptr)
Definition: OMEnlmData.cpp:455
#define NOTE_DEFAULT_NLM(s)
Declare the default message within a DEFINE_NLM_MESSAGE() block.
Definition: OMEdebugInfo.h:314
dl_phys_addr_ack_t * dlpadd
Definition: ethers.c:46
#define FD_ISSET(n, p)
Definition: tmp.o.cpp:175
SMV_StandaloneNumeric< uint32_t > OMEstopFlag("stopFlag")
External flag used to trigger stop of a FARGOS/VISTA Object Management Environment.
size_t length() const
Definition: OMEstring.h:401
#define DEFINE_NLM_MESSAGE(Lvl, MessID, AppName)
Define an Native Language Message.
Definition: OMEdebugInfo.h:318
const char srcID[] OME_USED
Definition: tick_time.cpp:24
int flags
Definition: ethers.c:41
@ POSIX_DOUBLE_DASH
Definition: OMEinit.cpp:77
#define SIOCGLIFMTU
Definition: OMEifList.cpp:273
#define NEXT_NLM_PARAM
Define value for next positional parameter.
Definition: OMEdebugInfo.h:337
OME_DLL_EXPORT OMEprofileString< 32 > OMEvistaOS
Specifies name of underlying native operating system.
int OMEnoACLS
Definition: OMEinit.cpp:16
OME native language message catalog implementation.
void OMEendCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:236
int errno
Definition: ethers.c:41
#define OME_EXPECT_FALSE(expr)
Annotation macro for conditional expression expected to be false.
Definition: compiler_hints.h:540
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
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
#define _SC_NPROCESSORS_ONLN
Definition: tmp.o.cpp:1218
STREAMTYPE & outputOnStream(STREAMTYPE &outputOnStream, int_fast16_t indent=0, uint8_t includeTypePrefix=OUTPUT_TYPENAME) const
Definition: OMEoutputOnStream.h:311
@ process
Definition: OMEioEvents.h:20
bool postEvent()
Post event and call callback function.
Definition: OMEevent.h:78
Base class for events within the FARGOS/VISTA Object Management Environment.
Definition: OMEevent.h:22
static void defineOMEobjectClass()
Definition: OMEobject.cpp:481
void OMErequestShutdown()
Definition: OMEioEvents.cpp:572
#define OMEdebugEvents
Definition: OMEdebugInfo.h:23
OME debug and profiling interfaces.
int ppa
Definition: ethers.c:41
int trace_malloc
Definition: test_malloc.c:66
Implements sparse array of OMEtype elements.
Definition: OMEarray.h:75
Public interface to an OME thread.
Definition: OMEthread.h:60
#define LOG_ENDLINE
Closing clause for text line output using << operators.
Definition: logging_api.hpp:2956
Public interface to an OME Object Identifier.
Definition: OMEoid.h:196
int tableIndex
Definition: OMEioEvents.h:24
uint32_t type
Definition: OMEbaseType.h:304
ARG_TYPE
Definition: OMEinit.cpp:75
void OMEdisplayModuleComments()
Convenience function to display module comments on standard error.
Definition: OMEdebugInfo.cpp:83
OMEioEvent(OMEfileType t, OMEselectMode m, uint64_t handle, OMEeventCallbackFP func, OMEthread *thread=nullptr, void *extra=nullptr)
Definition: OMEioEvents.cpp:165
#define FILENAME_WITH_EVERYTHING
Definition: mapped_file.h:38
@ OME_ARRAY
Definition: OMEmanifests.h:86
OMEselectMode selectMode
Definition: OMEioEvents.h:26
int OMEgetSystemUser(OMEstring &name, OMEstring &pw)
Definition: OMEobjACL.cpp:29
#define FD_CLR(n, p)
Definition: tmp.o.cpp:173
OME_DLL_EXPORT OMEprofileCounter< uint32_t > OMEmajorVersion
Specifies FARGOS/VISTA Version major number.
#define AND_OUTPUT_NLM(o, t)
Render NLM data to an output stream.
Definition: OMEdebugInfo.h:327
#define FD_SET(n, p)
Definition: tmp.o.cpp:176
static void defineOMEthreadClass()
Definition: OMEthread.cpp:315
const char * moduleFiles[]
int OMEabortOnError
If non-zero, abort() called on type error.
Definition: OMEtype_operators.cpp:9
@ OME_ASSOC
Definition: OMEmanifests.h:87
int fd
Definition: ethers.c:41
#define LOG_CERR(lvl)
Convenience macro that uses LOG_INTO() to conditionally log a message to standard error.
Definition: logging_api.hpp:3014
void OMEaddToACL(OMEassoc &result, const OMEstring &entity, uint_fast32_t defaultPermission, const OMEassoc &methodList)
Definition: OMEobjACL.cpp:154
#define EINTR
Definition: tmp.o.cpp:93