Impact Acquire SDK Java
Important Differences Between The C++ API And The Java API

When you are familiar with the C++ interface of Impact Acquire already there are some of important differences you need to know! They shall be explained briefly:

  • Stuff that has already been declared deprecated at the time of publishing the Java API will not be available
  • Instead of directly accessing Impact Acquire properties that are public members of a class in the C++ interface, getter functions are used in Java. So when writing
    Device* pDev = getDevicePointerFromSomewhere();
    pDev->interfaceLayout.write( dilGenICam );
    
    you would write
    Device pDev = getDevicePointerFromSomewhere();
    pDev.getInterfaceLayout().write( TDeviceInterfaceLayout.dilGenICam );
    
    in Java!
  • Code that in C++ resides in sub-namespaces like e.g. mvIMPACT::acquire::GenICam will all end up in the mvIMPACT.acquire package in Java(this is likely to change in future versions!)
  • enums from C++ are wrapped as public final classes(the enum type) with public final static int members (the actual enumeration) in Java. Real Java enums could not be used as some of the existing enums from the C++ API have a bitmask-like behaviour which is not supported in Java.
  • The C++ API of Impact Acquire comes with a set of custom exception classes in a hierarchy. This allows the to write catch handlers tailored for a specific set of errors. The Impact Acquire base exception class in Java has been derived from java.lang.RuntimeException in order to get this very same hierarchy in Java as well.

Apart from that if someone is familiar with the C++ interface it shouldn't be too difficult to use Impact Acquire with Java.