|Anonymous | Login||2019-10-21 01:29 UTC|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000101||OMNeT++||command line tools||public||2009-09-02 14:21||2010-05-09 19:41|
|Target Version||Fixed in Version||4.1rc1|
|Summary||0000101: Add a message property @sizetype() to msgc to specify to specify the type of the array size variable|
|Description||Currently msgc stores the size of an array in an "int". In OverSim we use msgc generated messages also for real world communication by serializing them with parsim pack()/unpack() methods. In this case using a 32 bit integer is a waste of network communication bandwidth, if we know that an array will only contain a few elements.|
I've made a small patch to msgc to support the @sizetype property to specify the C++ type of the array size variable.
unsigned int nonce;
AuthBlock authBlock @sizetype(uint8_t);
|Tags||No tags attached.|
|Attached Files||msgc_sizetype.patch [^] (949 bytes) 2009-09-02 14:21 [Show Content]|
The above patch seems to break neddoc generation. For all messages which appear after a message with the new @sizetype property in the same .msg file, there is no neddoc generated.
BTW, I don't see any error messages or warnings (e.g. undocumented parameters) in the IDE when trying to generate neddoc. Is this not available or is it simply hidden in some place?
edited on: 2010-05-09 18:49
Implemented @sizetype() for array parameters. Unlike in the attached patch, the specified type is also used in the signatures of the field getter/setter methods (as index), and as return type and arg type in the array size getter/setter methods.
The IDE neddoc error seems to have been fixed since 4.0, as I could not reproduce it. Documentation from types containing @sizetype was correctly generated.
|Update: I could reproduce the neddoc error: it occurred when @sizetype contained a keyword like "int", "short", "unsigned", etc. It was caused by a parse error: the grammar did not allow these keywords in property values. The workaround would have been to put these types in quotes (like this: @sizetype("unsigned char")). I extended the grammar to include these keywords, so it should now work without quotes as well.|
|2009-09-02 14:21||baumgart||New Issue|
|2009-09-02 14:21||baumgart||File Added: msgc_sizetype.patch|
|2009-09-11 09:55||baumgart||Note Added: 0000173|
|2010-05-09 18:43||andras||Note Added: 0000291|
|2010-05-09 18:43||andras||Status||new => resolved|
|2010-05-09 18:43||andras||Fixed in Version||=> 4.1rc1|
|2010-05-09 18:43||andras||Resolution||open => fixed|
|2010-05-09 18:43||andras||Assigned To||=> andras|
|2010-05-09 18:49||andras||Note Edited: 0000291|
|2010-05-09 19:41||andras||Note Added: 0000292|
|Copyright © 2000 - 2019 MantisBT Team|