L
Luca
I have the following problem:
I'm developing a system where there are some processes that
communicate each other via message queues; the message one process can
send to another process is as follows:
******************************************
struct ST_MSG {
int iType;
char aData[MAX_DATA_PART_LENGTH];
}
******************************************
the message is composed of two parts: iType tells about the kind of
message and the aData buffer contains the informative part.
depending on the value assumed by iType, the aData buffer has to be
cast explicitely to the proper structure.
the problem I have is that of determining the value of
MAX_DATA_PART_LENGTH
I have tried using the #define macro of the preprocessor but, due to
the high number of structures, the compiler crashes.
I wouldn't like to use an off-line solution such as building a
separate project whose only job is that of calculating the
MAX_DATA_PART_LENGTH number.
I would like to solve the problem during the compilation of my prject
do you have any idea?
Thank you
Luca
I'm developing a system where there are some processes that
communicate each other via message queues; the message one process can
send to another process is as follows:
******************************************
struct ST_MSG {
int iType;
char aData[MAX_DATA_PART_LENGTH];
}
******************************************
the message is composed of two parts: iType tells about the kind of
message and the aData buffer contains the informative part.
depending on the value assumed by iType, the aData buffer has to be
cast explicitely to the proper structure.
the problem I have is that of determining the value of
MAX_DATA_PART_LENGTH
I have tried using the #define macro of the preprocessor but, due to
the high number of structures, the compiler crashes.
I wouldn't like to use an off-line solution such as building a
separate project whose only job is that of calculating the
MAX_DATA_PART_LENGTH number.
I would like to solve the problem during the compilation of my prject
do you have any idea?
Thank you
Luca