package com.njcn.advance.utils;

import com.njcn.advance.model.responsibility.QvvrStruct;
import com.sun.jna.Library;
import com.sun.jna.Native;

/**
 * @author hongawen
 * @version 1.0.0
 * @date 2023年07月24日 14:12
 */
public class ResponsibilityCallDllOrSo extends JnaCallDllOrSo {

    public static String strpath;

    public ResponsibilityCallDllOrSo(String name) {
        super(name);
    }

    @Override
    public void setPath() {
        ResponsibilityCallDllOrSo.strpath = super.getStrpath();
    }

    public interface ResponsibilityLibrary extends Library {
        // 加载Lib库
        ResponsibilityCallDllOrSo.ResponsibilityLibrary INSTANTCE = (ResponsibilityCallDllOrSo.ResponsibilityLibrary) Native.loadLibrary(ResponsibilityCallDllOrSo.strpath, ResponsibilityCallDllOrSo.ResponsibilityLibrary.class);
        // 定义方法--->与C方法相对应
        void harm_response(QvvrStruct outData);
    }
}
