@canboat/visual-analyzer
Version:
NMEA 2000 data visualization utility (requires SK Server >= 2.15)
61 lines • 2.37 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 express, { Request, Response } from 'express';
import { FromPgn } from '@canboat/canboatjs';
import { N2kMapper } from '@signalk/n2k-signalk';
import { Config, ConfigurationResponse, ConnectionProfile, ConnectionsConfig } from './types';
declare class VisualAnalyzerServer {
private port;
private publicDir;
private configFile;
private configDir;
private app;
private server;
private wss;
private nmeaProvider;
private currentConfig;
private canboatParser;
private n2kMapper;
private connectionState;
private recordingService;
private outAvailable;
constructor(port?: number);
private loadConfiguration;
private connectToActiveProfile;
private setupRoutes;
private setupWebSocket;
private handleWebSocketMessage;
private stopDataStream;
private generateSampleNMEAData;
connectToNMEASource(options: ConnectionProfile): void;
private broadcast;
getConfiguration(): ConfigurationResponse;
getConnectionProfiles(): ConnectionsConfig;
getActiveConnectionProfile(): ConnectionProfile | null;
saveConnectionProfile(profileData: ConnectionProfile): void;
deleteConnectionProfile(profileId: string): void;
activateConnectionProfile(profileId: string): void;
private validateConnectionProfile;
updateConfiguration(newConfig: Partial<Config>): void;
private saveConfigToFile;
restartNMEAConnection(): void;
start(): void;
private openBrowser;
stop(): void;
}
export declare const translateToSignalK: (req: Request, res: Response, canboatParser: FromPgn, n2kMapper: N2kMapper) => express.Response<any, Record<string, any>> | undefined;
export default VisualAnalyzerServer;
//# sourceMappingURL=server.d.ts.map