package Test;

import Yoseen.HKISAPIDevice;
import Yoseen.LibHK;

/**********************************************************************************************
 *
 * TestHKISAPIDevice
 *
 *
 **********************************************************************************************/
public class TestHKISAPIDevice {
    public static void main(String[] args) {
        String dddDebug = System.getProperty("user.dir")+"\\..\\build-Debug64\\";
        int ret;
        ret = LibHK.LibHKclass.initSDK(dddDebug+"LibHK");

        //
        HKISAPIDevice device = new HKISAPIDevice();
        ret = device.init();

        //
        ret = device.setDeviceConfig("http://192.168.1.52:80", "admin", "yoseen2018", 2000);

        //ZoomFocus
        LibHK.HKISAPI_ZoomFocus ZoomFocus = new LibHK.HKISAPI_ZoomFocus();
        ret = device.get_ZoomFocus(ZoomFocus);
        ret = device.set_ZoomFocus(ZoomFocus);

        //Color
        LibHK.HKISAPI_Color Color = new LibHK.HKISAPI_Color();
        ret = device.get_Color(Color);
        ret = device.set_Color(Color);

        //Exposure
        LibHK.HKISAPI_Exposure Exposure = new LibHK.HKISAPI_Exposure();
        ret = device.get_Exposure(Exposure);
        ret = device.set_Exposure(Exposure);

        //Iris
        LibHK.HKISAPI_Iris Iris = new LibHK.HKISAPI_Iris();
        ret = device.get_Iris(Iris);
        ret = device.set_Iris(Iris);

        //
        LibHK.HKISAPI_SupplementLight SupplementLight = new LibHK.HKISAPI_SupplementLight();
        ret = device.get_SupplementLight(SupplementLight);
        ret = device.set_SupplementLight(SupplementLight);

        //
        device.free();
        LibHK.LibHKclass.freeSDK();
    }
}
