VR-Engage  2.2
Loading...
Searching...
No Matches
vreVrfPlugin.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreVrfPlugin.h
7//! \ingroup vreVrfSimProtocolDependentPlugin
8//! \brief Main entry point for the VREngage protocol-dependent simulation plugin
9//!
10//! This file defines the initialization, post-initialization, and unload functions
11//! for the VREngage protocol-dependent simulation plugin, which extends the base VRF
12//! simulation with protocol-specific (DIS or HLA) functionality for VREngage.
13
14#pragma once
16
17//! \brief Protocol-specific namespace and identifier definitions
18//!
19//! Defines the appropriate protocol namespace and protocol identifier based on
20//! which protocol variant (DIS or HLA1516e) is being built. These definitions
21//! determine the actual namespace for the plugin functions and are used to identify
22//! the protocol being used throughout the code.
23#if defined(DtDIS)
24 //! \brief Namespace for DIS protocol variant
25 #define VRE_VRF_PROTOCOL_NAMESPACE DtVreVrfSimPluginDIS
26 //! \brief Protocol identifier string for DIS
27 #define VRE_VRF_PROTOCOL "DIS"
28#elif defined(DtHLA)
29 #if defined(DtHLA_1516)
30 #if defined(DtHLA_4)
31 //! \brief Protocol identifier string for HLA4
32 #define VRE_VRF_PROTOCOL_NAMESPACE DtVreVrfSimPluginHLA4
33 //! \brief Protocol identifier string for HLA4
34 #define VRE_VRF_PROTOCOL "HLA4"
35 #elif defined(DtHLA_1516_EVOLVED)
36 //! \brief Namespace for HLA1516e protocol variant
37 #define VRE_VRF_PROTOCOL_NAMESPACE DtVreVrfSimPluginHLA1516e
38 //! \brief Protocol identifier string for HLA1516e
39 #define VRE_VRF_PROTOCOL "HLA1516e"
40 #else
41 #define VRE_VRF_PROTOCOL_NAMESPACE DtVreVrfSimPluginHLA1516
42 #define VRE_VRF_PROTOCOL "HLA1516"
43 #endif
44 #else
45 #define VRE_VRF_PROTOCOL_NAMESPACE DtVreVrfSimPluginHLA13
46 #define VRE_VRF_PROTOCOL "HLA13"
47 #endif
48#endif
49
50#include <vrfutil/vrfPluginInformation.h>
51
52class DtCgf;
53
54namespace makVre
55{
56//! \brief Namespace containing functions for the VREngage protocol-dependent simulation plugin
57//!
58//! This namespace contains functions to initialize, post-initialize, and unload
59//! the VREngage protocol-dependent simulation plugin, as well as provide information
60//! about the plugin. The actual namespace (DtVreVrfSimPluginDIS or DtVreVrfSimPluginHLA1516e)
61//! is determined by the protocol-specific configuration.
63{
64//! \brief Initializes the VREngage protocol-dependent simulation plugin
65//! \param cgf Pointer to the CGF (Computer Generated Forces) engine
66//! \return True if initialization was successful, false otherwise
67//!
68//! This function is called during the plugin initialization phase. It registers
69//! protocol-specific simulation components, network interfaces, and message handlers
70//! with the CGF engine for the appropriate protocol (DIS or HLA).
72
73//! \brief Performs post-initialization tasks for the protocol-dependent plugin
74//! \param cgf Pointer to the CGF (Computer Generated Forces) engine
75//! \return True if post-initialization was successful, false otherwise
76//!
77//! This function is called after all plugins have been initialized. It performs
78//! protocol-specific tasks that depend on other plugins being already initialized,
79//! such as establishing connections between protocol handlers and simulation components.
81
82//! \brief Unloads the VREngage protocol-dependent simulation plugin
83//! \param cgf Pointer to the CGF (Computer Generated Forces) engine
84//!
85//! This function is called when the plugin is being unloaded. It unregisters
86//! protocol-specific components and performs cleanup of any resources allocated
87//! during initialization and operation for the particular protocol variant.
89
90//! \brief Provides information about the protocol-dependent simulation plugin
91//! \param info Reference to a structure to be filled with plugin information
92//!
93//! This function fills the provided structure with information about the
94//! VREngage protocol-dependent simulation plugin, including its name, version,
95//! dependencies, and protocol-specific capabilities.
97} // namespace VRE_VRF_PROTOCOL_NAMESPACE
98} // namespace makVre
Export macros for the VREngage Protocol-Dependent Simulation Plugin library.
#define VREVRFSIMPROTOCOLDEPENDENTPLUGIN_DLL
Platform-specific DLL export/import declaration.
Definition export.h:28
Namespace containing functions for the VREngage protocol-dependent simulation plugin.
Definition vreVrfPlugin.h:63
VREVRFSIMPROTOCOLDEPENDENTPLUGIN_DLL bool DtPostInitializeVreVrfPlugin(DtCgf *cgf)
Performs post-initialization tasks for the protocol-dependent plugin.
VREVRFSIMPROTOCOLDEPENDENTPLUGIN_DLL void DtUnloadVreVrfPlugin(DtCgf *cgf)
Unloads the VREngage protocol-dependent simulation plugin.
VREVRFSIMPROTOCOLDEPENDENTPLUGIN_DLL bool DtInitializeVreVrfPlugin(DtCgf *cgf)
Initializes the VREngage protocol-dependent simulation plugin.
VREVRFSIMPROTOCOLDEPENDENTPLUGIN_DLL void DtVreVrfPluginInformation(DtVrfPluginInformation &info)
Provides information about the protocol-dependent simulation plugin.
Include export definitions for this library.
Definition glsVreMessageUtil.h:49