/* * File: GroupClosedCausedByConnectionLost.cc * Author: jgaebler * * Created on January 19, 2012, 2:41 PM */ #include "GroupClosedCausedByConnectionLostTimer.h" #include "Moversight.h" #include "MobilitySupport.h" namespace ubeeme { namespace moversight { /** * @brief Constructor * @param aMob A reference to the mobility support service. */ GroupClosedCausedByConnectionLostTimer::GroupClosedCausedByConnectionLostTimer(MoversightService & aMob) : MoversightTimer(aMob) { #if OMNETPP setName("GroupClosedCausedByConnectionLostTimer"); #endif setNumberOfRetries(MOB_NUMBER_OF_MAX_RETRIES); setTimeout(GenericTime(GROUP_CLOSED_CAUSED_BY_CONNECTION_LOST_TIMEOUT)); } /** * @brief Copy constructor * @param orig The instance to copy */ GroupClosedCausedByConnectionLostTimer::GroupClosedCausedByConnectionLostTimer(const GroupClosedCausedByConnectionLostTimer & orig):MoversightTimer(orig){ operator =(orig); } /** * @brief Destructor */ GroupClosedCausedByConnectionLostTimer::~GroupClosedCausedByConnectionLostTimer() { } /** * @brief Duplicates the current timer. * @return A copy of the current timer. */ GroupClosedCausedByConnectionLostTimer * GroupClosedCausedByConnectionLostTimer::dup() { return new GroupClosedCausedByConnectionLostTimer(*this); } GroupClosedCausedByConnectionLostTimer & GroupClosedCausedByConnectionLostTimer::operator =(const GroupClosedCausedByConnectionLostTimer& other){ if (this == &other) return *this; MoversightTimer::operator =(other); return *this; } /** * @brief If the timer is fired, this method is called and the timer * handled. */ void GroupClosedCausedByConnectionLostTimer::timeout(){ dynamic_cast(service).handleGroupClosedCausedByConnectionLost(this); } } }