Alex Bikfalvi
SimStream Documentation
LayerIpMcast.h
00001 #pragma once 00002 00003 #include "Layer.h" 00004 #include "LayerIpMcastGroup.h" 00005 #include "LayerIpMcastMembership.h" 00006 #include "PacketIp.h" 00007 00008 class CLayerIpMcast : public CLayer 00009 { 00010 private: 00011 __uint32 numGroups; 00012 CLayerIpMcastGroup* groups; 00013 CLayerIpMcastMembership* memberships; 00014 00015 // Delegates 00016 Delegate2<CLayerIpMcast, void, __uint32, CPacketIp*>* delegateRecv; 00017 Delegate1<CLayerIpMcast, void, CPacketIp*>* delegateSend; 00018 00019 Delegate3<CLayerIpMcast, void, __uint32, CAddress, CLayerIpMcastGroup*>* delegateJoin; 00020 Delegate3<CLayerIpMcast, void, __uint32, CAddress, CLayerIpMcastGroup*>* delegateLeave; 00021 00022 Delegate2<CLayerIpMcast, void, __uint32, CAddress>* delegateLocalJoin; 00023 Delegate2<CLayerIpMcast, void, __uint32, CAddress>* delegateLocalLeave; 00024 00025 // Events 00026 Event2<void, __uint32, CPacketIp*>* eventRecv; 00027 Event2<void, __uint32, CPacketIp*>* eventSend; 00028 00029 public: 00030 CLayerIpMcast( 00031 CSimHandler* sim, 00032 __uint32 numGroups 00033 ); 00034 virtual ~CLayerIpMcast(); 00035 00036 inline IDelegate2<void, __uint32, CPacketIp*>* 00037 DelegateRecv() { return this->delegateRecv; } 00038 inline IDelegate1<void, CPacketIp*>* 00039 DelegateSend() { return this->delegateSend; } 00040 00041 inline IDelegate3<void, __uint32, CAddress, CLayerIpMcastGroup*>* 00042 DelegateJoin() { return this->delegateJoin; } 00043 inline IDelegate3<void, __uint32, CAddress, CLayerIpMcastGroup*>* 00044 DelegateLeave() { return this->delegateLeave; } 00045 00046 inline Delegate2<CLayerIpMcast, void, __uint32, CAddress>* 00047 DelegateLocalJoin() { return this->delegateLocalJoin; } 00048 inline Delegate2<CLayerIpMcast, void, __uint32, CAddress>* 00049 DelegateLocalLeave() { return this->delegateLocalLeave; } 00050 00051 inline Event2<void, __uint32, CPacketIp*>* 00052 EventRecv() { return this->eventRecv; } 00053 inline Event2<void, __uint32, CPacketIp*>* 00054 EventSend() { return this->eventSend; } 00055 00056 virtual void Finalize() { } 00057 00058 private: 00059 void Recv(__uint32 entry, CPacketIp* packet); 00060 void Send(CPacketIp* packet); 00061 00062 void Join(__uint32 entry, CAddress address, CLayerIpMcastGroup* groupSender); 00063 void Leave(__uint32 entry, CAddress address, CLayerIpMcastGroup* groupSender); 00064 00065 void LocalJoin(__uint32 entry, CAddress address); 00066 void LocalLeave(__uint32 entry, CAddress address); 00067 };
Last updated: February 8, 2011