VR-Link API Documentation for DIS
eventReptPdu.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 
00009 
00010 #ifndef DtEventReportPdu_H_
00011 #define DtEventReportPdu_H_
00012 
00013 #if DtDIS
00014 
00015 #include "hostStructs.h"
00016 #include "pduWithData.h"
00017 
00018 class DT_DLL_VL DtExerciseConn;
00019 
00020 class DT_DLL_VL DtEventReportPdu;
00021 typedef DtEventReportPdu DtEventReportInteraction;
00022 
00024 typedef void (*DtEventReportPduCb)(DtEventReportPdu *pdu, void *usr);
00025 
00029 class DT_DLL_VL DtEventReportPdu : public DtPduWithData
00030 {
00031 public:
00032 
00033    enum {  PduStaticSize=40};
00034 
00035 public:
00037    DtEventReportPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00038    DtEventReportPdu(const DtNetEventReportPdu *initial,
00039                     DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);    
00040 
00042    virtual ~DtEventReportPdu() {};
00043 
00045    virtual DtEventType eventType() const;
00046    virtual void setEventType(DtEventType type);
00047 
00049    virtual void printData() const;
00050 
00052    virtual void printDataToStream(std::ostream& stream) const;
00053 
00054 public: 
00057    static DtPdu *create(const DtNetPacket *initial, 
00058                         DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);    
00059 
00062    static void addCallback(DtExerciseConn *conn, 
00063                            DtEventReportPduCb cb, void *usr);
00064    static void removeCallback(DtExerciseConn *conn, 
00065                               DtEventReportPduCb cb, void *usr);
00066 protected:
00068    DtPduKind internalGetPduKind() const {return DtEventReportPduKind;}
00069 
00071    DtNetDataPduTail *dataSection() const;
00072 };
00073 
00074 
00075 #endif
00076 #endif
00077 

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)