VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
soundPdu.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
11 #if DtDIS
12 
13 #include "hostStructs.h"
14 #include "interaction.h"
15 #include "packets/soundP.h"
16 #include <matrix/vlMath.h>
17 
20 
23 
24 typedef void (*DtSoundInteractionCb)(DtSoundInteraction *inter, void *usr);
25 
29 {
30 public:
31 
32  enum { PduStaticSize=sizeof(DtNetSoundPdu) };
33 
34 public:
35 
37 
38  DtSoundPdu(const DtNetSoundPdu *initial,
39  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0);
40 
41  DtSoundPdu(const DtEntityIdentifier &source,
42  const DtEntityType &soundType,
43  const DtVector& location,
44  const DtVector32& relativeLocation,
45  DtFloat32 decibelLevel,
47 
49  virtual ~DtSoundPdu();
50 
51  virtual const DtObjectId &sourceId() const;
52  virtual void setSourceId(const DtObjectId &id);
53 
54  virtual const DtEntityType &soundType() const;
55  virtual void setSoundType(const DtEntityType &type);
56 
57  virtual const DtVector& location() const;
58  virtual void setLocation(const DtVector& location);
59 
60  virtual const DtVector32& relativeLocation() const;
61  virtual void setRelativeLocation(const DtVector32& location);
62 
63  virtual DtFloat32 decibelLevel() const;
64  virtual void setDecibelLevel(DtFloat32 level);
65 
66  virtual void printData() const;
67  virtual void printDataToStream(std::ostream& stream) const;
68  virtual void printDataToString(DtString& str) const;
69 
70 public:
71 
72  static DtPdu *create(const DtNetPacket *initial,
73  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0);
74 
75  static void addCallback(DtExerciseConn *conn,
76  DtSoundInteractionCb cb, void *usr);
77  static void removeCallback(DtExerciseConn *conn,
78  DtSoundInteractionCb cb, void *usr);
79 
80 protected:
81 
88 };
89 
90 #endif
DtInteraction is an base class for representing DIS PDUs which don&#39;t have state.
Definition: interactionDIS.h:24
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:63
Instances of DtSoundInteraction are used to represent acoustic emissions.
Definition: soundPdu.h:28
#define DT_DLL_VL
Definition: vlMachineTypes.h:120
Definition: pduHeader.h:14
class DtPduFactory:
Definition: pduFactory.h:38
DtSoundPdu DtSoundInteraction
Instances of DtSoundInteraction are used to represent acoustic emissions.
Definition: soundPdu.h:19
Definition: disEnums.h:325
DtVector loc
Definition: soundPdu.h:85
DtPduKind internalGetPduKind() const
Returns the PDU kind associated with the derived PDU class.
Definition: soundPdu.h:82
virtual void printDataToStream(std::ostream &stream) const
DtObjectId src
Definition: soundPdu.h:83
This file defines math constants and methods which may be useful in simulations.
This file is used as a convenience to group interaction concepts together.
Definition: vlVector.h:224
DtPdu is the base class for all PDU&#39;s in VR-Link.
Definition: pdu.h:69
Definition: vlVector.h:162
virtual void printDataToString(DtString &str) const
DtFloat32 myDecibelLevel
Definition: soundPdu.h:87
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
virtual void printData() const
Print the PDU&#39;s data (not including header).
Definition: soundP.h:16
This file is deprecated - Please see simulationAddress.h, entityIdentifier.h, entityType.h, burstDescriptor.h, and NetStructs.h.
struct DtBufferPlaceHolder * DtBufferPtr
Definition: vlBaseMsg.h:17
#define DtUSE_INTERNAL_BUFFER
Definition: vlBaseMsg.h:22
This file declares the class DtNetSoundPdu.
void(* DtSoundInteractionCb)(DtSoundInteraction *inter, void *usr)
Definition: soundPdu.h:24
DtPduKind
([UID 4]) - PDU Type
Definition: disEnums.h:238
Instances of DtString are used to represent strings.
Definition: vlString.h:38
DtVector32 relLoc
Definition: soundPdu.h:86
DtEntityType mySoundType
Definition: soundPdu.h:84
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26
struct DtNetSoundPdu DtNetSoundPdu

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)