BaseApplLayer.cc

00001 /* -*- mode:c++ -*- *******************************************************
00002  * file:        BaseApplLayer.cc
00003  *
00004  * author:      Daniel Willkomm
00005  *
00006  * copyright:   (C) 2004 Telecommunication Networks Group (TKN) at
00007  *              Technische Universitaet Berlin, Germany.
00008  *
00009  *              This program is free software; you can redistribute it
00010  *              and/or modify it under the terms of the GNU General Public
00011  *              License as published by the Free Software Foundation; either
00012  *              version 2 of the License, or (at your option) any later
00013  *              version.
00014  *              For further information see file COPYING
00015  *              in the top level directory
00016  ***************************************************************************
00017  * part of:     framework implementation developed by tkn
00018  * description: application layer: general class for the application layer
00019  *              subclass to create your own application layer
00020  ***************************************************************************/
00021 
00022 
00023 #include "BaseApplLayer.h"
00024 #include "PassedMessage.h"
00025 
00033 void BaseApplLayer::initialize(int stage)
00034 {
00035     BaseLayer::initialize(stage);
00036     if(stage==0){
00037         headerLength= par("headerLength");
00038     }
00039 }
00040 
00044 void BaseApplLayer::sendDelayedDown(cMessage *msg, simtime_t delay) {
00045     recordPacket(PassedMessage::OUTGOING, PassedMessage::LOWER_DATA, msg);
00046     sendDelayed(msg, delay, lowerGateOut);
00047 }