15#ifndef WSFDISIO_THREAD_HPP
16#define WSFDISIO_THREAD_HPP
18#include "wsf_export.h"
26#include "UtWallClock.hpp"
48 FunctionType
DoWork()
override;
53 void ImmediatePutPdu(
double aSimTime, DisPdu* aPduPtr);
55 void PutPdu(
double aSimTime, std::unique_ptr<DisPdu> aPduPtr);
57 void SendPduOnDevices(
double aSimTime, DisPdu& aPdu);
59 void AdvanceTime(
double aSimTime);
60 void Initialize(
bool aAutostart);
62 void SimulationComplete();
63 void SimulationStarting();
66 void SetOutboundPDUs(
bool aSendOutboundPDUs) { mSendOutboundPDUs = aSendOutboundPDUs; }
68 void WaitForStartPDU(
bool aWaitForStartPDU) { mWaitForStartPDU = aWaitForStartPDU; }
71 void TransitionState();
73 void SendOutboundPDUs();
78 std::unique_ptr<DisPdu> mPduPtr;
84 std::recursive_mutex mIncomingMutex;
85 std::recursive_mutex mOutboundMutex;
87 WsfDisInterface* mInterfacePtr;
89 ThreadState mThreadState;
91 bool mSendOutboundPDUs;
94 std::list<DisPdu*> mIncomingPDUs;
95 std::list<PDU> mOutboundPDUs;
97 bool mWaitForStartPDU;
105 UtWallClock mWallClock;
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
DIS interface implementation of worker thread.
Definition WsfDisIO_Thread.hpp:32
ThreadState
Definition WsfDisIO_Thread.hpp:35
@ IDLE
Definition WsfDisIO_Thread.hpp:36
@ WORK_COMPLETE
Definition WsfDisIO_Thread.hpp:39
@ SEND_OUTBOUND
Definition WsfDisIO_Thread.hpp:37
@ RCV_INCOMING
Definition WsfDisIO_Thread.hpp:38
WsfDisIO_Thread(WsfDisInterface *aInterfacePtr)
Constructor and destructor.
Definition WsfDisIO_Thread.cpp:31
void WaitForStartPDU(bool aWaitForStartPDU)
Definition WsfDisIO_Thread.hpp:68
void SetReceivePDUs(bool aReceivePDUs)
Definition WsfDisIO_Thread.hpp:65
FunctionType Pause() override
Definition WsfDisIO_Thread.hpp:49
void SetOutboundPDUs(bool aSendOutboundPDUs)
Definition WsfDisIO_Thread.hpp:66
Definition WsfDisInterface.hpp:83
virtual FunctionType DoWork()=0
FunctionType
Definition WsfThread.hpp:26
@ AVAILABLE
Definition WsfThread.hpp:28