public Servos( Qwerk qwerk ) { string hostAddress = qwerk.HostAddress; // check if connection was established if ( hostAddress != null ) { try { Ice.ObjectPrx obj = qwerk.iceCommunicator.stringToProxy( "'::TeRK::ServoController':tcp -h " + hostAddress + " -p 10101" ); obj = obj.ice_timeout( Qwerk.TimeOut ); servoController = TeRKIceLib.ServoControllerPrxHelper.checkedCast( obj ); } catch ( Ice.ObjectNotExistException ) { // the object does not exist on the host throw new ServiceAccessFailedException( "Failed accessing to the requested service." ); } catch { throw new ConnectionFailedException( "Failed connecting to the requested service." ); } if ( servoController == null ) { throw new ServiceAccessFailedException( "Failed accessing to the requested cervice." ); } } else { throw new NotConnectedException( "Qwerk object is not connected to a board." ); } }