![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: OXFInit arguments Topic Summary: Created On: 27-Jul-2004 16:58 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi Support,
Is there a property to change the arguments for the call to OXFInit(argc, argv, 6423) ? I need to change the argc and argv to different names. Thanks, Ricardo |
|
![]() |
|
![]() |
|
I think this is something that needs to be addressed. There is a workaround
for this, which is below, but I tried this with 4.0 and it doesn't work. With 3.0.1 it works. We had to come up with this at Motorola, probably for the same reasons that Ricardo needs it. But the workaround doesn't work in 4.0, because there is an auto generated extra comment before the main which mucks things up. We actually had to change the number of parameters in the main. You can use the implementationprolog property of the Configuration metaclass to rewrite this line, then put a comment (//) on the next line without a carriage return, which will comment out the generate OXFInit line. (Only for 3.0.1 releases and below). Scott |
|
![]() |
|
![]() |
|
You can use the CG::Configuration:
![]() |
|
![]() |
|
![]() |
|
You still need a case where you change number of parameters in the main. This is what we do now with 3.0.1 via implementation prolog. Each Rhapsody project is built as a task to the system. There is a centralizing task which goes through and runs each task in the system. The centralizing task is not done with Rhapsody and has certain stringent requirements to invoke each Rhapsody application task, so we have to modify the main line generated. This is different than Ricardo's requirement. How can we do this in 4.0, since our trick won't work anymore. The only way I know of is to create a configuration file representing the main, but this will null out auto code generation.
|
|
![]() |
|
![]() |
|
The 3.0.1 model show a way to disable the automatic initialization (and the call to OXFInit()) that will work in 4.0
Note The configuration CG::Configuration: ![]() |
|
![]() |
|
![]() |
|
Scott and Amos,
I also needed to change the code generated for main, so I used the property: - CPP_CG as the Subject, - Microsoft as the Meta Class but choose your needed environment (e.g. VxWorks, pSOS...) - Select the property "EntryPoint" - I rewrote the main and its arguments here. (Note: At the end of the string enter a comment "//" without a carriage return to comment out the extra generated code for the arguments of main) I believe there should be a clean way to modify the entry point main( ) and the call arguments to OXFInit( ). This example looks/is a workaround for customers. Ricardo P.S. Thanks for the workaround. |
|
![]() |
|
![]() |
|
We actually have a way to modify the main() signature that is implemented in the OSE adaptor.
Here is what you should do: - add to your environment properties a new property EntryPointDeclarationModifier and set in to the main return value and name (say "int main") - set the EntryPoint property to the main arguments (say "int a, long b, char** ") - generate code You will get the following main() declaration: int main(int a, long b, char** c) { ... } Amos |
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
OXFInit arguments
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.