package com.njcn.csharmonic.offline.mincfg.vo;

public class DATA_HARMQ //谐波无功
{
	private RTC_Timer time; //数据时标
	private Float[][] HARMQ; //4-?谐波无功
	public DATA_HARMQ(int num)
	{
		time = new RTC_Timer();
		HARMQ = new Float[4][num];
	}
	public static int GetSize(int num)
	{
//C# TO JAVA CONVERTER TODO TASK: There is no Java equivalent to 'sizeof':
		return 6 * Short.SIZE + 4 * num *  Float.SIZE;
	}
	public final boolean SetStructBuf(byte[] bArray, int nHaveRead, int num)
	{
		int nByteSize = bArray.length;
		if (nByteSize < GetSize(num))
		{
			return false;
		}

		int iStep = nHaveRead;
		time.SetStructBuf(bArray, iStep);
		iStep = iStep + RTC_Timer.GetSize();
		RefObject<Float[][]> tempRef_HARMQ = new RefObject<Float[][]>(HARMQ);
		iStep += Service.convertFloatArrayTwo(bArray, iStep, tempRef_HARMQ);
		HARMQ = tempRef_HARMQ.argvalue;
		return true;
	}
}