VR-Link API Documentation for DIS
commentPdu.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 #ifndef DtCommentPdu_H_
00007 #define DtCommentPdu_H_
00008 
00009 
00010 
00011 
00012 #if DtDIS
00013 
00014 #include "hostStructs.h"
00015 #include "pduWithData.h"
00016 #include <vlpi/datumIdType.h>
00017 
00018 class DT_DLL_VL DtExerciseConn;
00019 class DT_DLL_VL DtCommentPdu;
00020 typedef DtCommentPdu DtCommentInteraction;
00021 typedef DtCommentPdu DtMessagePdu;
00022 
00024 typedef void (*DtCommentPduCb)(DtCommentPdu *pdu, void *usr);
00025 
00029 class DT_DLL_VL DtCommentPdu : public DtPduWithData
00030 {
00031 
00032 public:
00033 
00034    enum { PduStaticSize=32 };
00035 
00036 public:
00038    DtCommentPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00039    DtCommentPdu(const DtNetCommentPdu *initial, 
00040                 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00041    DtCommentPdu(const DtEntityIdentifier &sender,
00042                 const DtEntityIdentifier &receiver,
00043                 const char *message,
00044                 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00045 
00048    virtual void setComment(const char *message, int size);
00049    virtual const char *comment() const;
00050 
00051 public:
00054    static DtPdu *create(const DtNetPacket *initial, 
00055                         DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);    
00056 
00059    static void addCallback(DtExerciseConn *conn, 
00060                            DtCommentPduCb cb, void *usr);
00061    static void removeCallback(DtExerciseConn *conn, 
00062                               DtCommentPduCb cb, void *usr);
00063 
00064 
00065 protected:
00067    DtPduKind internalGetPduKind() const;
00068 
00070    DtNetDataPduTail *dataSection() const;
00071 }; 
00072 
00073 inline DtPduKind DtCommentPdu::internalGetPduKind() const 
00074 { 
00075    return DtCommentPduKind; 
00076 }
00077 
00078 #endif
00079 #endif
00080 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)