/* * Copyright (c) 2025 Real-Time Innovations, Inc. 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 commend_passiveFacade_h #define commend_passiveFacade_h #ifndef mig_generator_h #include "mig/mig_generator.h" #endif #ifndef commend_dll_h #include "commend/commend_dll.h" #endif #ifndef commend_facade_h #include "commend/commend_facade.h" #endif #ifdef __cplusplus extern "C" { #endif struct RTINetioConfigurator; /* Doxygen file-level documentation =====================================*/ /*e \file \brief COMMENDPassiveFacade interface */ struct COMMENDPassiveFacade; /*e \ingroup COMMENDPassiveFacadeClass * @brief Wake up any active objects so that all created threads (e.g., an * active database thread) will terminate. If you don't have any active * objects, you may forgo this function and simply call * COMMENDPassiveFacade_delete. */ extern COMMENDDllExport RTIBool COMMENDPassiveFacade_preShutdownWakeup( struct COMMENDFacade *me, struct REDAWorker *worker); extern COMMENDDllExport void COMMENDPassiveFacade_delete( struct COMMENDFacade *me, struct REDAWorker *worker); extern COMMENDDllExport struct COMMENDFacade *COMMENDPassiveFacade_new( struct REDAWorkerFactory *workerFactory, struct REDADatabase *database, struct REDAExclusiveArea *tableEa, struct RTIClock *clock, struct RTIClock *timestampClock, const struct COMMENDFacadeProperty *property, struct RTINetioConfigurator *configuratorIn, struct REDAWorker *worker); /*e \ingroup COMMENDPassiveFacadeClass * Get a message from an entryport and process the received message. * The higher layer callbacks are executed within this method. * * @pre enabled, and not used any more * @note non-blocking * @mtsafety multiWorkerSafe */ extern COMMENDDllExport RTIBool COMMENDPassiveFacade_processMessage( struct COMMENDPassiveFacade *me, struct REDABuffer *buffer, struct REDAWorker *worker); /*e \ingroup COMMENDPassiveFacadeClass * Check the posted events to see if any fired, and call the registered * listener for the expired events. * * @note non-blocking * * @mtsafety oneThreadAtATime */ extern COMMENDDllExport RTIBool COMMENDPassiveFacade_fireAllEvents( struct COMMENDPassiveFacade *me, struct REDAWorker *worker); /* * Check the posted events to see if any fired, and call the registered * listener for the expired events. We will ONLY fire at max eventsToFire * events. Should use COMMENDPassiveFacade_fireAllEvents in normal situations, * this parameter is only used for testing. * * @param me Pointer to facade * @param eventsToFire Maximum number of events to fire. If -1 can fire * unlimited events. * @param worker Pointer to worker * * @return RTI_TRUE if success, RTI_FALSE if error. */ extern COMMENDDllExport RTIBool COMMENDPassiveFacade_fireEventWithParams( struct COMMENDPassiveFacade *me, int eventsToFire, struct REDAWorker *worker); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* commend_passiveFacade_h */