error during migration to 5.0

140 views
Skip to first unread message

ahmad.e...@gmail.com

unread,
Jun 18, 2016, 7:44:23 AM6/18/16
to OMNeT++ Users
Hi all,

i manage to modify other error message for the migration of my simulation from 4.6 to 5.0.. however,  i can't solve this error.. The application build goes smoothly but once i run it. i got the following message:


Wrong type "MobilityBase" in the @signal[mobilityStateChanged] property in the "Manager" NED type, should be one of: long, unsigned long, double, simtime_t, string, or a registered class name optionally followed by a question mark.


Seems that the message is referring to MobilityBased.ned parameters, but i did not touch any of the parameters.


Thank you
Ahmad 

Rudolf Hornig

unread,
Jun 20, 2016, 5:14:23 AM6/20/16
to OMNeT++ Users
That seems like the Manager module fires a signal and sends an object which is not one of the allowed types. I'm not sure about the exact cause without the source.

ahmad.e...@gmail.com

unread,
Jun 20, 2016, 10:00:40 AM6/20/16
to OMNeT++ Users
Found the cause of the error.. but don't know how to solve it..

"Manager" is an extend of "StationaryMobility", which itself an extend from "MobilityBase"..

However, mobilitybase.cc had

void MobilityBase::initialize(int stage)


therefore it detects a different syntax in initializing manager.cc

void Manager::initialize()


should i set a the same form in manager.cc? if yes, what value should i put?

Ahmad

Rudolf Hornig

unread,
Jun 20, 2016, 11:06:09 AM6/20/16
to OMNeT++ Users
Just check the relevant section in include/omnetpp/ChangeLog:

* Signal listener interface change: A cObject *details (default-nullptr)
argument has been added to emit() methods, and consequently, to
cIListener::receiveSignal() methods as well. The motivation was to
allow simulation models to provide some extra information with
primitive data types (double, long, etc) they emit, without the need
to switch over to emitting cObject altogether.

This is a non-backward-compatible change: users' listeners will need
to be updated (the extra argument added to their receiveSignal()
methods). To facilitate transition, compile OMNeT++ and models with
WITH_OMNETPP4x_LISTENER_SUPPORT defined; this will set up cIListener
to delegate to the old methods, so existing listeners will work.

* Result filter/recorder interface change: A similar change has been
applied to cResultFilter and cResultRecorder as well, so models that
contain custom result filters or recorders will need to be updated for
OMNeT++ 5.0. Defining WITH_OMNETPP4x_LISTENER_SUPPORT does NOT help
these classes.

Jiadong Yao

unread,
Jun 12, 2018, 9:26:05 AM6/12/18
to OMNeT++ Users
Hi Rudolf

I also encounter the same problem. I write my own mobility .ned and .cc which extend the LinearMobility. In my own mobility  I also used the signal method to get some value during simulation.
The error message is:
 Wrong type "MobilityBase" in the @signal[mobilityStateChanged] property in the "ReflectMobility" NED type, should be one of: long, unsigned long, double, simtime_t, string, or a registered class name optionally followed by a question mark -- in module (inet::LinearMobility) myNetwork.ue[0].mobility (id=171), during network initialization.

simple ReflectMobility extends LinearMobility 
{
    parameters:
@signal[inRangeCheck](type = double);
@statistic[inRange](title="num of aircraft";source="inRangeCheck";record=vector,stats;interpolateiomode=none);
}

This is the signal I define. I am not able to find any solution to this problem. Do you have any idea?

@Ahmad, Have you solved your problem? How did you do?

Thank both of you
Jiadong
Reply all
Reply to author
Forward
0 new messages