![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2005 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: smartForwardingProcessor.h,v $ $Revision: 1.5 $ $State: Exp $ 00007 *******************************************************************************/ 00010 00011 #ifndef DtSmartForwardingProcessor_H_ 00012 #define DtSmartForwardingProcessor_H_ 00013 00014 #include "federateJoinResignFilter.h" 00015 #include "updateInterDestinationFilter.h" 00016 #include "rtiMsConfig.h" 00017 #include <bitMask.h> 00018 #include <map> 00019 00024 class DT_DLL_FORWARDER DtSmartForwardingProcessor 00025 { 00026 private: 00028 DtSmartForwardingProcessor(); 00029 00031 DtSmartForwardingProcessor(const DtSmartForwardingProcessor &); 00032 00034 DtSmartForwardingProcessor& operator=(const DtSmartForwardingProcessor& orig); 00035 00036 00037 public: 00039 DtSmartForwardingProcessor( DtBoost::shared_ptr<DtForwarderNode> parent ); 00040 00042 virtual ~DtSmartForwardingProcessor(); 00043 00045 bool federateJoined( const DtInetAddrAndPort& src, const DtNetJoinConfirmMsg* msg ); 00046 00048 bool federateResigned( const DtInetAddrAndPort& src, const DtNetResignMsg* msg ); 00049 00053 bool processJoinResignDestinations( const DtInetAddrAndPort& src, 00054 DtForwarderPort::DtAddressPortList& destinations ); 00055 00059 bool filterUpdateInterDestinations( const DtInetAddrAndPort& src, 00060 caddr_t msg, DtForwarderPort::DtAddressPortList& destinations ); 00061 00062 public: 00063 00065 static int lostConnection( const MAKRti::DtString & connName, 00066 unsigned int connID, const DtInetAddrAndPort& connAddr, void* usr ); 00067 00068 protected: 00069 00071 virtual int lostConnection( const MAKRti::DtString & connName, 00072 unsigned int connID, const DtInetAddrAndPort& connAddr ); 00073 00074 protected: 00075 typedef std::map< unsigned long, DtInetAddrAndPort > DtIdToAddrMap; 00076 typedef std::map< DtInetAddrAndPort, DtBitMask > DtAddrToIdMaskMap; 00077 DtBoost::shared_ptr<DtForwarderNode> myParent; 00078 DtIdToAddrMap myFedIdToAddressMap; 00079 DtAddrToIdMaskMap myAddressToFedIdsMap; 00080 DtFederateJoinResignFilter<DtSmartForwardingProcessor>* myJoinResignFilter; 00081 DtUpdateInterDestinationFilter<DtSmartForwardingProcessor>* myUpdateInterFilter; 00082 00083 }; 00084 00085 #endif //! DtSmartForwardingProcessor_H_