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

import com.sun.jna.Structure;

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

/**
 *
 * @author njcn
 * 传入参数
 * smp_va A相电压波形数据
 * smp_vb B相电压波形数据
 * smp_vc C相电压波形数据
 * smp_rate 波形采样率
 * smp_len 每个通道波形数据个数
 * evt_num 高级算法返回事件个数
 * evt_buf 高级算法返回数据
 */
public class Rect extends Structure {
	public static final int MAX_SMP_DATA_LEN = 128*50*120;
	public float smp_va[] = new float[MAX_SMP_DATA_LEN];
	public float smp_vb[] = new float[MAX_SMP_DATA_LEN];
	public float smp_vc[] = new float[MAX_SMP_DATA_LEN];
	public int smp_rate;
	public int smp_len;
	public int evt_num = -1;
	public BackData evt_buf[] = new BackData[32];

	public static class ByReference extends Rect implements Structure.ByReference {

	}

	public static class ByValue extends Rect implements Structure.ByValue {

	}

//	@Override
//	protected List<String> getFieldOrder() {
//		return Arrays.asList(new String[] { "evt_num","evt_buf" });
//	}

	@Override
	protected List<String> getFieldOrder() {
		return Arrays.asList("smp_va", "smp_vb", "smp_vc", "smp_rate", "smp_len", "evt_num", "evt_buf");
	}
}
