VR-Link API Documentation for HLA 1516
commentPdu.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2013 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtDIS
13 
14 #include "hostStructs.h"
15 #include "pduWithData.h"
16 #include <vlpi/idTypeMap.h>
17 
19 class DT_DLL_VL DtCommentPdu;
20 typedef DtCommentPdu DtCommentInteraction;
21 typedef DtCommentPdu DtMessagePdu;
22 
24 typedef void (*DtCommentPduCb)(DtCommentPdu *pdu, void *usr);
25 
29 class DT_DLL_VL DtCommentPdu : public DtPduWithData
30 {
31 
32 public:
33 
34  enum { PduStaticSize=32 };
35 
36 public:
38  DtCommentPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
39  DtCommentPdu(const DtNetCommentPdu *initial,
40  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0);
41  DtCommentPdu(const DtEntityIdentifier &sender,
42  const DtEntityIdentifier &receiver,
43  const char *message,
45 
48  virtual void setComment(const char *message, int size);
49  virtual const char *comment() const;
50 
51 public:
54  static DtPdu *create(const DtNetPacket *initial,
55  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0);
56 
59  static void addCallback(DtExerciseConn *conn,
60  DtCommentPduCb cb, void *usr);
61  static void removeCallback(DtExerciseConn *conn,
62  DtCommentPduCb cb, void *usr);
63 
64 
65 protected:
67  DtPduKind internalGetPduKind() const;
68 
70  DtNetDataPduTail *dataSection() const;
71 };
72 
73 inline DtPduKind DtCommentPdu::internalGetPduKind() const
74 {
75  return DtCommentPduKind;
76 }
77 
78 #endif

Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)