/***************************************************************************************
*	This software simulated for ARPEES, a routing protocol for Wireless Sensor Network *
*	Copyright (C) 2007 by Tran Quang Vinh (vinhtq@mail.hut.edu.vn)                     *
*	Multimedia Information NETwork Lab - MINET                                         *
*	Dept. Electronic Information Systems, Graduate School of Enginnering               *
*	Shibaura Institute of Technology, Japan.                                           *
*--------------------------------------------------------------------------------------*
*	File name: NodeModul.cpp										                   *
*	Base Node Modul class for node and base station in the network			           *
***************************************************************************************/

#include <stdio.h>
#include <string.h>

#include <omnetpp.h>
#include "NodeModul.h"
#include "MessageType_m.h"

void NodeBase::updateStats()
{
    this->numberMsgs++;
}

void NodeBase::initStats()
{
    this->numberMsgs = 0;
    this->numberData = 0;
}

void NodeBase::finish()
{
//#if 0
    ev << "NodeBase:finish() was called \n";
	ev << "finished node id: ";
    ev << this->myId;
    ev << " numberMsgs: ";
    ev << this->numberMsgs;
    ev << "    numberData ";
    ev << this->numberData;
    ev << "\n";
//#endif

//#if 0
    recordScalar("numberMsgs", this->numberMsgs);
    recordScalar("numberData", this->numberData);
//#endif
}
/**************************************************************************************/
