Package edsdk.utils.CanonConstants

Examples of edsdk.utils.CanonConstants.EdsCustomFunction


                         type.equals( EdsDataType.kEdsDataType_Unknown ) ) {
                        System.out.println( " VALUE NOT AVAILABLE ON THIS CAMERA AND/OR WITH CURRENT SETTINGS" );
                    } else {
                        final Long value = CanonUtils.getPropertyData( camera.getEdsCamera(), EdsPropertyID.kEdsPropID_CFn, i );
                        System.out.println( " Value: " + value );
                        final EdsCustomFunction e = EdsCustomFunction.enumOfValue( i );
                        if ( e != null ) {
                            System.out.println( " Known: Yes, " + e.name() +
                                                " (" + e.description() + ")" );
                        } else {
                            System.out.println( " Known: NO" );
                        }
                    }
                }
            }
            System.out.println( "\n" );

            if ( liverefs != null ) {
                CanonUtils.release( liverefs );
            }

            //TEST GETTERS FROM CanonCamera
            System.out.println( "Property Getters in CanonCamera" );
            System.out.println( "---------------------------------------" );
            final Method[] methods = camera.getClass().getMethods();
            for ( final Method method : methods ) {
                if ( method.getName().startsWith( "get" ) &&
                     method.getParameterTypes().length == 0 ) {
                    System.out.println( "Trying " + method.getName() );
                    try {
                        final Object o = method.invoke( camera, (Object[]) null );
                        System.out.println( " Result: " + Test.toString( o ) );
                    }
                    catch ( final IllegalAccessException e ) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                    catch ( final IllegalArgumentException e ) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                    catch ( final InvocationTargetException e ) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                }
            }
            System.out.println( "\n\n" );

            //TEST CUSTOM FUNCTION FROM CanonCamera
            System.out.println( "EdsCustomFunction with CanonCamera.getCustomFunction" );
            System.out.println( "----------------------------------------------------" );
            for ( final EdsCustomFunction e : EdsCustomFunction.values() ) {
                System.out.println( "\nTrying " + e.description() + " (" +
                                    e.name() + ")" );
                final Long result = camera.getCustomFunction( e );
                System.out.println( "    Value: " + Test.toString( result ) );
            }
            System.out.println( "\n" );
View Full Code Here

TOP

Related Classes of edsdk.utils.CanonConstants.EdsCustomFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.