package com.njcn.advance.pojo.dto.relevent;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.sun.jna.Structure;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Arrays;
import java.util.List;

/**
 * pqs
 *
 * @author cdf
 * @date 2023/6/19
 */
@EqualsAndHashCode(callSuper = true)
@Data
@JsonIgnoreProperties({"pointer", "autoAllocate", "autoRead", "autoWrite"}) // 忽略JNA内部字段
public class QtIdx extends Structure{

    /**
     * 暂降幅值
     */
    public float r_esm;

    /**
     * sarifi-90
     */
    public int sarfi_90;

    /**
     * sarifi-50
     */
    public int sarifi_50;

    /**
     * 暂降能量
     */
    public float r_asei;

    /**
     * 严重程度
     */
    public float r_assi;




    public static class ByReference extends QtIdx implements Structure.ByReference {

    }

    public static class ByValue extends QtIdx implements Structure.ByValue {

    }

    // 关键：定义字段顺序，必须与 C 结构体一致！
    @Override
    protected List<String> getFieldOrder() {
        return Arrays.asList(
                "r_esm",
                "sarfi_90",
                "sarifi_50",
                "r_asei",
                "r_assi"
        );
    }



}
