/* * (c) Copyright, Real-Time Innovations, 2002-2024. * All rights reserved. * * No duplications, whole or partial, manual or electronic, may be made * without express written permission. Any such copies, or * revisions thereof, must display this notice unaltered. * This code contains trade secrets of Real-Time Innovations, Inc. */ #ifndef event_log_h #define event_log_h #ifndef log_common_h #include "log/log_common.h" #endif #ifndef event_dll_h #include "event/event_dll.h" #endif #ifdef __cplusplus extern "C" { #endif /*e \defgroup RTIEventModule RTIEvent \ingroup RTI \brief Provides framework for periodic or one-shot events. More descriptive name for this module would be RTITimedEvent, as this does not provide a more generic event mechanism seen in Win32 for example, but focuses exclusively on . One might consider reception of a network message to be an event, but since NDDS is a network middleware, message reception takes on a more prominent role, and is given its own module, RTINetio. The basis of timed event is the timer (aka alarm) service, on top of which you can put a array of future events, to create the timed event generator service that has a dedicated event thread serving it. In fact, you can dedicate a thread for any object that needs to be serviced every once in while, such as the REDADatabase, which requires periodic garbage collection. And that's precisely what we've done here, by offering RTIEventActiveDatabase that makes an active object out of the REDADatabase. @see RTIEventTimer RTIEventGenerator RTIEventActiveDatabase */ /*e \defgroup RTIEventLogClass RTIEventLog \ingroup RTIEventModule \brief integrated logging NOTE: When a new submodule is added to event, it must be given a number and entered here. Because of the use of this id for logging, there are 16 submodule id's: 0x1000, 0x2000,... ..., 0xF000. It is suggested we put the modules here in an order that respects their dependencies: modules with a lower number cannot depend on modules with a higher number. */ #define SUBMODULE_EVENT_TIMER_POLLED (0x1000) #define SUBMODULE_EVENT_TIMER_SMART (0x2000) #define SUBMODULE_EVENT_TIMER_GENERATOR (0x3000) #define SUBMODULE_EVENT_TIMER_PASSIVE_GENERATOR (0x4000) #define SUBMODULE_EVENT_TIMER_ACTIVE_GENERATOR (0x5000) #define SUBMODULE_EVENT_TIMER_ACTIVE_DATABASE (0x6000) #define SUBMODULE_EVENT_TIMER_JOB_DISPATCHER (0x7000) /*e \ingroup RTIEventLogClass \brief Turn off this bit if you don't want log coming from RTIEventPolledTimer. @see RTIEventPolledTimer */ #define RTI_EVENT_SUBMODULE_MASK_POLLED_TIMER (0x0001) /*e \ingroup RTIEventLogClass \brief Turn off this bit if you don't want log coming from RTIEventSmartTimer. @see RTIEventSmartTimer */ #define RTI_EVENT_SUBMODULE_MASK_SMART_TIMER (0x0002) /*e \ingroup RTIEventLogClass \brief Turn off this bit if you don't want log coming from RTIEventGenerator, which is a superclass of both active and passive generators. @see RTIEventGenerator */ #define RTI_EVENT_SUBMODULE_MASK_GENERATOR (0x0004) /*e \ingroup RTIEventLogClass \brief Turn off this bit if you don't want log coming from RTIEventPassiveGenerator. @see RTIEventPassiveGenerator */ #define RTI_EVENT_SUBMODULE_MASK_PASSIVE_GENERATOR (0x0008) /*e \ingroup RTIEventLogClass \brief Turn off this bit if you don't want log coming from RTIEventActiveGenerator @see RTIEventActiveGenerator */ #define RTI_EVENT_SUBMODULE_MASK_ACTIVE_GENERATOR (0x0010) /*e \ingroup RTIEventLogClass \brief Turn off this bit if you don't want log coming from RTIEventActiveDatabase @see RTIEventActiveDatabase */ #define RTI_EVENT_SUBMODULE_MASK_ACTIVE_DATABASE (0x0020) /*e \ingroup RTIEventLogClass \brief Turn off this bit if you don't want log coming from RTIEventJobScheduler @see RTIEventJobScheduler */ #define RTI_EVENT_SUBMODULE_MASK_JOB_DISPATCHER (0x0040) /*e \ingroup RTIEventLogClass \brief Convenient way to say "log all submodules" */ #define RTI_EVENT_SUBMODULE_MASK_ALL RTI_LOG_SUBMODULE_MASK_ALL #ifdef __cplusplus } /* extern "C" */ #endif #endif /* event_log_h */