Orocos Real-Time Toolkit  2.6.0
OperationInterface.idl
00001 #ifndef ORO_CORBA_OPERATION_REPOSITORY_IDL
00002 #define ORO_CORBA_OPERATION_REPOSITORY_IDL
00003 
00004 #ifdef CORBA_IS_TAO
00005 //resolves LNK2005
00006 #include <tao/orb.idl>
00007 #endif
00008 
00009 module RTT
00010 {
00011   module corba
00012   {
00013       typedef sequence<any> CAnyArguments;
00014 
00020     struct CArgumentDescription
00021     {
00022       string name;        
00023       string description; 
00024       string type;        
00025     };
00026 
00027     typedef sequence<CArgumentDescription> CDescriptions;
00028     
00032     exception CWrongArgumentException
00033     {
00034       long which_arg;
00035       long max_arg;
00036     };
00037 
00041     exception CWrongNumbArgException
00042     {
00043       long wanted;
00044       long received;
00045     };
00046 
00050     exception CWrongTypeArgException
00051     {
00052       long whicharg;
00053       string expected;
00054       string received;
00055     };
00056 
00060     exception CNoSuchNameException
00061     {
00062       string name;
00063     };
00064     
00065     enum CSendStatus { CSendFailure, CSendNotReady, CSendSuccess };
00066 
00071     exception CCallInterrupted
00072     {
00073     };
00074 
00075     exception CCallError
00076     {
00077       string what;
00078     };
00079     
00086     interface CSendHandle {
00087     
00088         CSendStatus collect(out CAnyArguments args) raises(CCallError);
00089 
00090         CSendStatus collectIfDone(out CAnyArguments args) raises(CCallError);
00091         
00095         CSendStatus checkStatus();
00100         any ret() raises(CCallError);                       
00101 
00110       void checkArguments(in CAnyArguments args) raises (
00111                                  CWrongNumbArgException,
00112                                  CWrongTypeArgException);
00113 
00119       void dispose();
00120     };
00121 
00126     interface COperationInterface
00127     {
00128     typedef sequence<string> COperationList;
00129 
00133       COperationList getOperations();
00134 
00138       CDescriptions getArguments(in string operation) raises (CNoSuchNameException);
00139 
00144       unsigned short getArity(in string operation) raises (CNoSuchNameException);
00145 
00150       unsigned short getCollectArity(in string operation) raises (CNoSuchNameException);
00151 
00155       string getResultType(in string operation) raises (CNoSuchNameException);
00156       
00160       string getArgumentType(in string operation, in unsigned short nbr) raises (CNoSuchNameException, CWrongArgumentException);
00161       
00165       string getCollectType(in string operation, in unsigned short nbr) raises (CNoSuchNameException, CWrongArgumentException);
00166 
00170       string getDescription(in string operation) raises (CNoSuchNameException);
00171 
00176       void checkOperation(in string operation, in CAnyArguments args) raises ( CNoSuchNameException,
00177                                  CWrongNumbArgException,
00178                                  CWrongTypeArgException);
00179 
00184       any callOperation(in string operation, inout CAnyArguments args) raises ( CNoSuchNameException,
00185                                  CWrongNumbArgException,
00186                                  CWrongTypeArgException,
00187                                  CCallInterrupted,
00188                                  CCallError);
00189 
00194       CSendHandle sendOperation(in string operation, in CAnyArguments args) raises ( CNoSuchNameException,
00195                                  CWrongNumbArgException,
00196                                  CWrongTypeArgException,
00197                                  CCallInterrupted);
00198     };
00199 
00200   };
00201 };
00202 #endif