VR-Link API Documentation for HLA Evolved
hAckInter.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 hAckInter_H_
00011 #define hAckInter_H_
00012 
00013 #if DtHLA 
00014 
00015 #include "hIntWEncDec.h"
00016 #include "hostStructs.h"
00017 #include <matrix/vlMath.h>
00018 
00019 
00020 
00021 class DT_DLL_VL DtExerciseConn;
00022 class DT_DLL_VL DtAcknowledgeInteraction;
00023 
00024 
00025 
00027 typedef void (*DtAcknowledgeInteractionCb) (DtAcknowledgeInteraction* inter, 
00028    void* usr);
00029 
00030 
00034 class DT_DLL_VL DtAcknowledgeInteraction : public DtInteractionWithEncDec
00035 {
00036 public:
00037 
00039    DtAcknowledgeInteraction();
00040 
00042    virtual ~DtAcknowledgeInteraction();
00043 
00045    DtAcknowledgeInteraction(const DtAcknowledgeInteraction& orig);
00046 
00048    DtAcknowledgeInteraction& operator=(const DtAcknowledgeInteraction& orig);
00049 
00051    virtual void printData() const;
00052 
00054    virtual void printDataToStream(std::ostream& stream) const;
00055 
00057    virtual void setSenderId(const DtEntityIdentifier& id);
00058    virtual const DtEntityIdentifier& senderId() const;
00059 
00061    virtual void setReceiverId(const DtEntityIdentifier& id);
00062    virtual const DtEntityIdentifier& receiverId() const;
00063 
00065    virtual void setAcknowledgeFlag(DtAcknowledgeFlag flag);
00066    virtual DtAcknowledgeFlag acknowledgeFlag() const;
00067 
00069    virtual void setResponseFlag(DtResponseFlag flag);
00070    virtual DtResponseFlag responseFlag() const;
00071 
00073    virtual void setRequestId(int id);
00074    virtual int requestId() const;
00075 
00077    virtual const char* name() const;
00078 
00079 public:
00080 
00083    static DtInteraction* create();
00084 
00087    static void addCallback(DtExerciseConn* conn,
00088       DtAcknowledgeInteractionCb cb, void* usr, DtDDMRegionSP region =
00089       DtDDMRegionSP());
00090    static void removeCallback(DtExerciseConn* conn,
00091       DtAcknowledgeInteractionCb cb, void* usr, DtDDMRegionSP region =
00092       DtDDMRegionSP());
00093 
00094 protected:
00095 
00096    DtEntityIdentifier myOrigEnt;
00097    DtEntityIdentifier myReceiveEnt;
00098    int myRequestId;
00099    DtAcknowledgeFlag myAckFlag;      
00100    DtResponseFlag myRespFlag;
00101 };
00102 
00103 #endif
00104 #endif
00105 

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)