edu.udayton.udri.asset.canon.ipcamera/src/edu/udayton/udri/asset/canon/ipcamera/IpCameraAsset.java
private void handleSetTilt(final SetPanTiltCommand setPanTilt) throws CommandExecutionException
    {
        final int tilt = (int)(setPanTilt.getPanTilt().getElevation()
                .getValue() * TILT_ADJUST); //Used to adjust the tilt value to the correct size
        final URL tiltFinal;
        try
        {
            tiltFinal = new URL(m_Url + "control?tilt=" + tilt);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Malformed URL, Forming Tilt Command URL");
            throw new CommandExecutionException("Malformed URL, forming Tilt Command");
        }
        Logging.log(LogService.LOG_DEBUG, "Tilt Command Sent: " + tiltFinal);
        getInputStream(tiltFinal);
        Logging.log(LogService.LOG_INFO, "Updated tilt to: " + tilt);
    }
/**
     * Method used to send the new tilt value to the Camera.
     * @param setPanTilt
     *     Command sent to the asset with the value from the new tilt.
     * @throws CommandExecutionException
     *     an error connecting to the IP camera.
     */
Method used to send the new tilt value to the Camera.
@param setPanTilt
Command sent to the asset with the value from the new tilt.
@throws CommandExecutionException
an error connecting to the IP camera.
Method used to send the new tilt value to the Camera . @param setPanTilt Command sent to the asset with the value from the new tilt . @throws CommandExecutionException an error connecting to the IP camera .
private void handleSetTilt(final SetPanTiltCommand setPanTilt) throws CommandExecutionException
    {
        final int tilt = (int)(setPanTilt.getPanTilt().getElevation()
                .getValue() * TILT_ADJUST); 
        final URL tiltFinal;
        try
        {
            tiltFinal = new URL(m_Url + "control?tilt=" + tilt);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Malformed URL, Forming Tilt Command URL");
            throw new CommandExecutionException("Malformed URL, forming Tilt Command");
        }
        Logging.log(LogService.LOG_DEBUG, "Tilt Command Sent: " + tiltFinal);
        getInputStream(tiltFinal);
        Logging.log(LogService.LOG_INFO, "Updated tilt to: " + tilt);
    }
private void handleSetTilt ( final SetPanTiltCommand setPanTilt ) throws CommandExecutionException { final int tilt = ( int ) ( setPanTilt . getPanTilt ( ) . getElevation ( ) . getValue ( ) * TILT_ADJUST ) ; final URL tiltFinal ; try { tiltFinal = new URL ( m_Url + "control?tilt=" + tilt ) ; } catch ( final MalformedURLException ex ) { Logging . log ( LogService . LOG_ERROR , ex , "Malformed URL, Forming Tilt Command URL" ) ; throw new CommandExecutionException ( "Malformed URL, forming Tilt Command" ) ; } Logging . log ( LogService . LOG_DEBUG , "Tilt Command Sent: " + tiltFinal ) ; getInputStream ( tiltFinal ) ; Logging . log ( LogService . LOG_INFO , "Updated tilt to: " + tilt ) ; }
Method used to send the new tilt value to the Camera.
Method used to send the new tilt value to the Camera .
//Used to adjust the tilt value to the correct size