VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtClientEventManagerTCP Class Reference

This class will open a TCP connection on a fixed port for local host only as an example of how to send VR-Forces Data Interactions (VR-Forces messages) over a TCP port instead of the exercise connection. More...

Inheritance diagram for DtClientEventManagerTCP:
Inheritance graph
[legend]

Public Member Functions

 DtClientEventManagerTCP ()
 CTOR. More...
 
virtual ~DtClientEventManagerTCP ()
 DTOR. More...
 
virtual bool connect ()
 Call to connect to the TCP network and to stop receiving data interactions from the network. More...
 
virtual void disconnect ()
 Call to disconnect from the network and start receiving exercise connection interactions again. More...
 
virtual bool hasNetworkConnection () const
 Return true if the TCP network is active. More...
 
virtual void tick ()
 Check to see if there is anything to receive. More...
 
- Public Member Functions inherited from DtEventManagerTCP
 DtEventManagerTCP ()
 CTOR. More...
 
virtual ~DtEventManagerTCP ()
 DTOR. More...
 
virtual bool selfReflecting (const DtEvent &) const
 Since data interactions are not self reflecting say they are not self reflecting so they will get sent on the network and added to the local queue for processing. More...
 
- Public Member Functions inherited from DtNetworkEventManager
 DtNetworkEventManager ()
 
virtual ~DtNetworkEventManager ()
 
virtual void addEvent (const DtEvent &)
 Will check to see if this is an interaction that needs to be also sent on the network as well as added internally. More...
 
DtExerciseConn * exerciseConnection () const
 
virtual void setExerciseConnection (DtExerciseConn *)
 Set the exercise connection to use for this class. More...
 
virtual const DtSimulationAddress & messageAddress () const
 Get the address that should be used as the sender for all messages originating from the backend. More...
 
virtual void setTransportTypeReliable (int contentType)
 Sets the transport type for the given content type to be reliable. More...
 
virtual void setTransportTypeBestEffort (int contentType)
 Sets the transport type for the given content type to be best-effort. More...
 
virtual bool sendReliable (const DtVrfTDLMessage &message) const
 Update the transportation type to be used based on the given message. More...
 
virtual bool sendReliable (const DtSimInterfaceMessage &message) const
 
virtual void setProcessNetworkEventsLocally (bool)
 Whether or not to process events that are sent over the network locally if the connection is not self reflecting. More...
 
bool processNetworkEventsLocally () const
 
virtual bool selfReflecting () const
 Wether or not an event added will be processed locally. Default is true. More...
 
- Public Member Functions inherited from DtEventManager
 DtEventManager ()
 
virtual ~DtEventManager ()
 
virtual void setProcessEventsImmediately (bool b)
 Whether or not to put the messages onto a tickable queue (false) or process them immediately (true). More...
 
bool processEventsImmediately () const
 
virtual void selfReflect (unsigned int i)
 Whether or not to self reflect the given VRF data interaction messages (default is to self reflect all messages) More...
 
virtual void doNotSelfReflect (unsigned int i)
 
EventSignalsignalForFireEvent ()
 Convenience functions. More...
 
EventSignalsignalForDetonationEvent ()
 
EventSignalsignalForSimInterfaceContentMessage ()
 
EventSignalsignalForDataInteraction ()
 
EventSignalsignalForSignalInteraction ()
 
EventSignalsignalForCommentInteraction ()
 
EventSignalsignalForSensorFieldOfViewControlEvent ()
 
EventSignalsignalForStartResumeInteraction ()
 
EventSignalsignalForStopFreezeInteraction ()
 
EventSignalsignalDiGuyActionEvent ()
 
EventSignalsignalForInfluenceInteraction ()
 
EventSignalsignalDiGuyEndActionEvent ()
 
virtual void addEvent (const DtDetonationInteraction &)
 Convenience functions. More...
 
virtual void addEvent (const DtFireInteraction &)
 
virtual void addEvent (const DtAcknowledgeInteraction &)
 
virtual void addEvent (const DtStopFreezeInteraction &)
 
virtual void addEvent (const DtStartResumeInteraction &)
 
virtual void addEvent (const DtDataInteraction &)
 
virtual void addEvent (const DtSignalInteraction &)
 
virtual void addEvent (const DtCommentInteraction &)
 
virtual void addEvent (const DtSensorFieldOfViewControlInter &)
 
virtual void addevent (const DtSimInterfaceContent &)
 
virtual void addEvent (const DtDataInteractionWithTransportType &)
 
virtual void addEvent (const DtInfluenceInteraction &)
 
virtual void addEvent (const DtEndGestureInter &)
 
virtual void addEvent (const DtExecuteGestureInter &)
 
virtual EventSignalsignalForEvent (DtEvent::EventType type)
 Returns a signal for a particular event type that you will use to connect/disconnect with in order to be notified of that event being received. More...
 

Static Public Member Functions

static DtEventManagercreator ()
 Static creator method. More...
 
- Static Public Member Functions inherited from DtNetworkEventManager
static DtEventManagercreator ()
 
- Static Public Member Functions inherited from DtEventManager
static void setEventManagerCreatorFcn (DtEventManagerCreatorFcn fcn)
 
static DtEventManagercreateEventManager ()
 

Protected Member Functions

virtual bool sendPacketOnNetwork (char *buffer, size_t length)
 Sends the given buffer packet on the network. More...
 
- Protected Member Functions inherited from DtEventManagerTCP
virtual bool sendNetworkEvent (const DtEvent &)
 This is the method that is used to send the message over the TCP socket. More...
 
virtual void processPdu (void *buffer, int size)
 
virtual bool pduHeader (DtNetPduHeader &, DtInetSocket *)
 If there is a net pdu header read it. More...
 
virtual bool processSocket (DtInetSocket *)
 Processes the socket, and, if there is an error, remove it. More...
 
virtual chargetPacketForNetwork (const DtDataInteraction *inter, size_t &length) const
 
virtual DtDataInteractioncreateDataInteraction (void *buffer, size_t size) const
 
virtual bool sendEventTCP (const DtEvent &e)
 
- Protected Member Functions inherited from DtNetworkEventManager
virtual void removeExerciseConnectionCallbacks ()
 
virtual void installExerciseConnectionCallbacks ()
 
virtual void processInfluence (DtInfluenceInteraction *)
 
virtual void processCommentInteraction (DtCommentInteraction *ctrlInter)
 
virtual void processFireCallback (DtFireInteraction *)
 
virtual void processGimbalControl (DtSensorFieldOfViewControlInter *ctrlInter)
 
virtual void processDetonationCallback (DtDetonationInteraction *)
 
virtual bool isNetworkEvent (const DtEvent &) const
 Returns true if this is to be sent on the network. More...
 
virtual void processNetMessage (DtDataInteraction *dataInter)
 
virtual void processSignalInteraction (DtSignalInteraction *dataInter)
 
virtual void initializeProtocolSpecific ()
 
- Protected Member Functions inherited from DtEventManager
virtual void postEvent (const DtEvent &)
 Puts the event into the queue. More...
 
virtual void processEvent (const DtEvent &)
 
virtual bool wantsToProcessEvent (const DtEvent &) const
 Return true to self reflect this VRF message (if it is one) More...
 

Protected Attributes

DtInetTcpSocket * mySocket
 
- Protected Attributes inherited from DtNetworkEventManager
DtExerciseConn * myExerciseConnection
 
bool myCallbacksInstalled
 
bool myDataCallbackInstalled
 
bool myProcessNetworkEventsLocally
 
bool myAllowReliableDataInteractions
 Whether reliable data interactions are supported. More...
 
std::set< intmyContentTypesToSendReliable
 Set of content types to be sent via reliable transport. More...
 
tbb::spin_rw_mutex myFedTimeMutex
 
- Protected Attributes inherited from DtEventManager
tbb::spin_mutex myMutex
 
std::vector< DtEvent * > myEvents
 
tbb::spin_mutex myCallbackMutex
 
EventCallbackMap myEventCallbackMap
 
bool myProcessEventsImmediately
 
std::set< unsigned intmyDoNotSelfReflect
 

Additional Inherited Members

- Public Types inherited from DtEventManager
typedef
boost::signals2::signal< void(const
DtEvent &)> 
EventSignal
 
- Public Attributes inherited from DtNetworkEventManager
boost::signals2::signal< void(const
DtEvent &)> 
signal_sendingEventOnNetwork
 
- Protected Types inherited from DtEventManager
typedef std::map
< DtEvent::EventType,
EventSignal * > 
EventCallbackMap
 
- Static Protected Member Functions inherited from DtNetworkEventManager
static void influenceCallback (DtInfluenceInteraction *, void *)
 
static chardataInteractionChooser (DtExerciseConn *exConn, const DtInteraction &inter)
 
static void commentInteractionCallback (DtCommentInteraction *inter, void *usr)
 
static void fireCallback (DtFireInteraction *, void *)
 
static void setGimbalControlCallback (DtSensorFieldOfViewControlInter *ctrlInter, void *usr)
 
static void detonationCallback (DtDetonationInteraction *, void *)
 
static void netMessageCallback (DtDataInteraction *dataInter, void *usr)
 
static void signalInteractionCallback (DtSignalInteraction *dataInter, void *usr)
 
- Static Protected Attributes inherited from DtEventManager
static DtEventManagerCreatorFcn theEventManagerCreatorFcn
 

Detailed Description

This class will open a TCP connection on a fixed port for local host only as an example of how to send VR-Forces Data Interactions (VR-Forces messages) over a TCP port instead of the exercise connection.

All other messages will be sent over the network protocol specific exercise connection

Constructor & Destructor Documentation

DtClientEventManagerTCP::DtClientEventManagerTCP ( )

CTOR.

virtual DtClientEventManagerTCP::~DtClientEventManagerTCP ( )
virtual

DTOR.

Member Function Documentation

static DtEventManager* DtClientEventManagerTCP::creator ( )
static

Static creator method.

virtual bool DtClientEventManagerTCP::connect ( )
virtual

Call to connect to the TCP network and to stop receiving data interactions from the network.

virtual void DtClientEventManagerTCP::disconnect ( )
virtual

Call to disconnect from the network and start receiving exercise connection interactions again.

virtual bool DtClientEventManagerTCP::hasNetworkConnection ( ) const
inlinevirtual

Return true if the TCP network is active.

Implements DtEventManagerTCP.

References mySocket.

virtual void DtClientEventManagerTCP::tick ( )
virtual

Check to see if there is anything to receive.

Reimplemented from DtEventManager.

virtual bool DtClientEventManagerTCP::sendPacketOnNetwork ( char buffer,
size_t  length 
)
protectedvirtual

Sends the given buffer packet on the network.

Implements DtEventManagerTCP.

Member Data Documentation

DtInetTcpSocket* DtClientEventManagerTCP::mySocket
protected

Referenced by hasNetworkConnection().


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)