WSF
WsfDisUtil.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11// ****************************************************************************
12// Updated by Infoscitex, a DCS Company.
13// ****************************************************************************
14
15#ifndef WSFDISUTIL_HPP
16#define WSFDISUTIL_HPP
17
18#include "wsf_export.h"
19
20#include <cstddef> // for size_t
21
22#include "UtMemory.hpp"
23
24class DisClockTime;
25class DisEntityId;
26class DisPdu;
27#include "DisTypes.hpp"
28class WsfDisInterface;
29class WsfDisPlatform;
30class WsfExtInterface;
31class WsfScenario;
32class WsfSimulation;
33
44namespace WsfDisUtil
45{
46WSF_EXPORT bool DebugEnabled(WsfDisInterface* aInterfacePtr);
47
48WSF_EXPORT WsfDisPlatform* FindDisPlatform(WsfDisInterface* aInterfacePtr, const DisEntityId& aEntityId);
49
50WSF_EXPORT WsfDisPlatform* GetDisPlatform(WsfDisInterface* aInterfacePtr, size_t aPlatformIndex);
51
52WSF_EXPORT void GetEntityIdFromIndex(WsfDisInterface* aInterfacePtr, size_t aPlatformIndex, DisEntityId& aEntityId);
53
55
56WSF_EXPORT DisUint32 GetNextRequestNumber(WsfDisInterface* aInterfacePtr);
57
58WSF_EXPORT DisUint8 GetReliabilityService(WsfDisInterface* aInterfacePtr);
59
61
63
64WSF_EXPORT double GetSimTime(WsfDisInterface* aInterfacePtr);
65
66WSF_EXPORT double GetTimeFromPdu(WsfDisInterface* aInterfacePtr, DisPdu& aPdu);
67
68WSF_EXPORT void PutPdu(WsfDisInterface* aInterfacePtr, double aSimTime, std::unique_ptr<DisPdu> aPduPtr);
69
70WSF_EXPORT void SimTimeToDisClockTime(double aSimTime, DisClockTime& aDisClockTime);
71
72// Used in WsfExchanges. Returns bool true if successful.
74 size_t aOriginatingIndex,
75 size_t aRequestingIndex,
76 size_t aRespondingIndex,
77 bool& aSenderIsRequestor,
78 bool& aSenderIsResponder,
79 bool& aRequestorIsLocal,
80 bool& aResponderIsLocal,
81 WsfDisPlatform*& aRequesterPtr,
82 WsfDisPlatform*& aResponderPtr,
83 DisEntityId& aOriginatingId,
84 DisEntityId& aRequestorId,
85 DisEntityId& aResponderId);
86
87// Returns bool true if resolving players was successful.
89 const DisEntityId& aOriginatingId,
90 const DisEntityId& aRequestorId,
91 const DisEntityId& aResponderId,
92 bool& aSenderIsRequestor,
93 bool& aSenderIsResponder,
94 bool& aRequestorIsLocal,
95 bool& aResponderIsLocal,
96 WsfDisPlatform*& aRequesterPtr,
97 WsfDisPlatform*& aResponderPtr,
98 size_t& aRequestingIndex,
99 size_t& aRespondingIndex);
100} // namespace WsfDisUtil
101
102#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfDisInterface.hpp:83
An internal class used by WsfDisInterface to maintain information about a platform.
Definition WsfDisPlatform.hpp:67
The WSF Ext is code which is shared between common external interfaces like DIS and HLA.
Definition WsfExtInterface.hpp:183
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfDisUtil.hpp:45
WSF_EXPORT void SimTimeToDisClockTime(double aSimTime, DisClockTime &aDisClockTime)
Definition WsfDisUtil.cpp:83
WSF_EXPORT const WsfScenario & GetScenario(WsfDisInterface *aInterfacePtr)
Definition WsfDisUtil.cpp:58
WSF_EXPORT bool DebugEnabled(WsfDisInterface *aInterfacePtr)
Definition WsfDisUtil.cpp:23
WSF_EXPORT WsfDisPlatform * FindDisPlatform(WsfDisInterface *aInterfacePtr, const DisEntityId &aEntityId)
Definition WsfDisUtil.cpp:28
WSF_EXPORT void PutPdu(WsfDisInterface *aInterfacePtr, double aSimTime, std::unique_ptr< DisPdu > aPduPtr)
Definition WsfDisUtil.cpp:78
WSF_EXPORT double GetTimeFromPdu(WsfDisInterface *aInterfacePtr, DisPdu &aPdu)
Definition WsfDisUtil.cpp:73
WSF_EXPORT WsfDisPlatform * GetDisPlatform(WsfDisInterface *aInterfacePtr, size_t aPlatformIndex)
Definition WsfDisUtil.cpp:33
WSF_EXPORT DisUint8 GetReliabilityService(WsfDisInterface *aInterfacePtr)
Definition WsfDisUtil.cpp:53
WSF_EXPORT DisUint32 GetNextRequestNumber(WsfDisInterface *aInterfacePtr)
Definition WsfDisUtil.cpp:48
WSF_EXPORT bool DisToWsfPlayers(WsfDisInterface *aInterfacePtr, const DisEntityId &aOriginatingId, const DisEntityId &aRequestorId, const DisEntityId &aResponderId, bool &aSenderIsRequestor, bool &aSenderIsResponder, bool &aRequestorIsLocal, bool &aResponderIsLocal, WsfDisPlatform *&aRequesterPtr, WsfDisPlatform *&aResponderPtr, size_t &aRequestingIndex, size_t &aRespondingIndex)
Definition WsfDisUtil.cpp:151
WSF_EXPORT WsfExtInterface * GetExtInterface(WsfDisInterface *aInterfacePtr)
Definition WsfDisUtil.cpp:43
WSF_EXPORT void GetEntityIdFromIndex(WsfDisInterface *aInterfacePtr, size_t aPlatformIndex, DisEntityId &aEntityId)
Definition WsfDisUtil.cpp:38
WSF_EXPORT WsfSimulation & GetSimulation(WsfDisInterface *aInterfacePtr)
Definition WsfDisUtil.cpp:63
WSF_EXPORT double GetSimTime(WsfDisInterface *aInterfacePtr)
Definition WsfDisUtil.cpp:68
WSF_EXPORT bool WsfToDisPlayers(WsfDisInterface *aInterfacePtr, size_t aOriginatingIndex, size_t aRequestingIndex, size_t aRespondingIndex, bool &aSenderIsRequestor, bool &aSenderIsResponder, bool &aRequestorIsLocal, bool &aResponderIsLocal, WsfDisPlatform *&aRequesterPtr, WsfDisPlatform *&aResponderPtr, DisEntityId &aOriginatingId, DisEntityId &aRequestorId, DisEntityId &aResponderId)
Definition WsfDisUtil.cpp:91
Copyrights Multiple, All Rights Reserved