edu.udayton.udri.asset.canon.ipcamera/src/edu/udayton/udri/asset/canon/ipcamera/IpCameraAsset.java
private double handleGetPan() throws CommandExecutionException
    {
        final URL panUrl;
        try
        {
            panUrl = new URL(m_Url + INFOURL);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating the Pan info URL");
            throw new CommandExecutionException(ex);
        }
        final URLConnection urlCon = getUrlConnection(panUrl);
        final InputStream infoInput = getInputStream(urlCon);
        final Properties infoProp = new Properties();
        try
        {
            infoProp.load(infoInput);
        }
        catch (final IOException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error writing the properties file");
            throw new CommandExecutionException(ex);
        }
        final String panString = "c.1.pan";
        final int cutOff = infoProp.getProperty(panString).lastIndexOf('=');
        return Double.parseDouble(infoProp.getProperty(panString)
                .substring(cutOff + 1)) / PAN_ADJUST;
    }
/**
     * Method used to get the pan value for the sync function.
     * @return double
     *     the current pan value of the camera
     * @throws CommandExecutionException
     *     an error connecting to the IP camera.
     */
Method used to get the pan value for the sync function.
@return double
the current pan value of the camera
@throws CommandExecutionException
an error connecting to the IP camera.
Method used to get the pan value for the sync function . @return double the current pan value of the camera @throws CommandExecutionException an error connecting to the IP camera .
private double handleGetPan() throws CommandExecutionException
    {
        final URL panUrl;
        try
        {
            panUrl = new URL(m_Url + INFOURL);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating the Pan info URL");
            throw new CommandExecutionException(ex);
        }
        final URLConnection urlCon = getUrlConnection(panUrl);
        final InputStream infoInput = getInputStream(urlCon);
        final Properties infoProp = new Properties();
        try
        {
            infoProp.load(infoInput);
        }
        catch (final IOException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error writing the properties file");
            throw new CommandExecutionException(ex);
        }
        final String panString = "c.1.pan";
        final int cutOff = infoProp.getProperty(panString).lastIndexOf('=');
        return Double.parseDouble(infoProp.getProperty(panString)
                .substring(cutOff + 1)) / PAN_ADJUST;
    }
private double handleGetPan ( ) throws CommandExecutionException { final URL panUrl ; try { panUrl = new URL ( m_Url + INFOURL ) ; } catch ( final MalformedURLException ex ) { Logging . log ( LogService . LOG_ERROR , ex , "Error creating the Pan info URL" ) ; throw new CommandExecutionException ( ex ) ; } final URLConnection urlCon = getUrlConnection ( panUrl ) ; final InputStream infoInput = getInputStream ( urlCon ) ; final Properties infoProp = new Properties ( ) ; try { infoProp . load ( infoInput ) ; } catch ( final IOException ex ) { Logging . log ( LogService . LOG_ERROR , ex , "Error writing the properties file" ) ; throw new CommandExecutionException ( ex ) ; } final String panString = "c.1.pan" ; final int cutOff = infoProp . getProperty ( panString ) . lastIndexOf ( '=' ) ; return Double . parseDouble ( infoProp . getProperty ( panString ) . substring ( cutOff + 1 ) ) / PAN_ADJUST ; }
Method used to get the pan value for the sync function.
Method used to get the pan value for the sync function .