Orocos Real-Time Toolkit  2.5.0
DataFlow.idl
00001 #ifndef ORO_CORBA_DATAFLOW_IDL
00002 #define ORO_CORBA_DATAFLOW_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     enum CFlowStatus { CNoData, COldData, CNewData };
00014     enum CConnectionModel { CData, CBuffer };
00015     enum CLockPolicy { CUnsync, CLocked, CLockFree };
00016     struct CConnPolicy
00017     {
00018         CConnectionModel type;
00019         boolean init;
00020         CLockPolicy lock_policy;
00021         boolean pull;
00022         long size;
00023         long transport;
00024         long data_size;
00025         string name_id;
00026     };
00027 
00034     interface CChannelElement
00035     {
00039         CFlowStatus read(out any sample, in boolean copy_old_data);
00044         boolean write(in any sample);
00049         void disconnect();
00050     };
00051 
00056     interface CRemoteChannelElement : CChannelElement
00057     {
00064         //boolean setDataSample(in any sample);
00071         //boolean inputReady();
00076         void setRemoteSide(in CRemoteChannelElement other);
00082         boolean remoteSignal();
00083 
00092         void remoteDisconnect(in boolean writer_to_reader);
00093 
00094     };
00095 
00097     exception CNoSuchPortException {};
00101     exception CNoCorbaTransport {};
00102 
00103     enum CPortType { CInput, COutput };
00104 
00105     struct CPortDescription
00106     {
00107         CPortType type;
00108         string   name;
00109         string   type_name;
00110     };
00111 
00119     interface CDataFlowInterface
00120     {
00121       typedef sequence<string> CPortNames;
00122       typedef sequence<CPortDescription> CPortDescriptions;
00123 
00127       CPortNames getPorts();
00128 
00132       CPortDescriptions getPortDescriptions();
00133 
00137       CPortType getPortType(in string port_name)
00138             raises(CNoSuchPortException);
00139 
00143       string getDataType(in string port_name)
00144             raises(CNoSuchPortException);
00145 
00149       boolean isConnected(in string port_name)
00150             raises(CNoSuchPortException);
00151 
00156       void disconnectPort(in string port_name)
00157             raises(CNoSuchPortException);
00158 
00168       CChannelElement buildChannelOutput(in string input_port, inout CConnPolicy policy)
00169             raises(CNoCorbaTransport,CNoSuchPortException);
00170 
00177       CChannelElement buildChannelInput(in string output_port, inout CConnPolicy policy)
00178             raises(CNoCorbaTransport,CNoSuchPortException);
00179 
00197       boolean createConnection(in string local_port, in CDataFlowInterface remote_ports,
00198             in string remote_port, inout CConnPolicy policy)
00199             raises(CNoSuchPortException);
00200 
00204       boolean removeConnection(in string local_port,
00205             in CDataFlowInterface remote_ports, in string remote_port)
00206             raises(CNoSuchPortException);
00207 
00213       boolean createStream(in string local_port, inout CConnPolicy policy)
00214             raises(CNoSuchPortException);
00215 
00222       void removeStream(in string local_port, in string stream_name)
00223             raises(CNoSuchPortException);
00224 
00236       boolean channelReady(in string input_port,in CChannelElement channel)
00237             raises(CNoSuchPortException);
00238     };
00239   };
00240 };
00241 #endif
00242