package RTT.corba; /** * RTT/corba/_CServiceStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from Service.idl * Wednesday, July 11, 2012 5:27:00 PM CEST */ /** * An Orocos Service which hosts operations, attributes and properties. * @ingroup CompIDL */ public class _CServiceStub extends org.omg.CORBA.portable.ObjectImpl implements RTT.corba.CService { /** * Return the name of this service. */ public String getName () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getName", true); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getName ( ); } finally { _releaseReply ($in); } } // getName /** * Return the description of this service. */ public String getServiceDescription () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getServiceDescription", true); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getServiceDescription ( ); } finally { _releaseReply ($in); } } // getServiceDescription /** * Get a list of all the child services this service offers. */ public String[] getProviderNames () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getProviderNames", true); $in = _invoke ($out); String $result[] = RTT.corba.CServicePackage.CProviderNamesHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getProviderNames ( ); } finally { _releaseReply ($in); } } // getProviderNames /** * Get a child service this service provides. */ public RTT.corba.CService getService (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getService", true); $out.write_string (name); $in = _invoke ($out); RTT.corba.CService $result = RTT.corba.CServiceHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getService (name ); } finally { _releaseReply ($in); } } // getService /** * Has this service a child service with given name ? */ public boolean hasService (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("hasService", true); $out.write_string (name); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return hasService (name ); } finally { _releaseReply ($in); } } // hasService /** * Get a list of all operations. */ public String[] getOperations () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getOperations", true); $in = _invoke ($out); String $result[] = RTT.corba.COperationInterfacePackage.COperationListHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getOperations ( ); } finally { _releaseReply ($in); } } // getOperations /** * Get a list of all arguments of a given operation. */ public RTT.corba.CArgumentDescription[] getArguments (String operation) throws RTT.corba.CNoSuchNameException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getArguments", true); $out.write_string (operation); $in = _invoke ($out); RTT.corba.CArgumentDescription $result[] = RTT.corba.CDescriptionsHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getArguments (operation ); } finally { _releaseReply ($in); } } // getArguments /** * Returns the number of arguments required in callOperation() and sendOperation() for * a given operation. */ public short getArity (String operation) throws RTT.corba.CNoSuchNameException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getArity", true); $out.write_string (operation); $in = _invoke ($out); short $result = $in.read_ushort (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getArity (operation ); } finally { _releaseReply ($in); } } // getArity /** * Returns the number of arguments required in CSendHandle::collect() and CSendHandle::collectIfDone() for * a given operation. */ public short getCollectArity (String operation) throws RTT.corba.CNoSuchNameException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getCollectArity", true); $out.write_string (operation); $in = _invoke ($out); short $result = $in.read_ushort (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getCollectArity (operation ); } finally { _releaseReply ($in); } } // getCollectArity /** * Get a result type of a given operation. */ public String getResultType (String operation) throws RTT.corba.CNoSuchNameException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getResultType", true); $out.write_string (operation); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getResultType (operation ); } finally { _releaseReply ($in); } } // getResultType /** * Returns the argument or return type name of call as known to the Orocos type system. */ public String getArgumentType (String operation, short nbr) throws RTT.corba.CNoSuchNameException, RTT.corba.CWrongArgumentException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getArgumentType", true); $out.write_string (operation); $out.write_ushort (nbr); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CWrongArgumentException:1.0")) throw RTT.corba.CWrongArgumentExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getArgumentType (operation, nbr ); } finally { _releaseReply ($in); } } // getArgumentType /** * Returns the argument type of collect as known to the Orocos type system. */ public String getCollectType (String operation, short nbr) throws RTT.corba.CNoSuchNameException, RTT.corba.CWrongArgumentException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getCollectType", true); $out.write_string (operation); $out.write_ushort (nbr); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CWrongArgumentException:1.0")) throw RTT.corba.CWrongArgumentExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getCollectType (operation, nbr ); } finally { _releaseReply ($in); } } // getCollectType /** * Get a description of a given operation. */ public String getDescription (String operation) throws RTT.corba.CNoSuchNameException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getDescription", true); $out.write_string (operation); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getDescription (operation ); } finally { _releaseReply ($in); } } // getDescription /** * Checks if a given operation accepts the list of arguments. * If no exception is thrown, the arguments and operation name were valid. */ public void checkOperation (String operation, org.omg.CORBA.Any[] args) throws RTT.corba.CNoSuchNameException, RTT.corba.CWrongNumbArgException, RTT.corba.CWrongTypeArgException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("checkOperation", true); $out.write_string (operation); RTT.corba.CAnyArgumentsHelper.write ($out, args); $in = _invoke ($out); return; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CWrongNumbArgException:1.0")) throw RTT.corba.CWrongNumbArgExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CWrongTypeArgException:1.0")) throw RTT.corba.CWrongTypeArgExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { checkOperation (operation, args ); } finally { _releaseReply ($in); } } // checkOperation /** * Call an operation with a list of arguments. * This method will block until the operation completes and returns its result. */ public org.omg.CORBA.Any callOperation (String operation, RTT.corba.CAnyArgumentsHolder args) throws RTT.corba.CNoSuchNameException, RTT.corba.CWrongNumbArgException, RTT.corba.CWrongTypeArgException, RTT.corba.CCallInterrupted { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("callOperation", true); $out.write_string (operation); RTT.corba.CAnyArgumentsHelper.write ($out, args.value); $in = _invoke ($out); org.omg.CORBA.Any $result = $in.read_any (); args.value = RTT.corba.CAnyArgumentsHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CWrongNumbArgException:1.0")) throw RTT.corba.CWrongNumbArgExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CWrongTypeArgException:1.0")) throw RTT.corba.CWrongTypeArgExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CCallInterrupted:1.0")) throw RTT.corba.CCallInterruptedHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return callOperation (operation, args ); } finally { _releaseReply ($in); } } // callOperation /** * Send an operation with a list of arguments. * This method will return immediately and return a CSendHandle. */ public RTT.corba.CSendHandle sendOperation (String operation, org.omg.CORBA.Any[] args) throws RTT.corba.CNoSuchNameException, RTT.corba.CWrongNumbArgException, RTT.corba.CWrongTypeArgException, RTT.corba.CCallInterrupted { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("sendOperation", true); $out.write_string (operation); RTT.corba.CAnyArgumentsHelper.write ($out, args); $in = _invoke ($out); RTT.corba.CSendHandle $result = RTT.corba.CSendHandleHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchNameException:1.0")) throw RTT.corba.CNoSuchNameExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CWrongNumbArgException:1.0")) throw RTT.corba.CWrongNumbArgExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CWrongTypeArgException:1.0")) throw RTT.corba.CWrongTypeArgExceptionHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CCallInterrupted:1.0")) throw RTT.corba.CCallInterruptedHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return sendOperation (operation, args ); } finally { _releaseReply ($in); } } // sendOperation public String[] getAttributeList () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getAttributeList", true); $in = _invoke ($out); String $result[] = RTT.corba.CConfigurationInterfacePackage.CAttributeNamesHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getAttributeList ( ); } finally { _releaseReply ($in); } } // getAttributeList public RTT.corba.CConfigurationInterfacePackage.CProperty[] getPropertyList () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getPropertyList", true); $in = _invoke ($out); RTT.corba.CConfigurationInterfacePackage.CProperty $result[] = RTT.corba.CConfigurationInterfacePackage.CPropertyNamesHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getPropertyList ( ); } finally { _releaseReply ($in); } } // getPropertyList public org.omg.CORBA.Any getAttribute (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getAttribute", true); $out.write_string (name); $in = _invoke ($out); org.omg.CORBA.Any $result = $in.read_any (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getAttribute (name ); } finally { _releaseReply ($in); } } // getAttribute public boolean setAttribute (String name, org.omg.CORBA.Any value) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("setAttribute", true); $out.write_string (name); $out.write_any (value); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return setAttribute (name, value ); } finally { _releaseReply ($in); } } // setAttribute public boolean hasAttribute (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("hasAttribute", true); $out.write_string (name); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return hasAttribute (name ); } finally { _releaseReply ($in); } } // hasAttribute public boolean hasProperty (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("hasProperty", true); $out.write_string (name); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return hasProperty (name ); } finally { _releaseReply ($in); } } // hasProperty /** * Get a property by name. You can scope the name for * entering sub-properties. For example 'controlparameters.gains.k' * to retrieve nested property with name 'k'. */ public org.omg.CORBA.Any getProperty (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getProperty", true); $out.write_string (name); $in = _invoke ($out); org.omg.CORBA.Any $result = $in.read_any (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getProperty (name ); } finally { _releaseReply ($in); } } // getProperty /** * Set a property by name. You can scope the name for * entering sub-properties. For example 'controlparameters.gains.k' * to write nested property with name 'k'. */ public boolean setProperty (String name, org.omg.CORBA.Any value) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("setProperty", true); $out.write_string (name); $out.write_any (value); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return setProperty (name, value ); } finally { _releaseReply ($in); } } // setProperty /** * Return the type of the attribute or property. */ public String getPropertyType (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getPropertyType", true); $out.write_string (name); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getPropertyType (name ); } finally { _releaseReply ($in); } } // getPropertyType public String getAttributeType (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getAttributeType", true); $out.write_string (name); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getAttributeType (name ); } finally { _releaseReply ($in); } } // getAttributeType /** * Return the type name of the expression as it is known * to the Orocos Type System. */ public String getPropertyTypeName (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getPropertyTypeName", true); $out.write_string (name); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getPropertyTypeName (name ); } finally { _releaseReply ($in); } } // getPropertyTypeName public String getAttributeTypeName (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getAttributeTypeName", true); $out.write_string (name); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getAttributeTypeName (name ); } finally { _releaseReply ($in); } } // getAttributeTypeName /** * Return the result of an attribute or property as a text string. */ public String attributeToString (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("attributeToString", true); $out.write_string (name); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return attributeToString (name ); } finally { _releaseReply ($in); } } // attributeToString public String propertyToString (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("propertyToString", true); $out.write_string (name); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return propertyToString (name ); } finally { _releaseReply ($in); } } // propertyToString /** * Assign a given property or attribute a stringified value. * @return true if the assignment could be done. */ public boolean attributeFromString (String name, String value) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("attributeFromString", true); $out.write_string (name); $out.write_string (value); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return attributeFromString (name, value ); } finally { _releaseReply ($in); } } // attributeFromString public boolean propertyFromString (String name, String value) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("propertyFromString", true); $out.write_string (name); $out.write_string (value); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return propertyFromString (name, value ); } finally { _releaseReply ($in); } } // propertyFromString /** * Returns true if the attribute can be changed. */ public boolean isAttributeAssignable (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("isAttributeAssignable", true); $out.write_string (name); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return isAttributeAssignable (name ); } finally { _releaseReply ($in); } } // isAttributeAssignable /** * Returns the names of the ports of this component. */ public String[] getPorts () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getPorts", true); $in = _invoke ($out); String $result[] = RTT.corba.CDataFlowInterfacePackage.CPortNamesHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getPorts ( ); } finally { _releaseReply ($in); } } // getPorts /** * Returns the names of the ports of this component. */ public RTT.corba.CPortDescription[] getPortDescriptions () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getPortDescriptions", true); $in = _invoke ($out); RTT.corba.CPortDescription $result[] = RTT.corba.CDataFlowInterfacePackage.CPortDescriptionsHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getPortDescriptions ( ); } finally { _releaseReply ($in); } } // getPortDescriptions /** * Returns the type of the given port */ public RTT.corba.CPortType getPortType (String port_name) throws RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getPortType", true); $out.write_string (port_name); $in = _invoke ($out); RTT.corba.CPortType $result = RTT.corba.CPortTypeHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getPortType (port_name ); } finally { _releaseReply ($in); } } // getPortType /** * Returns the data type for the given port */ public String getDataType (String port_name) throws RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getDataType", true); $out.write_string (port_name); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getDataType (port_name ); } finally { _releaseReply ($in); } } // getDataType /** * Check if the given port is already connected to something */ public boolean isConnected (String port_name) throws RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("isConnected", true); $out.write_string (port_name); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return isConnected (port_name ); } finally { _releaseReply ($in); } } // isConnected /** * Disconnects this port from all connections it is part of. * @see CChannelElement::disconnect() to disconnect a single Channel. */ public void disconnectPort (String port_name) throws RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("disconnectPort", true); $out.write_string (port_name); $in = _invoke ($out); return; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { disconnectPort (port_name ); } finally { _releaseReply ($in); } } // disconnectPort /** * Use this to write to an input port with * the given policy. * Some protocols may adjust the policy, or pass additional information * into the policy, such as the name of the newly created connection. * * The returned channel element will not be functional until * channelReady() has been called for it */ public RTT.corba.CChannelElement buildChannelOutput (String input_port, RTT.corba.CConnPolicyHolder policy) throws RTT.corba.CNoCorbaTransport, RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("buildChannelOutput", true); $out.write_string (input_port); RTT.corba.CConnPolicyHelper.write ($out, policy.value); $in = _invoke ($out); RTT.corba.CChannelElement $result = RTT.corba.CChannelElementHelper.read ($in); policy.value = RTT.corba.CConnPolicyHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoCorbaTransport:1.0")) throw RTT.corba.CNoCorbaTransportHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return buildChannelOutput (input_port, policy ); } finally { _releaseReply ($in); } } // buildChannelOutput /** * Use this to read from an output port with * the given policy. * Some protocols may adjust the policy, or pass additional information * into the policy, such as the name of the newly created connection. */ public RTT.corba.CChannelElement buildChannelInput (String output_port, RTT.corba.CConnPolicyHolder policy) throws RTT.corba.CNoCorbaTransport, RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("buildChannelInput", true); $out.write_string (output_port); RTT.corba.CConnPolicyHelper.write ($out, policy.value); $in = _invoke ($out); RTT.corba.CChannelElement $result = RTT.corba.CChannelElementHelper.read ($in); policy.value = RTT.corba.CConnPolicyHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoCorbaTransport:1.0")) throw RTT.corba.CNoCorbaTransportHelper.read ($in); else if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return buildChannelInput (output_port, policy ); } finally { _releaseReply ($in); } } // buildChannelInput /** * Connect the given named port to the given remote port. * Use this method to connect two Orocos data flow ports. * * The local port needs to be the output, while the remote port is the * input. In case you only want to write a port without using this function, * use buildChannelOutput. For only reading a port, use buildChannelInput. * * This method combines both buildChannelOutput() and buildChannelInput() and is * generally better in setting up and checking a data flow connection between * two ports than the separate methods. * * This method will call the \a remote_ports interface back to orchestrate * the connection building. * * @see removeConnection() to remove this connection again. */ public boolean createConnection (String local_port, RTT.corba.CDataFlowInterface remote_ports, String remote_port, RTT.corba.CConnPolicyHolder policy) throws RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("createConnection", true); $out.write_string (local_port); RTT.corba.CDataFlowInterfaceHelper.write ($out, remote_ports); $out.write_string (remote_port); RTT.corba.CConnPolicyHelper.write ($out, policy.value); $in = _invoke ($out); boolean $result = $in.read_boolean (); policy.value = RTT.corba.CConnPolicyHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return createConnection (local_port, remote_ports, remote_port, policy ); } finally { _releaseReply ($in); } } // createConnection /** * Removes the specified connection created with createConnection. */ public boolean removeConnection (String local_port, RTT.corba.CDataFlowInterface remote_ports, String remote_port) throws RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("removeConnection", true); $out.write_string (local_port); RTT.corba.CDataFlowInterfaceHelper.write ($out, remote_ports); $out.write_string (remote_port); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return removeConnection (local_port, remote_ports, remote_port ); } finally { _releaseReply ($in); } } // removeConnection /** * Create an out-of-band data stream with a given policy. * You may specify a name_id in the policy object, or if left empty, * a name will be chosen for you. */ public boolean createStream (String local_port, RTT.corba.CConnPolicyHolder policy) throws RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("createStream", true); $out.write_string (local_port); RTT.corba.CConnPolicyHelper.write ($out, policy.value); $in = _invoke ($out); boolean $result = $in.read_boolean (); policy.value = RTT.corba.CConnPolicyHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return createStream (local_port, policy ); } finally { _releaseReply ($in); } } // createStream /** * Removes a stream added with createStream. * @param local_port The port to remove the stream from. * @param stream_name The name_id returned in the CConnPolicy object * after the call to createStream. */ public void removeStream (String local_port, String stream_name) throws RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("removeStream", true); $out.write_string (local_port); $out.write_string (stream_name); $in = _invoke ($out); return; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { removeStream (local_port, stream_name ); } finally { _releaseReply ($in); } } // removeStream /** * Checks if the connection channel elements are ready for a given * input port. * This is typically called by the createConnection setup logic to see * if the input side agrees with the connection and can use it. * For example, the input port can use this opportunity to check the * * @throw CNoSuchPortException if input_port is not an input port * or not present in this interface. * @return false if the connection could not be used. */ public boolean channelReady (String input_port, RTT.corba.CChannelElement channel) throws RTT.corba.CNoSuchPortException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("channelReady", true); $out.write_string (input_port); RTT.corba.CChannelElementHelper.write ($out, channel); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:RTT/corba/CNoSuchPortException:1.0")) throw RTT.corba.CNoSuchPortExceptionHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return channelReady (input_port, channel ); } finally { _releaseReply ($in); } } // channelReady // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:RTT/corba/CService:1.0", "IDL:RTT/corba/COperationInterface:1.0", "IDL:RTT/corba/CConfigurationInterface:1.0", "IDL:RTT/corba/CDataFlowInterface:1.0"}; public String[] _ids () { return (String[])__ids.clone (); } private void readObject (java.io.ObjectInputStream s) throws java.io.IOException { String str = s.readUTF (); String[] args = null; java.util.Properties props = null; org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props); try { org.omg.CORBA.Object obj = orb.string_to_object (str); org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); _set_delegate (delegate); } finally { orb.destroy() ; } } private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException { String[] args = null; java.util.Properties props = null; org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props); try { String str = orb.object_to_string (this); s.writeUTF (str); } finally { orb.destroy() ; } } } // class _CServiceStub