@rfkit/charts 1.0.94 → 1.0.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -106,5 +106,6 @@ export declare enum SeriesType {
106
106
  MaxData = "maxData",
107
107
  MinData = "minData",
108
108
  AvgData = "avgData",
109
- ThresholdData = "threshold"
109
+ ThresholdData = "threshold",
110
+ TemplateData = "templateData"
110
111
  }
@@ -1,3 +1,3 @@
1
1
  import { type SpectrumConfig } from '@rfkit/spectrum-analyzer';
2
- import type { PublishData } from '../types';
2
+ import type { PublishData } from '../../types';
3
3
  export default function useSpectrumAnalyzer(props?: SpectrumConfig): (e: PublishData) => Promise<void>;
@@ -0,0 +1,26 @@
1
+ import { type RefObject } from 'react';
2
+ import type { SelectedSignal } from '../../types';
3
+ interface UseTemplateComparisonProps {
4
+ frequencyFormat: RefObject<(x: number) => string>;
5
+ onChange: RefObject<(e: SelectedSignal) => void>;
6
+ globalID: string;
7
+ }
8
+ interface ExceedingSegment {
9
+ maxValue: number;
10
+ minValue: number;
11
+ avgValue: number;
12
+ startFrequency: number;
13
+ stopFrequency: number;
14
+ centerFrequency: number;
15
+ bandwidth: number;
16
+ timestamp: number;
17
+ }
18
+ /**
19
+ * 模板数据比较 Hook
20
+ * 用于检测数据是否超出模板阈值,并输出相关信息
21
+ */
22
+ export default function useTemplateComparison({ frequencyFormat, onChange, globalID, }: UseTemplateComparisonProps): {
23
+ findExceedingSegments: (dataArray: Float32Array, templateArray: Float32Array, timestamp: number) => ExceedingSegment[];
24
+ processExceedingData: (data: Float32Array, templateData: Float32Array, timestamp: number) => void;
25
+ };
26
+ export {};