51 typedef DtPdu* (*DtPduInterceptFcn)(
DtPdu* pdu,
int *retCode);
66 typedef int (*DtPredicate)(
DtPdu *pdu,
void *arg);
70 DtNET_READ_SUCCESS =0,
71 DtNET_READ_NO_PACKETS =1,
72 DtNET_READ_BAD_PACKET =2,
73 DtNET_READ_SERVER_MSG =3,
74 DtNET_READ_SIZE_MISMATCH =4
78 DtPROCESS_PDU_SUCCESS =0,
79 DtPROCESS_PDU_WRONG_EXID =5,
80 DtPROCESS_PDU_NO_PDU =6,
81 DtNET_READ_FILTERED_PACKET =7
94 DtCOULD_NOT_CREATE_SOCKET =1
110 int site_id,
int application_num,
111 InitializationStatus* status = 0,
bool use_async_io =
false,
112 bool useIpv6 =
false,
bool suppressSelfReflect =
false);
117 int site_id,
int application_num, InitializationStatus* status = 0,
118 bool use_async_io =
false,
bool suppressSelfReflect =
false);
123 int site_id,
int application_num, InitializationStatus* status = 0);
163 virtual int drainInput(
DtTime timeout=-1,
int nReadPerTimeCheck=100);
167 virtual int readAndProcess(
void);
172 virtual int processPdu(
DtPdu *pdu);
178 virtual DtPdu *netRead(
int *retCode = 0);
185 virtual void addInterestInPduKind(
DtPduKind kind);
192 virtual void subtractInterestInPduKind(
DtPduKind kind);
198 virtual DtPduKind readUntil(DtPredicate predicate,
void *arg,
203 virtual void addInterestInMcastAddr(
const DtInetAddr& addr);
207 virtual void subtractInterestInMcastAddr(
const DtInetAddr& addr);
246 virtual bool addDestination(
const DtInetAddr& destination,
DtU16 port=0);
254 virtual bool removeDestination(
const DtInetAddr& destination,
DtU16 port=0);
257 virtual void setExerciseId(
int exercise_id);
305 virtual void enableFiltering();
308 virtual void disableFiltering();
319 virtual void setTimeStampType(
int relOrAbs);
332 void setRelativeTimeRatio(
float ratio);
333 float relativeTimeRatio();
357 virtual DtTime currentTimeForStamping();
360 void init0(
int port,
int exerId,
int siteId,
int applNum,
362 bool suppressSelfReflect);
365 void init0(
DtInetSocket* s,
int exerId,
int siteId,
int applNum,
368 virtual void setRemoteEndpoint(
const DtInetAddr& addr,
int port );
375 bool useAsyncIo,
DtInetDevice* device,
bool suppressSelfReflect);
384 void zeroPduInterestList();
417 bool suppressSelfReflect)
423 , myEndpointReceivedFrom()
424 , myOwnershipHandler(0)
425 , myPduInterceptor(0)
429 init0(po, ex, si, ap, status, use_async_io, useIpv6, suppressSelfReflect);
440 , myEndpointReceivedFrom()
441 , myOwnershipHandler(0)
442 , myPduInterceptor(0)
446 init0(so, ex, si, ap, status);
DtInteraction is an base class for representing DIS PDUs which don't have state.
Definition: interactionDIS.h:24
This file contains the declaration of the DtInetSocket base class.
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
DtInetEndpoint myRemoteEndpoint
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:401
DtDisObjectManager * myDisObjectManager
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:396
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
Instances of DtExerciseConnInitializer are used to provide the DtExerciseConn with initialization dat...
Definition: exerciseConnInitializerDIS.h:36
bool filtering
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:386
A DIS Exercise connection will create an instance of this class which allows state repository extensi...
Definition: stateRepositoryExtensionDecoderFactory.h:23
DtBaseExerciseConn & operator=(const DtBaseExerciseConn &)
Assignment Operator – Not Implemented.
std::vector< DtInetBuffer * > DtInetBufferChain
Socket state enumeration.
Definition: vlInetSocket.h:105
DtPduFactory * myPduFact
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:388
virtual DtInetSocket * socket()
Returns the current DtDisSocket that we are using for communication.
Definition: exerciseConnDIS.h:497
class DtIffPduCallbackManager:
Definition: iffPduCallbackManager.h:30
Definition: vlTimeStampType.h:18
No error, call was sucessful.
Definition: exerciseConnDIS.h:70
The DtInetSocket class provides a protocol independant, address family independant base class for TCP...
Definition: vlInetSocket.h:201
DtBaseExerciseConn is an abstract base class.
Definition: baseExerciseConn.h:31
DtPduInterceptFcn myPduInterceptor
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:398
This file declares macros which specify the VR-Link version.
DtPduEncoderFactory * myPduEncFact
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:390
DtTimeStampType myRelOrAbs
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:395
class DtPduFactory:
Definition: pduFactory.h:38
DtHashlist mcastAddrs
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:387
DtPdu *(* DtPduInterceptFcn)(DtPdu *pdu, int *retCode)
PDU intercept function signature.
Definition: exerciseConnDIS.h:51
virtual DtDisObjectManager * disObjectManager()
Get the disObjectManager.
Definition: exerciseConnDIS.h:502
void init0(int port, int exerId, int siteId, int applNum, InitializationStatus *status, bool async_io, bool useIpv6, bool suppressSelfReflect)
Called by constructor.
virtual int processPdu(DtPdu *pdu)
Called by readAndProcess (which is called by drainInput).
This file contains the declaration of the DtInetEndpoint class.
float myRelativeTimeRatio
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:408
The DtInetEndpoint class provides a protocol independant, address family independent mechanism to rep...
Definition: vlInetEndpoint.h:33
Instances of DtPduEncoderFactory are used to create encoders which know how to encode a state reposit...
Definition: pduEncoderFactory.h:19
The DtDisSocket class provides an address family independent datagram socket.
Definition: vlDisSocket.h:75
static const int nSizeMismatchComplain
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:349
This file defines math constants and methods which may be useful in simulations.
DtInetEndpoint myEndpointReceivedFrom
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:405
virtual void sendStamped(const DtStateMsg &msg)=0
Send a state message to the network which has been time stamped with the current time.
virtual DtPduDecoderFactory * pduDecoderFactory()
Get the factory used to convert pdu information to the VR-Link State Repositories.
Definition: exerciseConnDIS.h:481
Defines DtHashlist and several helper functions.
Represents a IPv4 or IPv6 address.
Definition: vlInetAddr.h:36
Definition: vlAttributePduStrategy.h:19
DtAttributePduStrategy myAttributePduStrategy
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:411
DtInetBuffer myBuffer
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:403
DtEventID myCurrentEventId
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:394
virtual void send(const DtStateMsg &msg)=0
Send a state message to the network.
DtPdu is the base class for all PDU's in VR-Link.
Definition: pdu.h:69
const DtExerciseId DtAnyExercise
Used to indicate we are interested in all exercises.
Definition: exerciseConnDIS.h:48
InitializationStatus
InitializationStatus enumerates possible values to be returned by the ExerciseConns's optional 'statu...
Definition: exerciseConnDIS.h:92
DtStateRepositoryExtensionEncoderFactory * myStateRepoExtensionEncFac
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:392
std::vector< char > DtInetBuffer
Socket state enumeration.
Definition: vlInetSocket.h:104
DtAttributePduStrategy
Definition: vlAttributePduStrategy.h:16
const DtExerciseId DtMaxExerciseId
A total of 255 exercises can be supported.
Definition: exerciseConnDIS.h:46
DtInetBufferChain myBufferChain
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:402
Represents Events in DIS.
Definition: eventId.h:154
This file contains the declaration of the DtInetAddr class.
DtPduDecoderFactory * myPduDecFact
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:391
Definition: vlInetDevice.h:101
int availEventNum
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:379
DtInetSocket * mySocket
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:400
virtual DtExerciseId exerciseId() const
Get the current exercise ID.
Definition: exerciseConnDIS.h:464
virtual DtPdu * netRead(int *retCode=0)
Reads the network, users should seldom need to call this function.
DtPduCallbackManager myPduCbMgr
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:381
char * myPacketBuffer
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:404
int socket(int, int, int)
#define DtDEFAULT_SOCK_BUFF_SIZE
Definition: vlInet.h:69
DtExerciseConn(const DtExerciseConnInitializer &initial, InitializationStatus *status=0)
The preferred constructor.
virtual DtPduEncoderFactory * pduEncoderFactory()
Get the factory used to convert pdu information from the VR-Link State Repositories.
Definition: exerciseConnDIS.h:475
class DtPduCallbackManager:
Definition: pduCallbackManager.h:27
This file contains the declaration of the DtInetDevice class.
virtual DtStateRepositoryExtensionEncoderFactory * stateRepoExtensionEncoderFactory()
Get the factory used to convert information from the VR-Link State Repositories Extensions to attribu...
Definition: exerciseConnDIS.h:486
DtHashlist is deprecated and provided for backwards compatibility only.
Definition: vlHashlist.h:69
This is a base class meant to encapsulate user callbacks on ownership management services.
Definition: ownershipHandlerDIS.h:39
DtOwnershipHandler * myOwnershipHandler
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:397
unsigned short DtU16
A 16 bit unsigned integer value.
Definition: vlMachineTypes.h:140
Contains the standard DIS enumerations.
void(* DtPduCallbackFcn)(DtPdu *pdu, void *usr)
PDU callback function signature.
Definition: pduCallbackManager.h:19
Definition: vlAttributePduStrategy.h:20
DtStateRepositoryExtensionDecoderFactory * myStateRepoExtensionDecFac
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:393
virtual DtStateRepositoryExtensionDecoderFactory * stateRepoExtensionDecoderFactory()
Get the factory used to convert PDU attribute records to the VR-Link State Repositories Extensions...
Definition: exerciseConnDIS.h:491
DtTimeStampType
Definition: vlTimeStampType.h:16
int DtProtocolVersionToSend
Contains the DtEventId class declaration.
DtPduKind
([UID 4]) - PDU Type
Definition: disEnums.h:238
#define DtMAX_PDU_KINDS
Definition: pduCallbackManager.h:73
int nSizeMismatch
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:385
Instances of DtString are used to represent strings.
Definition: vlString.h:36
DtPduFactory * myDfltPduFact
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:389
DtExerciseId myExerciseId
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:378
This file provides a declaration of the class DtBaseExerciseConn.
virtual int readAndProcess(void)
Called by drainInput, so application code rarely needs to use this.
Definition: exerciseConnDIS.h:449
Instances of DtStateMsg are used to represent state data communicated via the network in a DIS (as op...
Definition: stateMsgDIS.h:21
Instances of DtPduDecoderFactory are used to create Decoders which know how to encode a state reposit...
Definition: pduDecoderFactory.h:18
int deleteSocket
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:380
DtIffInteractionType
Definition: disEnums.h:2160
DtIffPduCallbackManager myIffPduCbMgr
For VR-Link use only, should not be considered part of the public interface.
Definition: exerciseConnDIS.h:382
DtU16 DtExerciseId
Definition: baseExerciseConn.h:16
This file contains typedefs for machine dependant types.
virtual DtPduFactory * pduFactory()
Get the PDU factory used by netRead to create the right kind of derived DtPDU.
Definition: exerciseConnDIS.h:469
A DIS Exercise connection will create an instance of this class which allows state repository extensi...
Definition: stateRepositoryExtensionEncoderFactory.h:23
Instances of DtDisObjectManager are used to manage the set of DIS objects known to the federate...
Definition: disObjectManager.h:21