@canboat/visual-analyzer
Version:
NMEA 2000 data visualization utility (requires SK Server >= 2.15)
59 lines • 1.94 kB
TypeScript
/**
* Copyright 2025 Scott Bender (scott@scottbender.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { EventEmitter } from 'events';
import { PGN } from '@canboat/ts-pgns';
export interface RecordingStatus {
isRecording: boolean;
fileName?: string;
startTime?: string;
messageCount: number;
fileSize: number;
format?: string;
error?: string;
}
export interface RecordingFile {
name: string;
size: number;
created: string;
messageCount: number;
format?: string;
}
export interface RecordingOptions {
fileName?: string;
format?: string;
}
export declare class RecordingService extends EventEmitter {
private isRecording;
private currentFileName;
private currentFormat;
private messageCount;
private startTime;
private fileStream;
private recordingsDir;
constructor(configPath: string);
private ensureRecordingsDirectory;
getStatus(): RecordingStatus;
startRecording(options?: RecordingOptions): RecordingStatus;
stopRecording(): RecordingStatus;
recordMessage(raw: string | object | undefined, pgn: PGN | undefined): void;
getRecordedFiles(): RecordingFile[];
deleteRecordedFile(fileName: string): void;
getRecordedFilePath(fileName: string): string;
private getFileExtension;
private guessFileFormat;
private estimateMessageCount;
}
//# sourceMappingURL=recording-service.d.ts.map