What is the '#pragma prefix' in IDL?
Each IDL file written for ACS shall have a line like this: #pragma prefix "alma" FOLLOWING ALL #include DIRECTIVES! Use the "alma" prefix and not "ALMA". The IDL #pragma prefix is used to:
The IDL compilers we are using have all limitations in the usage of the #pragma prefix.
Support from the IDL compilers is broken and not coherent. Updated with ACS 6.0 This positioning of the pragma prefix has always been the rule, but the ACS/TAO version distributed with ACS 6.0 has re-introduced an old bug that makes this even more important. You will have problems contacting C++ Components from Java and Python if you do not to this. A sympthom of this problem is a message like the following logged by the Manager while activating a component:
Another symptom of this, in your client code, will be a failure (exception) when trying to narrow the component after doing a getComponent call:
If you have the following IDL: #pragma prefix "alma" #include <acscomponent.idl> #include <ACSErrTypeCommon.idl> module acsexmplErrorComponent { interface ErrorComponent : ACS::ACSComponent ...... } TAO IDL compiler generates askeleton that declares the object as implementing the IDL interface:
This is wrong! If instead you have the following IDL: #include <acscomponent.idl> #include <ACSErrTypeCommon.idl> #pragma prefix "alma" module acsexmplErrorComponent { interface ErrorComponent : ACS::ACSComponent ...... } you get the correct value:
|
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|