WSF
WsfDisUDP_Device.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 WSFDISUDP_DEVICE_HPP
16#define WSFDISUDP_DEVICE_HPP
17
18#include "wsf_export.h"
19
20#include <string>
21
22#ifdef WSF_USE_UMP
23class GenUmpIO;
24#else
25class GenUDP_IO;
26#endif
27#include "dis/WsfDisDevice.hpp"
28
34
36{
37public:
38 WsfDisUDP_Device(WsfDisInterface* aInterfacePtr,
39 const std::string& aSendAddress,
40 unsigned int aPort,
41 unsigned int aRcvPort,
42 bool aRememberSenderHostname = false);
43
44 WsfDisUDP_Device(WsfDisInterface* aInterfacePtr,
45 const std::string& aMulticastAddress,
46 const std::string& aInterfaceAddress,
47 unsigned int aPort,
48 unsigned int aRcvPort,
49 int aTimeToLive = -1,
50 bool aRememberSenderHostname = false);
51
52 ~WsfDisUDP_Device() override;
53
54 DisPdu* GetPdu(DisPduFactory* aPduFactoryPtr) override;
55
56 void PutPduP(double aSimTime, DisPdu& aPdu) override;
57
58#ifdef WSF_USE_UMP
59 GenUmpIO* UmpIOPtr() { return mGenIOPtr; }
60#else
61 GenUDP_IO* GenUDP_IOPtr() override { return mGenIOPtr; }
62#endif
63
64private:
65#ifdef WSF_USE_UMP
66 GenUmpIO* mGenIOPtr;
67#else
68 GenUDP_IO* mGenIOPtr;
69#endif
70};
71
72#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
virtual void PutPduP(double, DisPdu &)=0
WsfDisDevice(WsfDisInterface *aInterfacePtr)
Definition WsfDisDevice.cpp:20
virtual DisPdu * GetPdu(DisPduFactory *aPduFactoryPtr)
Definition WsfDisDevice.cpp:29
Definition WsfDisInterface.hpp:83
WsfDisUDP_Device(WsfDisInterface *aInterfacePtr, const std::string &aSendAddress, unsigned int aPort, unsigned int aRcvPort, bool aRememberSenderHostname=false)
Create a device for performing network I/O using UDP broadcast.
Definition WsfDisUDP_Device.cpp:36
GenUDP_IO * GenUDP_IOPtr() override
Definition WsfDisUDP_Device.hpp:61
Copyrights Multiple, All Rights Reserved