MAK RTIspy API Documentation for HLA 1.3
assistantCommandMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2008 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: assistantCommandMsg.h,v $ $Revision: 1.2 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef assistantCommandMsg_H_
00013 #define assistantCommandMsg_H_
00014 
00017 
00018 #include "assistantMsg.h"
00019 #include "netAssistantCommandMsg.h"
00020 
00021 class DtAssistantCommandMsg;
00022 class DtRtiAssistantServer;
00023 class DtAssistantMsgQueue;
00024 
00025 typedef void (*DtAssistantCommandMsgCb)(const DtAssistantCommandMsg& inter, void* usr);
00026 
00027 
00028 
00032 class DT_DLL_ASSISTANT DtAssistantCommandMsg : public DtAssistantMsg
00033 {
00034 
00035 public:
00036 
00037    enum DtCommandEnum 
00038    { 
00039       DtDoNotCommand = 0, 
00040       DtRequestCommand, 
00041       DtForceCommand 
00042    };
00043    
00045    DtAssistantCommandMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00046 
00048    DtAssistantCommandMsg(const DtNetAssistantCommandMsg* netRep,
00049       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00050 
00051    DtAssistantCommandMsg(DtU8 commandType,
00052                          const MAKRti::DtString& messageString="",                         
00053                          const DtU8 assistantId=0,
00054                          const DtU16 fedexHandle=0,
00055                          const DtU16 fedHandle=0,
00056                          DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER );
00057 
00059    virtual ~DtAssistantCommandMsg();
00060 
00062    virtual DtAssistantMsg* clone(bool copy = true) const;
00063 
00065    virtual void setIsAssistantToAssistant(bool yesNo);
00066    virtual bool isAssistantToAssistant() const;
00067 
00069    virtual void setCommandType(DtU8 yesNo);
00070    virtual DtU8 commandType() const;
00071 
00073    virtual void printData() const;
00074 
00076    virtual int setMinSize( const MAKRti::DtString& text );
00077 
00079    virtual void setMessageString( const MAKRti::DtString& msgString );
00080    virtual MAKRti::DtString messageString() const;
00081 
00084    virtual void setTargetAssistantComponentId( const DtU8 assistantId );
00085    virtual DtU8 targetAssistantComponentId() const;
00086 
00089    virtual void setTargetFederationHandle( const DtU16 fedexHandle );
00090    virtual DtU16 targetFederationHandle() const;
00091 
00094    virtual void setTargetFederateHandle( const DtU16 fedHandle );
00095    virtual DtU16 targetFederateHandle() const;
00096 
00097 
00098 
00099 public:
00100 
00102    static DtAssistantMsg* create(const DtNetAssistantMsgHeader* initial,
00103       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00104 
00106    static DtAssistantMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00107 
00109    static void addCallback(DtRtiAssistantServer* conn,
00110       DtAssistantCommandMsgCb cb, void* usr);
00111    static void removeCallback(DtRtiAssistantServer* conn, 
00112       DtAssistantCommandMsgCb cb, void* usr);
00113    static void addCallback(DtAssistantMsgQueue* queue, 
00114       DtAssistantCommandMsgCb cb, void* usr);
00115    static void removeCallback(DtAssistantMsgQueue* queue, 
00116       DtAssistantCommandMsgCb cb, void* usr);
00117 
00118 protected:
00119 
00121    virtual DtNetAssistantCommandMsg* netAssistantCommandMsg();
00122    virtual const DtNetAssistantCommandMsg* netAssistantCommandMsg() const;
00123 
00125    virtual DtAssistantMsgKind internalMsgKind();
00126 
00128    virtual int minSize() const;
00129 
00130 
00132    virtual void setMessageStringSize( unsigned long size );
00133    virtual unsigned long messageStringSize() const;
00134 
00136    virtual const char* messageStringPtr() const;
00137    virtual char* messageStringPtr();
00138 
00139 };
00140 
00141 #endif

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)