OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000655OMNeT++IDE / otherpublic2013-05-16 13:152014-01-31 12:03
Assigned Toandras 
PlatformOSOS Version
Product Version4.3 
Target VersionFixed in Version4.4.1 
Summary0000655: opp_msgc does not respect namespace when generating #ifndef/#define
DescriptionWhen generating code for messages, opp_msgc does not respect the namespace that was defined in the .msg file when #define and #ifndef is generated.

Current behaviour:
File "foo.msg" with "namespace bar;" results in:
#ifndef _FOO_M_H
#define _FOO_M_H

Correct behavior:
File "foo.msg" with "namespace bar;" should results in:
#ifndef _BAR_FOO_M_H
#define _BAR_FOO_M_H

This is important, as it is likely that different models use the same filename.msg. Without the namespace in the #define it is impossible to use two models that use the same filename.msg in the same simulation.
TagsNo tags attached.
Attached Filespatch file icon opp_msgc.patch [^] (6,562 bytes) 2014-01-28 11:49 [Show Content]

- Relationships

-  Notes
till (reporter)
2014-01-28 11:51
edited on: 2014-01-28 11:52

I attached a patch that should fix this issue. It mainly moves around some parts of the script to allow for using the namespace in the define. I tested it with multiple projects and found no problems. A bit more testing might be reasonable. Would love to see the fix in the upcoming releases!

andras (administrator)
2014-01-31 10:55

I understand the problem, will fix it for 4.4.1. The patch is not perfect (fails e.g. test/core/msg_namespace_4.test), working on it.
till (reporter)
2014-01-31 11:05

Ahh, thanks Andras! This is good news!
andras (administrator)
2014-01-31 12:03

Done :)

- Issue History
Date Modified Username Field Change
2013-05-16 13:15 till New Issue
2014-01-28 11:49 till File Added: opp_msgc.patch
2014-01-28 11:51 till Note Added: 0000886
2014-01-28 11:52 till Note Edited: 0000886
2014-01-31 10:55 andras Note Added: 0000890
2014-01-31 11:05 till Note Added: 0000891
2014-01-31 12:03 andras Note Added: 0000892
2014-01-31 12:03 andras Status new => resolved
2014-01-31 12:03 andras Fixed in Version => 4.4.1
2014-01-31 12:03 andras Resolution open => fixed
2014-01-31 12:03 andras Assigned To => andras

Copyright © 2000 - 2022 MantisBT Team
Powered by Mantis Bugtracker