package Test;

import Yoseen.HKNETDevice;
import Yoseen.LibHK;
import Yoseen.YoseenData;

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

        //
        HKNETDevice device = new HKNETDevice();
        ret = device.init();
        ret = device.login("192.168.1.251", "admin", "yoseen2018");

        //enable getptz+setptz
        ret = device.enableXPtz(1);

        //
        ret = device.ptzControl(YoseenData.PtzAction_MoveLeft, 50);
        ret = device.ptzControl_Stop(YoseenData.PtzAction_MoveLeft, 50);

        //
        int[] ptz = new int[3];
        ret = device.ptzControl_GetPtz(ptz, 1000);
        ret = device.ptzControl_SetPtz(ptz, 50);

        //
        ret = device.logout();
        device.free();
        LibHK.LibHKclass.freeSDK();
    }
}
