微调
This commit is contained in:
@@ -17,6 +17,8 @@ import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.nio.file.Files;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1088,6 +1090,38 @@ public class WaveFileComponent {
|
||||
private int tableIndex;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
/********************************************************
|
||||
* iFlag == 0 高级算法的要求,采样率只能是32-128
|
||||
* iFlag == 1 普通展示,采样率按照cfg里面最小的(大于32)
|
||||
* iFlag == 2 App抽点要求,采样率抽点成32
|
||||
* iFlag == 3 高级算法原始波形(大于32)
|
||||
********************************************************/
|
||||
/** 输出格式: 2014-5-05 00:00:00 大写H为24小时制 */
|
||||
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String s;
|
||||
Date d = new Date();
|
||||
s = sdf.format(d);
|
||||
System.out.println(s);
|
||||
WaveFileComponent waveFileComponent = new WaveFileComponent();
|
||||
InputStream cfgStream = waveFileComponent.getFileInputStreamByFilePath("C:\\Users\\Administrator\\Desktop\\wave\\PQMonitor_PQM1_000062_20260501_053729_063_WAV.cfg");
|
||||
InputStream datStream = waveFileComponent.getFileInputStreamByFilePath("C:\\Users\\Administrator\\Desktop\\wave\\PQMonitor_PQM1_000062_20260501_053729_063_WAV.dat");
|
||||
// 获取瞬时波形 //获取原始波形值
|
||||
WaveDataDTO waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 1);
|
||||
d = new Date();
|
||||
s = sdf.format(d);
|
||||
System.out.println(s);
|
||||
// 获取RMS波形
|
||||
WaveDataDTO waveDataDTO1 = waveFileComponent.getValidData(waveDataDTO);
|
||||
d = new Date();
|
||||
s = sdf.format(d);
|
||||
System.out.println(s);
|
||||
// 获取特征值
|
||||
List<EigenvalueDTO> lstEigenvalueDTO = waveFileComponent.getEigenvalue(waveDataDTO, true);
|
||||
System.out.println(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user