![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2006 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: multicastSubscriptionProcessor.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 *******************************************************************************/ 00008 #ifndef DtMulticastSubscriptionProcessor_H_ 00009 #define DtMulticastSubscriptionProcessor_H_ 00010 00011 #include "multicastListenDropFilter.h" 00012 #include "rtiMsConfig.h" 00013 #include <map> 00014 00020 00021 class DT_DLL_FORWARDER DtMulticastSubscriptionProcessor 00022 { 00023 private: 00025 DtMulticastSubscriptionProcessor(); 00026 00027 public: 00029 DtMulticastSubscriptionProcessor( DtBoost::shared_ptr<DtForwarderNode> parent ); 00030 00032 virtual ~DtMulticastSubscriptionProcessor(); 00033 00035 bool listenToMulticastGroup( const DtInetAddrAndPort& src, const DtNetMulticastConfigureMsg* msg ); 00036 00038 bool dropMulticastGroup( const DtInetAddrAndPort& src, const DtNetMulticastConfigureMsg* msg ); 00039 00042 bool processDestinationList( const DtInetAddrAndPort& src, 00043 DtForwarderPort::DtAddressPortList& destinations ); 00044 00045 public: 00046 00048 static void setMaxFederates( unsigned int maxFederates ); 00049 unsigned int maxFederates() const; 00050 00052 #if (0) 00053 00054 static void lostConnection( const MAKRti::DtInetAddr& addr, void* usr ); 00055 #endif 00056 00057 protected: 00059 #if (0) 00060 00061 virtual void lostConnection( const MAKRti::DtInetAddr& addr ); 00062 #endif 00063 00065 virtual bool forceDropMulticastGroup( const MAKRti::DtInetAddr& addr ); 00066 00068 unsigned long federateIndex( unsigned long federateHandle ) const; 00069 00070 protected: 00071 DtBoost::shared_ptr<DtForwarderNode> myParent; 00072 00074 static unsigned int theMaxFederates; 00075 00079 typedef std::map< unsigned long, MAKRti::DtInetAddr > DtIdToAddrMap; 00080 DtIdToAddrMap myFedIdToAddressMap; 00081 00086 typedef std::map< MAKRti::DtInetAddr, DtBitMask > DtAddrToIdMaskMap; 00087 DtAddrToIdMaskMap myAddressToFedIdsMap; 00088 00090 DtMulticastListenDropFilter<DtMulticastSubscriptionProcessor>* myListenDropFilter; 00091 00095 unsigned long myLastMulticastDropFedHdl; 00096 MAKRti::DtInetAddr myLastMulticastDropAddr; 00097 00101 00102 }; 00103 00104 #endif //! DtMulticastSubscriptionProcessor_H_