Statistics in veins-lte

204 views
Skip to first unread message

wedt...@gmail.com

unread,
Oct 15, 2015, 8:20:53 AM10/15/15
to OMNeT++ Users
Hi,  

I want to collect end-to-end delay and packet delivery ratio statistics from the modified veins-lte.

In terms of end-to-end delay I have to add 
  1.  @signal[delay](type="float");

@statistic[delay](title="delay"; source="delay"; record=mean, sum, stats, vector);

in NED file.


Which NED file:



under the lines :

// signal informing interested application about channel busy state

@signal[sigChannelBusy](type=bool);

// signal informing interested application about a collision

@signal[sigCollision](type=bool);


then I should add


2.simsignal_t delaySignal;

 
to .h file 

(which .h file HeterogeneoustoLTE OR Mac1609_4.h or other)

  3. add delaySignal = registerSignal("delay");

to .cc (again which .cc file Mac1609_4.cc or HeterogeneoustoLTE)

4. add .cc emit(delaySignal, delay);



Can someone please direct me where to add the statistics under which .ned, .h, .cc files in the veins-lte.

And how to add the statistics for packet delivery ratio.

Regards
Tomas

Florian Hagenauer

unread,
Oct 15, 2015, 8:49:33 AM10/15/15
to omn...@googlegroups.com
Hi,

do you want to collect these statistics for 802.11p, for LTE or for both
interfaces?

Best,
Florian Hagenauer

On 2015-10-15 21:20, wedt...@gmail.com wrote:
> Hi,
>
> I want to collect end-to-end delay and packet delivery ratio statistics
> from the modified veins-lte.
>
> In terms of end-to-end delay I have to add
>
> 1. @signal[delay](type="float");
>
> |@statistic[delay](title="delay"; source="delay"; record=mean, sum,
> stats, vector);|
>
> in NED file.
>
>
> Which NED file:
>
>
>
> * my scenario ned file or
> * in Mac1609_4.ned
> <https://github.com/floxyz/veins-lte/blob/master/veins/src/veins/modules/mac/ieee80211p/Mac1609_4.ned> from
> the veins-lte <https://github.com/floxyz/veins-lte>/veins
> <https://github.com/floxyz/veins-lte/tree/master/veins>/src
> <https://github.com/floxyz/veins-lte/tree/master/veins/src>/veins
> <https://github.com/floxyz/veins-lte/tree/master/veins/src/veins>/modules
> <https://github.com/floxyz/veins-lte/tree/master/veins/src/veins/modules>/mac
> <https://github.com/floxyz/veins-lte/tree/master/veins/src/veins/modules/mac>/*ieee80211p*
>
> *under the lines :*
> *
> *
>
> // signal informing interested application about channel busy state
>
> @signal[sigChannelBusy](type=bool);
>
> // signal informing interested application about a collision
>
> @signal[sigCollision](type=bool);
>
>
> then I should add
>
>
> 2.simsignal_t delaySignal;
>
>
>
>
> to .hfile
>
> (which .h file HeterogeneoustoLTE OR Mac1609_4.h
> <https://github.com/floxyz/veins-lte/blob/master/veins/src/veins/modules/mac/ieee80211p/Mac1609_4.h> or
> other)
>
> 3. add |delaySignal = registerSignal("delay");|
>
> to .cc (again which .cc file Mac1609_4.cc
> <https://github.com/floxyz/veins-lte/blob/master/veins/src/veins/modules/mac/ieee80211p/Mac1609_4.cc> or HeterogeneoustoLTE)
>
> 4. add .cc emit(delaySignal, delay);
>
>
>
> Can someone please direct me where to add the statistics under which
> .ned, .h, .cc files in the veins-lte.
>
> And how to add the statistics for packet delivery ratio.
>
> Regards
> Tomas
>
> --
> You received this message because you are subscribed to the Google
> Groups "OMNeT++ Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to omnetpp+u...@googlegroups.com
> <mailto:omnetpp+u...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/omnetpp.
> For more options, visit https://groups.google.com/d/optout.

--
------------------------------------------------------------------------
Florian Hagenauer MSc

University of Paderborn
Department of Computer Science Room: F1 319
Fürstenallee 11 Email: hage...@ccs-labs.org
33102 Paderborn, Germany Web: http://ccs-labs.org/~hagenauer/
------------------------------------------------------------------------

wedt...@gmail.com

unread,
Oct 15, 2015, 9:12:00 AM10/15/15
to omn...@googlegroups.com, hage...@ccs-labs.org
Hi Florian,

In fact I want to collect them for both veins-lte (heterogeneous statistics802.11p - LTE) as well as for the  individual statistics of LTE and 802.11p

Thnks for your response.

Florian Hagenauer

unread,
Oct 15, 2015, 9:27:21 AM10/15/15
to wedt...@gmail.com, OMNeT++ Users
Hi,

one good opportunity is to add them to the DecisionMaker, found here
[1]. As you can see the DecisionMaker.ned already collects some statistics.

Best,
Florian Hagenauer

On 2015-10-15 22:12, wedt...@gmail.com wrote:
> Hi Florian,
>
> In fact I want to collect them for both veins-lte (heterogeneous
> statistics as well as for the individual statistics of lte and veins.
>
> Thnks for your response.
>
>
> Τη Πέμπτη, 15 Οκτωβρίου 2015 - 1:49:33 μ.μ. UTC+1, ο χρήστης Florian
> Hagenauer έγραψε:
>
> Hi,
>
> do you want to collect these statistics for 802.11p, for LTE or for
> both
> interfaces?
>
> Best,
> Florian Hagenauer
>
> > an email to omnetpp+u...@googlegroups.com <javascript:>
> > <mailto:omnetpp+u...@googlegroups.com <javascript:>>.
> <http://groups.google.com/group/omnetpp>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> ------------------------------------------------------------------------
>
> Florian Hagenauer MSc
>
> University of Paderborn
> Department of Computer Science Room: F1 319
> Fürstenallee 11 Email: hage...@ccs-labs.org
> <javascript:>
> 33102 Paderborn, Germany Web:
> http://ccs-labs.org/~hagenauer/ <http://ccs-labs.org/~hagenauer/>
> ------------------------------------------------------------------------

Florian Hagenauer

unread,
Oct 15, 2015, 9:27:26 AM10/15/15
to wedt...@gmail.com, OMNeT++ Users
Hi,

one good opportunity is to add them to the DecisionMaker, found here
[1]. As you can see the DecisionMaker.ned already collects some statistics.

Best,
Florian Hagenauer

[1]
https://github.com/floxyz/veins-lte/tree/master/veins/src/veins/modules/lte

On 2015-10-15 22:12, wedt...@gmail.com wrote:
> Hi Florian,
>
> In fact I want to collect them for both veins-lte (heterogeneous
> statistics as well as for the individual statistics of lte and veins.
>
> Thnks for your response.
>
>
> Τη Πέμπτη, 15 Οκτωβρίου 2015 - 1:49:33 μ.μ. UTC+1, ο χρήστης Florian
> Hagenauer έγραψε:
>
> Hi,
>
> do you want to collect these statistics for 802.11p, for LTE or for
> both
> interfaces?
>
> Best,
> Florian Hagenauer
>
> > an email to omnetpp+u...@googlegroups.com <javascript:>
> > <mailto:omnetpp+u...@googlegroups.com <javascript:>>.
> <http://groups.google.com/group/omnetpp>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> ------------------------------------------------------------------------
>
> Florian Hagenauer MSc
>
> University of Paderborn
> Department of Computer Science Room: F1 319
> Fürstenallee 11 Email: hage...@ccs-labs.org
> <javascript:>
> 33102 Paderborn, Germany Web:
> http://ccs-labs.org/~hagenauer/ <http://ccs-labs.org/~hagenauer/>
> ------------------------------------------------------------------------

wedt...@gmail.com

unread,
Oct 15, 2015, 10:14:25 AM10/15/15
to OMNeT++ Users, wedt...@gmail.com, hage...@ccs-labs.org
Hi Florian I really appreciate for your help I made some modifications in DecisionMaker files but still have some enquires,

1) So first step is to modify the  DecisionMaker.ned file:

package org.car2x.veins.modules.lte;

import org.car2x.veins.base.modules.IBaseApplLayer;

simple ExampleDecisionMaker like IBaseApplLayer {

    parameters:
        @class(ExampleDecisionMaker);
        @signal[DSRCMessagesSent](type="long");
        @statistic[DSRCMessagesSent](title="DSRCMessagesSent"; source="DSRCMessagesSent"; record=vector, stats, histogram);
        @signal[lteMessagesSent](type="long");
        @statistic[lteMessagesSent](title="lteMessagesSent"; source="lteMessagesSent"; record=vector, stats, histogram);
        @signal[dontCareMessagesSent](type="long");
        @statistic[dontCareMessagesSent](title="dontCareMessagesSent"; source="dontCareMessagesSent"; record=vector, stats, histogram);
        @signal[DSRCMessagesReceived](type="long");
        @statistic[DSRCMessagesReceived](title="DSRCMessagesReceived"; source="DSRCMessagesReceived"; record=vector, stats, histogram);
        @signal[lteMessagesReceived](type="long");
        @statistic[lteMessagesReceived](title="lteMessagesReceived"; source="lteMessagesReceived"; record=vector, stats, histogram);

        @signal[delay](type="float");
        @statistic[delay](title="delay"; source="delay"; record=mean, sum, stats, vector);

        int headerLength = default(88bit) @unit(bit);
        double maxOffset = default(0s) @unit(s);

    gates:
        input fromApplication;
        output toApplication;

        input fromLte;
        output toLte;

        input lowerLayerIn;
        output lowerLayerOut;
        input lowerControlIn;
        output lowerControlOut;
}


So I just added the @signal[delay](type="float");

                            @statistic[delay](title="delay"; source="delay"; record=mean, sum, stats, vector);

But does this delay statistic refers to the lte-802.11p network? , if I want it for all 3 cases LTE, 802.11p and LTE-802.11p

what sort of modifications should I do in order to have also individual
DSRC and LTE and Both delay as well?


2) Second Step:

Then in my BasicDecisionMaker.h I should add only

simsignal_t delaySignal

as shown below:

// statistic collection
        simsignal_t DSRCMessagesSent;
        simsignal_t lteMessagesSent;
        simsignal_t dontCareMessagesSent;
        simsignal_t DSRCMessagesReceived;
        simsignal_t lteMessagesReceived;

        simsignal_t delaySignal


3)  at the ExampleDecisionMaker.cc


I should add
only delaySignal = registerSignal("delay");

as shown:


BasicDecisionMaker::BasicDecisionMaker(){
    // Empty
}
BasicDecisionMaker::~BasicDecisionMaker(){
    // Empty
}

void BasicDecisionMaker::initialize(int stage) {
    BaseApplLayer::initialize(stage);
    if (stage == 0) {

        delaySignal = registerSignal("delay");
        DSRCMessagesSent = registerSignal("DSRCMessagesSent");
        lteMessagesSent = registerSignal("lteMessagesSent");
        dontCareMessagesSent = registerSignal("dontCareMessagesSent");
        DSRCMessagesReceived = registerSignal("DSRCMessagesReceived");
        lteMessagesReceived = registerSignal("lteMessagesReceived");
            fromApplication = findGate("fromApplication");
        toApplication = findGate("toApplication");
        fromLte = findGate("fromLte");
        toLte = findGate("toLte");
        fromDSRC = findGate("lowerLayerIn");
        toDSRC = findGate("lowerLayerOut");
        cModule *tmpMobility = getParentModule()->getSubmodule("veinsmobility");
        Veins::TraCIMobility* mobility = dynamic_cast<Veins::TraCIMobility *>(tmpMobility);
        ASSERT(mobility);
        id = mobility->getExternalId();

        maxOffset = par("maxOffset").doubleValue();
        individualOffset = dblrand() * maxOffset;
        findHost()->subscribe(mobilityStateChangedSignal, this);
    }
}



but how can I add in DecisionMaker.cc
emit(delaySignal, delay);

should I do it for DSRC and LTE individual?
If I want both LTE-DSRC delay?


void BasicDecisionMaker::handleMessage(cMessage* msg){
    int arrivalGate = msg->getArrivalGateId();
    if (arrivalGate == fromApplication) {
        HeterogeneousMessage *heterogeneousMessage =
                dynamic_cast<HeterogeneousMessage *>(msg);
        if (!heterogeneousMessage) {
            std::cout << "Message " << msg->getFullName()
                      << " is not a HeterogeneousMessage, but a "
                      << msg->getClassName() << std::endl;
            delete msg;
            return;
        }
        switch (heterogeneousMessage->getNetworkType()) {
            case DONTCARE:
                emit(dontCareMessagesSent, 1);
                sendDontCareMessage(heterogeneousMessage);
                break;
            case LTE:
                emit(lteMessagesSent, 1);
                sendLteMessage(heterogeneousMessage);
                break;
            case DSRC:
                emit(DSRCMessagesSent, 1);
                sendDSRCMessage(heterogeneousMessage);
                break;



Thanks
Tomas


DecisionMaker
Reply all
Reply to author
Forward
0 new messages