Search code examples
omnet++

The usage of “cplusplus” keyword in Omnet++


I was trying to understand the usage of "cplusplus" keyword in Omnet++, what is the "cplusplus" keyword uses in Omnet++? If I don't use of cplusplus keyword, what problems are occurred? For example, in the following code:

cplusplus 
{{
    typedef struct _payload
    {
        int fileId;              //if file request
        char fileData[4096];    // if file data response
        
    } payload;
}}

Solution

  • cplusplus keyword is used in MSG file to mark a native C++ code (usually a structure that is used for definition of a message). It is described in OMNeT++ Simulation Manual.