edu.udayton.udri.asset.canon.ipcamera/src/edu/udayton/udri/asset/canon/ipcamera/IpCameraAsset.java
private void handleSetZoom(final SetCameraSettingsCommand setCameraSettings) throws CommandExecutionException
    {
        final int zoomTemp = (int)(setCameraSettings.getZoom() * ZOOM_ADJUST);
        final int zoom = ZOOM_ADJUST - zoomTemp;
        final URL commandFinal;
        try
        {
            commandFinal = new URL(m_Url + "control?zoom=" + zoom);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Malformed URL, Forming Zoom Command URL");
            throw new CommandExecutionException("Malformed URL, Forming Zoom Command");
        }
        Logging.log(LogService.LOG_DEBUG, "Zoom Sent Command: " + commandFinal);
        getInputStream(commandFinal);
        Logging.log(LogService.LOG_INFO, "Updated zoom to: " + setCameraSettings.getZoom()); 
    }
/**
     * Method to handle sending the new zoom to the camera.
     * @param setCameraSettings
     *     SetCameraSettingsCommand, used to get the values for the new zoom
     * @throws CommandExecutionException
     *     in case there is an error connecting to the IP camera.
     */
Method to handle sending the new zoom to the camera.
@param setCameraSettings
SetCameraSettingsCommand, used to get the values for the new zoom
@throws CommandExecutionException
in case there is an error connecting to the IP camera.
Method to handle sending the new zoom to the camera . @param setCameraSettings SetCameraSettingsCommand used to get the values for the new zoom @throws CommandExecutionException in case there is an error connecting to the IP camera .
private void handleSetZoom(final SetCameraSettingsCommand setCameraSettings) throws CommandExecutionException
    {
        final int zoomTemp = (int)(setCameraSettings.getZoom() * ZOOM_ADJUST);
        final int zoom = ZOOM_ADJUST - zoomTemp;
        final URL commandFinal;
        try
        {
            commandFinal = new URL(m_Url + "control?zoom=" + zoom);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Malformed URL, Forming Zoom Command URL");
            throw new CommandExecutionException("Malformed URL, Forming Zoom Command");
        }
        Logging.log(LogService.LOG_DEBUG, "Zoom Sent Command: " + commandFinal);
        getInputStream(commandFinal);
        Logging.log(LogService.LOG_INFO, "Updated zoom to: " + setCameraSettings.getZoom()); 
    }
private void handleSetZoom ( final SetCameraSettingsCommand setCameraSettings ) throws CommandExecutionException { final int zoomTemp = ( int ) ( setCameraSettings . getZoom ( ) * ZOOM_ADJUST ) ; final int zoom = ZOOM_ADJUST - zoomTemp ; final URL commandFinal ; try { commandFinal = new URL ( m_Url + "control?zoom=" + zoom ) ; } catch ( final MalformedURLException ex ) { Logging . log ( LogService . LOG_ERROR , ex , "Malformed URL, Forming Zoom Command URL" ) ; throw new CommandExecutionException ( "Malformed URL, Forming Zoom Command" ) ; } Logging . log ( LogService . LOG_DEBUG , "Zoom Sent Command: " + commandFinal ) ; getInputStream ( commandFinal ) ; Logging . log ( LogService . LOG_INFO , "Updated zoom to: " + setCameraSettings . getZoom ( ) ) ; }
Method to handle sending the new zoom to the camera.
Method to handle sending the new zoom to the camera .